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.1.0.tar.gz
.
File metadata
- Download URL: sema4ai_action_server-2.1.0.tar.gz
- Upload date:
- Size: 454.1 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 | 8cf42a43cce3da3b2549a5d540bcb4240c2c9eb45a25f72a2eead5dd16f92cee |
|
MD5 | 6e44bb94e077af7161dc840e30d47510 |
|
BLAKE2b-256 | 34fc4c1dbf04a7a6677ab5724ee83c23f5ae638a4202ad84c829812fb2abdfc6 |
File details
Details for the file sema4ai_action_server-2.1.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.1.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 | 4196342e3367dba89f101e353eab46bfe0f1fcec375addf9e5f2de925205a1da |
|
MD5 | f40b364400637e6d3a2870965ce2fd61 |
|
BLAKE2b-256 | 2476dfbeea0e6baed7050749f47ac7f15eedaf978d93e2fa00850936785faa4c |
File details
Details for the file sema4ai_action_server-2.1.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.1.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 | 1d9086272e335adb16b8eec02738a3a7f025affcddadb3fcc6a2024a65d150da |
|
MD5 | 6274344535d9423d689a0e290141b971 |
|
BLAKE2b-256 | 821eef86035a941616465b6db44cce1e5c7342be648b1d63fed863fde9ec1a60 |
File details
Details for the file sema4ai_action_server-2.1.0-cp312-cp312-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.1.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 | 41f3545e81789434133fc6f51541ca6e24281ecefcc629a7e33ce682a867cc46 |
|
MD5 | 88de111fa0c7650400bde72a8767fbc6 |
|
BLAKE2b-256 | cf078cf98f8c453b49c3eaac50557c81ecb899e39d11c5da2899c01282974a00 |
File details
Details for the file sema4ai_action_server-2.1.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.1.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 | 9e263f4ed54db56418a6f95573fb2ce5d122615299218cd437bfe5cd0fb2f10e |
|
MD5 | 8b7b5bea90a2561e2c8e896f0c18ce5c |
|
BLAKE2b-256 | 2a8dbcf200eaa52cba29165a4048c97938f9e2642eb6556cdbd814bf5b1e8e27 |
File details
Details for the file sema4ai_action_server-2.1.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.1.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 | 7109b560a58bc46133d71caa7156cf7284b836b0bedeca786fa37787b43cb743 |
|
MD5 | 2a0b8244b38ea9942adb720546e46d90 |
|
BLAKE2b-256 | 8c5f42dbad4076bf4b464b003ca518394dc00fa3360f4094647323bb63bddbf8 |
File details
Details for the file sema4ai_action_server-2.1.0-cp311-cp311-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.1.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 | a4e07b6ec0589ab75850ac7bb22d9fd11bb7b297d96eaa570fc0f22cd9a47cea |
|
MD5 | aba6e2c62d118b6dc89a8d268079727b |
|
BLAKE2b-256 | d23e5cd45e7971d1b5e24a781e873e6cfee7ffb37de800f87db8a922385b166f |
File details
Details for the file sema4ai_action_server-2.1.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.1.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 | 9947f9d9740692b1fa62c7cb8d06a1f66deaba8e5fd44a0281d5cf2d71595f11 |
|
MD5 | 35498da0343a592041dae838110b7f8a |
|
BLAKE2b-256 | 3bea6cd793ab4df9193b428a8b8f049d43be6caaf3cd538fb60c4e7380a9d14b |
File details
Details for the file sema4ai_action_server-2.1.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.1.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 | 44345bf9405a843f5953554b30a169bbf67d77aaac0eb40c487f44bef26dac50 |
|
MD5 | e486d0171f68a2d9c215b9151932f3c8 |
|
BLAKE2b-256 | 98f0488733fe3f4c4629ed458ffbde07fc296308000b6698f55045776c3f0f3a |
File details
Details for the file sema4ai_action_server-2.1.0-cp310-cp310-macosx_13_0_x86_64.whl
.
File metadata
- Download URL: sema4ai_action_server-2.1.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 | cca6626a3fad04f588c6207832dd884eb285a2c5ea645cf3ef85f2ab12423002 |
|
MD5 | bea2855ff09814f4635d8716acabe896 |
|
BLAKE2b-256 | 1b5ae6e77cd8e88b460803edd8e4579b7831f03011cae777e38305576da5857d |