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://cdn.sema4.ai/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://cdn.sema4.ai/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-2.3.0.tar.gz
.
File metadata
- Download URL: sema4ai_action_server-2.3.0.tar.gz
- Upload date:
- Size: 454.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aed8f368292224d13da35e7d986fb801073c029746da59a7624af16ccbf03d19 |
|
MD5 | fd91bec25c73c6b27afd596b3047c92d |
|
BLAKE2b-256 | b598698250a9b50f8d95632960dbef624a1899e25fcb7e0d7c4be96ce400f895 |
File details
Details for the file sema4ai_action_server-2.3.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.3.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c96e050f57f7c3bc477cf3a04152fd2e1419c7757540eb2db25f4f8fa226309 |
|
MD5 | edf980ee57b994b520d1f43cf9e63d2f |
|
BLAKE2b-256 | edb01df00572dbed493ef4c6e61b9f9e7871249892eb6345680d8e31ea4b9cbc |
File details
Details for the file sema4ai_action_server-2.3.0-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-2.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.8 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.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d420388ea5394b95fbde85421cd4aed003eeada34fca80b690628ef86036c2f1 |
|
MD5 | 0087b0841aa10909b99c81cfa2a0c557 |
|
BLAKE2b-256 | 745bb837c301b43fd820f3d5416a601c7b24aea926e5408cfeb761baf77498fd |
File details
Details for the file sema4ai_action_server-2.3.0-cp312-cp312-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.3.0-cp312-cp312-macosx_13_0_x86_64.whl
- Upload date:
- Size: 15.0 MB
- Tags: CPython 3.12, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 983d6b49c335ec24cad2b507abb400522af4da9ed8132a39648d6b287ca293de |
|
MD5 | 3646898bd99543d9411157945908e4b0 |
|
BLAKE2b-256 | 8a3bfc752c76301266c4043f46825ab07bf5fb1f734ea627ee11563ab2349e37 |
File details
Details for the file sema4ai_action_server-2.3.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.3.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96ea4d443346b790b1e63923f7c56eb7b9f11c47b346ef56692ed85d42e3acde |
|
MD5 | a5e5a24dbee9547b865b267671562b77 |
|
BLAKE2b-256 | 3967d52f9a89dbf0118e8ec065cdf94dae04cdfa747e4e4e4b74be263a0bc668 |
File details
Details for the file sema4ai_action_server-2.3.0-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-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.8 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.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 426458efa501c11acd332042ec62bcecdd32ed81fd7af486868851c6c0cbf680 |
|
MD5 | 970c07a482e4371d12d14460ca1b1508 |
|
BLAKE2b-256 | 1edba0ee5ef456e63769ae55e7edf9ad6f25ca9ed5c17c12523c7f3444f3e097 |
File details
Details for the file sema4ai_action_server-2.3.0-cp311-cp311-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.3.0-cp311-cp311-macosx_13_0_x86_64.whl
- Upload date:
- Size: 15.0 MB
- Tags: CPython 3.11, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 251688987e7460ea09f9a6461fcbf50613d0850a2a27d5ca2ee0265313b34a29 |
|
MD5 | 4ab229cb0e8723398c6a20495e882a1b |
|
BLAKE2b-256 | 347e8bb74804894b4241c0475f1609bf6b3155546bd1d18633783e236010e9b2 |
File details
Details for the file sema4ai_action_server-2.3.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.3.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 8.8 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c32345e1ad36c56bb77faeb238ad5fa908998cf7be016cdfbdc8b07c3a4ba119 |
|
MD5 | 63148bb1f495a3155066b3c52fb3c580 |
|
BLAKE2b-256 | e773dc97ff53483004bf3d6be39765bb1ad0bc1c2caf15a1404a099aa9cbfb75 |
File details
Details for the file sema4ai_action_server-2.3.0-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-2.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.8 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.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0a8a473c7ec5ec4d9e622e196ab7620ffae7a72b4dab018e125ce3b31d01c04 |
|
MD5 | 474a96d2039bc5575f59639af37a2ef2 |
|
BLAKE2b-256 | 4157f7191b5d8df48f41ffb7401d2382c8b2bc60ab4a8680f12e623c2b32c93e |
File details
Details for the file sema4ai_action_server-2.3.0-cp310-cp310-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.3.0-cp310-cp310-macosx_13_0_x86_64.whl
- Upload date:
- Size: 15.0 MB
- Tags: CPython 3.10, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4756ae797f7b3f1a4960492b8b2e0f70538f4480cf2446dd77f63808e711c322 |
|
MD5 | 9a8baf2796c3cc994019f618353ded58 |
|
BLAKE2b-256 | e282db6be6ac6508ffe0eb666b3225a3797020670e6d905048543eabac062e4c |