Sema4AI Action Server
Project description
sema4ai-action-server
Sema4.ai Action Server is a Python framework designed to simplify the deployment of actions (AI or otherwise).
An action
in this case is defined as a Python function (which has inputs/outputs defined), which is served by the Sema4.ai Action Server
.
The Sema4.ai Action Server
automatically generates an OpenAPI spec for your Python code, enabling different AI/LLM Agents to understand and call your Action. It also manages the Action lifecycle and provides full traceability of what happened during runs.
1. Install Action Server
Action Server is available as a stand-alone fully signed executable and via pip install sema4ai-action-server
.
We recommend the executable to prevent confusion in case you have multiple/crowded Python environments, etc.
For macOS
# Install Sema4.ai Action Server
brew update
brew install sema4ai/tools/action-server
For Windows
# Download Sema4.ai Action Server
curl -o action-server.exe https://sema4.ai/cdn/downloads/action-server/releases/latest/windows64/action-server.exe
# Add to PATH or move to a folder that is in PATH
setx PATH=%PATH%;%CD%
For Linux
# Download Sema4.ai Action Server
curl -o action-server https://sema4.ai/cdn/downloads/action-server/releases/latest/linux64/action-server
chmod a+x action-server
# Add to PATH or move to a folder that is in PATH
sudo mv action-server /usr/local/bin/
2. Run your first Action
# Bootstrap a new project using this template.
# You'll be prompted for the name of the project (directory):
action-server new
# Start Action Server
cd my-project
action-server start --expose
👉 You should now have an Action Server running locally at: http://localhost:8080, so open that in your browser and the web UI will guide you further.
👉 Using the --expose
-flag, you also get a public internet-facing URL (something like "https://twently-cuddly-dinosaurs.robocorp.link") and the related token. These are the details that you need to configure your AI Agent to have access to your Action
What do you need in your Action Package
An Action Package
is currently defined as a local folder that contains at least one Python file containing an action entry point (a Python function marked with @action
-decorator from sema4ai.actions
).
The package.yaml
file is required for specifying the Python environment and dependencies for your Action (RCC will be used to automatically bootstrap it and keep it updated given the package.yaml
contents).
Note: the
package.yaml
is optional if the action server is not being used as a standalone (i.e.: if it was pip-installed it can use the same python environment where it's installed).
Bootstrapping a new Action
Start new projects with:
action-server new
Note: the action-server
executable should be automatically added to your python installation after pip install sema4ai-action-server
, but if for some reason it wasn't pip-installed, it's also possible to use python -m sema4ai.action_server
instead of action-server
.
After creating the project, it's possible to serve the actions under the current directory with:
action-server start
For example: When running action-server start
, the action server will scan for existing actions under the current directory, and it'll start serving those.
After it's started, it's possible to access the following URLs:
/index.html
: UI for the Action Server./openapi.json
: Provides the openapi spec for the action server./docs
: Provides access to the APIs available in the server and a UI to test it.
Documentation
Explore our docs for extensive documentation.
Changelog
A list of releases and corresponding changes can be found in the changelog.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file sema4ai_action_server-0.5.1.tar.gz
.
File metadata
- Download URL: sema4ai_action_server-0.5.1.tar.gz
- Upload date:
- Size: 391.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1018-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b380abfc222556f20557df615fcde36320fab0381bea5cdf3cfdc977396c203 |
|
MD5 | a9e84ffbde78059a448ccbe600622f06 |
|
BLAKE2b-256 | 057b203ba45557f29f40f579a01028193ff9d6bf9e046fb032eef70bac04e5ca |
File details
Details for the file sema4ai_action_server-0.5.1-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 8.7 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5df49cad524824a0e4191e664d9c037945e0ec336ea4314247975fe5d7702d8 |
|
MD5 | 2b8462a54b5153c4bad7ff6d34098253 |
|
BLAKE2b-256 | ea4ac44245e5ea40fb95ca1c2cda931300c1685cd707eeb5a412938c94bf8221 |
File details
Details for the file sema4ai_action_server-0.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 376ee8ebbd45a51bf846ce6e7fb1b4174f6bc4636dc4c6f984eaf8593c936a7b |
|
MD5 | a9c950d79a275233332dc2878f4c4c61 |
|
BLAKE2b-256 | 0df774eda945400af343e330925606d667c718b92846f78d59f5a70b1fc46a20 |
File details
Details for the file sema4ai_action_server-0.5.1-cp312-cp312-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp312-cp312-macosx_11_0_x86_64.whl
- Upload date:
- Size: 14.9 MB
- Tags: CPython 3.12, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90d7a4f09f00774f357c6f3cbd322b75faab233dbdda9de3130e1a42f1f76176 |
|
MD5 | 423b54922e30c0a2bed1c24051857a81 |
|
BLAKE2b-256 | 62cc4790c79b458c31ae4fa88e701a97e39a02018749019071aeabf035938be6 |
File details
Details for the file sema4ai_action_server-0.5.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 8.7 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a91f4ae1fefe9be6cc3abab15ed6a4727773aeb7b3cabde013d8dd523f3c625 |
|
MD5 | d449f0ff3440c2842db23854513cd241 |
|
BLAKE2b-256 | 669e2ed0fc35022925e2c0a469339904a10e374407b5665f156899b7d54b40e0 |
File details
Details for the file sema4ai_action_server-0.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a0816c434d38e3608439a08e85a24534b2cd2b571aed007e47d0c732e972fe1 |
|
MD5 | 8331461c49dc62ba506d78981c331ac6 |
|
BLAKE2b-256 | 77019d5d31da445ce838abb4bb5dcaf3f9baffcad0c7531d5f98e02f06a5a8ca |
File details
Details for the file sema4ai_action_server-0.5.1-cp311-cp311-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp311-cp311-macosx_11_0_x86_64.whl
- Upload date:
- Size: 14.9 MB
- Tags: CPython 3.11, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba4e3cec5112b1a11500307a946fa93cd1a8624b25d528a5e38ebad9c892c6f7 |
|
MD5 | d3b7df9dcaab2ede3fee18c1e22f3250 |
|
BLAKE2b-256 | 40c5145d8a9a30915cea29312b20ec943183219af0fec2e4da26a840f596d487 |
File details
Details for the file sema4ai_action_server-0.5.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 8.7 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1425a9524b1f0e3013fba24aed4cec079ea08dccbca21e63a13c4e62304e2dd6 |
|
MD5 | ec916bec5e31880d5eb09ea75f584901 |
|
BLAKE2b-256 | 0d26b93753d396f5d5e1b45e2e72ef72357ead283d1f13743f6fd914f484e3d4 |
File details
Details for the file sema4ai_action_server-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a3c726fd3c1c7d258c2346f0d22ca4b641505ba9d591619f24814612d1d99e4 |
|
MD5 | dc3c558c3e097873d58fc783fc41cf0b |
|
BLAKE2b-256 | 367d07af3213b6299578a68d7d7d3af7ccdc6c8dd38245ccbd6a80629db8752b |
File details
Details for the file sema4ai_action_server-0.5.1-cp310-cp310-macosx_11_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.5.1-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 14.9 MB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36c854fc81224781ec513e543c96b2e50bcd9f9510e4099d262a0f18b875d208 |
|
MD5 | a518c7b2128dbbc8d38773180d841cb9 |
|
BLAKE2b-256 | 13d70a6d6fb153dddef8853389752af8067827d2a63cc6fd0f1cfe83306dbb11 |