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-0.18.0.tar.gz
.
File metadata
- Download URL: sema4ai_action_server-0.18.0.tar.gz
- Upload date:
- Size: 441.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d72cebe9526d4a627434f4e4e480e440140dc107ae7e2fadea5e98feed9194a |
|
MD5 | d3a63090c39cef77d3d52acf67cda830 |
|
BLAKE2b-256 | 429b53c1f88b160a17734cfa9adf2eb55c61bb5e97e7da1e5320e49f6c71493a |
File details
Details for the file sema4ai_action_server-0.18.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.18.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 | 8c806dbdd2fa7fdf313a8edc07ace2a6dcc1c1bb5e31d14f5fdbd8d4c796e56f |
|
MD5 | 1fc47e684290e68959a8b7354a1f268d |
|
BLAKE2b-256 | bdd7e8b0833a29f40d23d54cbc55e48dcf2bc6a5abcee741e09edb9896883f8c |
File details
Details for the file sema4ai_action_server-0.18.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-0.18.0-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.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3b2df37b79f0f23bda905d2ae98c3604f6ad37bdd19b27d54f9b2f43ec1a66e |
|
MD5 | 1217da809d6aa46ad55a7d67514b3a82 |
|
BLAKE2b-256 | 04147e654e8bbd49783b16dc58e8343e8185c8cf7f7e56885e148f04ea8e6e2f |
File details
Details for the file sema4ai_action_server-0.18.0-cp312-cp312-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.18.0-cp312-cp312-macosx_13_0_x86_64.whl
- Upload date:
- Size: 14.9 MB
- Tags: CPython 3.12, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07a7ef65bea3e37f22906ea1e4d2eaaef94fc1828ed0b58206d0156a4712b6de |
|
MD5 | 81c4cf3a9b8d15749a0f4ae29c193270 |
|
BLAKE2b-256 | f78b6277fa52a72a7a84420211b7fcf517c14dc469f98c4f8ba5bf2a1cb34f7d |
File details
Details for the file sema4ai_action_server-0.18.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.18.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 | 6f5a29ad23ab8fdae0cabd559e99f4a6f9ea0754c5780e31f981cf3dcfe72d94 |
|
MD5 | e8d109a11611d792731a993168f6a6db |
|
BLAKE2b-256 | 90a484359f6e15a7d7a12657c297c8caf8b26f7f1fedccf02563630eaf0ce188 |
File details
Details for the file sema4ai_action_server-0.18.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-0.18.0-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.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0e28b0cc78e850f889b163a2a8e0cb7d1d3207d909d8378691e8ffc8108a7ba |
|
MD5 | 0a4b56e5b94d32ca728547b6b3fb2665 |
|
BLAKE2b-256 | 3c575a8e8cb9604793c62ac3f30ca2a8adc97aa1fe7bfc0b8f89bc610fc8db48 |
File details
Details for the file sema4ai_action_server-0.18.0-cp311-cp311-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.18.0-cp311-cp311-macosx_13_0_x86_64.whl
- Upload date:
- Size: 14.9 MB
- Tags: CPython 3.11, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3519f71d51df5f7b43d4a06ea49a4dad50d6acb82de1a954a1c5d4f52314c548 |
|
MD5 | f3e3a11841fbefe8d86833e681dcd171 |
|
BLAKE2b-256 | ba065cc632d29532aa022fe5c6a125459620d56785e625fc2175fb4dd763412a |
File details
Details for the file sema4ai_action_server-0.18.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.18.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 | 2bad57ed880d43c86378d66e5697e9c62c2ceedc0a41af675db784c1dd133eee |
|
MD5 | 8abe5e054c0eedce23e15007905cf65f |
|
BLAKE2b-256 | b7f60735bcb23231df3c2a3cced75832812657cd1f9259db91bf654299436ad9 |
File details
Details for the file sema4ai_action_server-0.18.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-0.18.0-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.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2833f9c82c34e5777755f7340f3a03c934f1213a477f34ac863ee2c7a0270f5 |
|
MD5 | 839bca3feeb84cd5b40a84fe8c568964 |
|
BLAKE2b-256 | a30e8deb89e29762f736b7a8dc6e17993998712b7156836628495fc01797824c |
File details
Details for the file sema4ai_action_server-0.18.0-cp310-cp310-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-0.18.0-cp310-cp310-macosx_13_0_x86_64.whl
- Upload date:
- Size: 14.9 MB
- Tags: CPython 3.10, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8966c1101eaf204e28fd36ad327d3b819746c0280185dfbdf93e5e7004c56f1 |
|
MD5 | e49640ed269c1a666870afeef6f908b6 |
|
BLAKE2b-256 | 10acd96662397098eaed817fc95b8b75fea1b9a33653e838df15b3b0582aa1c0 |