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.17.0.tar.gz (440.5 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.17.0-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.17.0-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.17.0-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.17.0-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.17.0-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.17.0-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.17.0-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.17.0-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.17.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.17.0.tar.gz
  • Upload date:
  • Size: 440.5 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.17.0.tar.gz
Algorithm Hash digest
SHA256 b3f5db89ee5fdbb4e9225f39ed364dc13a50af080d921de4810b55b2f45ed169
MD5 9fc0cb6e0720056d38df4b284a87fd35
BLAKE2b-256 6b46c0c602677692de23dbec50cfc5e9fe16b1653894dee2014acd2315ce8058

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.17.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 96dd8f8866c4bcdf895ce7c7f1dc231b3576e132a9939456af0cc20f00e562fc
MD5 d2036589a784447dc5326b485a60cba8
BLAKE2b-256 8251902ff66e93f25bb64cb07c9ca7752c2fa87aacaa0cc2f7cc0a0fd382ec5b

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.17.0-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.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e0c0c3c784d20858d92cfcdf003c71f4f7ff9a0441a6b21e5df33912f6eb0168
MD5 d0aa72f11d7ff37b490fc339e67f2c84
BLAKE2b-256 8f31f9a3e1c06cfa5f6e0f3f246b4189d35c1359460308878f0abde4341dda4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.17.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 b852fa9a6038773276c4e081cc1f42a6a97a14d48486e6e8e542ed49de8a4429
MD5 8ecaecd31ad786979fa7905495513926
BLAKE2b-256 d8d856c82c19bed03cac55b838bc9b3f12578aefad305b7f1aeab8078de3627a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.17.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 be4b5883ca722b0593f0982d45eaa8bc6e8b3b5203e2ad5fbd06fbfc305b121e
MD5 684ea6098d09d7f6024c10e62e8e1fd3
BLAKE2b-256 941af880bee13b1e679740235e592faa95248021915508c27d35d9a3f06c53be

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.17.0-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.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 68e36bdb04dbc3a6d311a18d57de4d78ae529df245536091c761aa2b3b3f59f0
MD5 54742db10eacac119aa3b8b3f46e1f5a
BLAKE2b-256 94f1d3117b24c186fb68a0ef736f5d415b2675a6fb02a4e3d5e0ea821291ddeb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.17.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 449ffe1bc2f071cca45cc7b699765dada0d1289471f977c1b4008925775f345c
MD5 67b371337d746efe82aa6dbef19137e0
BLAKE2b-256 5fc51e8d747aeb40e97727593e32c78b4523c137a9c94e48274f10ba1888676e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.17.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 544765199416b4174d78a14531e7570f3ad7aa7da1a0d5a9625d99cd0b71f7c0
MD5 04c2522cc51dd51a7f5632ad3640b987
BLAKE2b-256 14d4ae9379b85e06916fb6423c519c10fa435d72cbc83c3f222a141bfb8f7ddd

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.17.0-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.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e22a425391824b10c0d00f65083ab5106d15d58b1c589a70f72e297878c4f02
MD5 c710769a8bcb68bd8991c0c7d4f364ba
BLAKE2b-256 5e44a4312fad020cf87378c9839b37ae50ce1b22e9f9bbabf38735a3707b2cec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.17.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 2703a59289bb0e9f351c7a6b6a95e8f5eaf9b5e1262f28463c3f9aa54c18370e
MD5 3daa41e30323188f0909725b61c9330c
BLAKE2b-256 7270e92e73f8da19e4ca0233c2bc53128f49dc6f5cfa6d507c21078e03a8d022

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