Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sema4ai_action_server-0.23.2.tar.gz (444.8 kB view details)

Uploaded Source

Built Distributions

sema4ai_action_server-0.23.2-cp312-cp312-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.23.2-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sema4ai_action_server-0.23.2-cp312-cp312-macosx_13_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

sema4ai_action_server-0.23.2-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.23.2-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sema4ai_action_server-0.23.2-cp311-cp311-macosx_13_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

sema4ai_action_server-0.23.2-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.23.2-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sema4ai_action_server-0.23.2-cp310-cp310-macosx_13_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

File details

Details for the file sema4ai_action_server-0.23.2.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.23.2.tar.gz
  • Upload date:
  • Size: 444.8 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

Hashes for sema4ai_action_server-0.23.2.tar.gz
Algorithm Hash digest
SHA256 08d7a0782e9d896ab6344a4139db0bb8dd8461ef9897c9027385c349ef9f3024
MD5 89ea324c384e5bbecc21ae56eddb60fc
BLAKE2b-256 9b51dd96f939ce0a18455358d1cd688b44dfa9570ccdda38a927e145bf1fec09

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f5bffed77766f175ad22c4c550e39ba9cf5ea2d9177cfcbc9a40fc4d5036614b
MD5 aacf478d038cbab1e7f2861d8e959151
BLAKE2b-256 5338c8aaa1f603d2df8cb46e87a1cde24b51f7f8d36fe7c28e7123a314fc118e

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b923af67bcac016918d6b015a3a91468d9b18152eec399e3791441a9cf111224
MD5 216b98c4c8e2a241301aa7e42a605097
BLAKE2b-256 a2af46efeeac389002e9609e346a689e692d1c374c6690b37030dbc879b34b30

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 00525ccc410525098c976cadda314e75cfbcf79d4b5577b653ce05d04b8b6ee9
MD5 a6157f148ecc5a83df1cf087848b3af5
BLAKE2b-256 dbe85254c6b28b01124611f28e741fadb32c5ecb0b98255c67c1c279ef7d5c84

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 31aab1c7f054fde626ad6da36116f21de705374425f2961758ef244a16c4ed53
MD5 c9dfe25b82c97aae817b8c5d1320e42d
BLAKE2b-256 b98f5cbd4913cdcc0cfa1647a1a924e0816184e5862345e04885b285d3aa7d46

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e18a218e6cfea3db8714f2e105fe74e67701896807aaf7b900f1b27b1a26cc09
MD5 642eda2c441fe998540fbeb2bb6256a6
BLAKE2b-256 1457159f565cc70a141877e531318cd446de7e348fb0b40bec197ef2f40225e8

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 6ee7ce1ad6b779b01bbc1dfdf18199b3fe9c18ee59de51be19959f5b844fc191
MD5 253c4dd6807bdd407e3fe6f04a8107c3
BLAKE2b-256 f1e785a999fd56dfeee652cf02d486571b57d8b793b647cd886cd15b98b6961f

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0ed57cca93fed3cc986ce0bf3d59560c277c167600afa1823e59bb41e9dcd4b5
MD5 cc5c5ce7c6a59d0ed532277951658804
BLAKE2b-256 5a44563c2a0a851ea71fee2e9a3e5dbda32e8062406a85d6b61e10722f6714f7

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c7e4e2b0e1a993ee4ac7b0b1bb3beef6aeb778c0444e177459c64952dfecb8e
MD5 c49dd02e093863ba181972cc3d6246a1
BLAKE2b-256 b3e0df4c5bf7eecfdce57b2c0acde431000ed4791517e2ccfd1ee562af8d0579

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.2-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.2-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 0f36727aa1caf4d004152971cee0cb79084a5a023febae39aa5788487be7d7ff
MD5 3f7870de8a2b1a3b1178f08b8cdba957
BLAKE2b-256 f33e7d79d5ec7fad12420e51eb889f5ceb8160a7fc5833431260ae21c3969720

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page