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://sema4.ai/cdn/downloads/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://sema4.ai/cdn/downloads/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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

sema4ai_action_server-0.12.1-cp312-cp312-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.12.1-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.12.1-cp312-cp312-macosx_11_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

sema4ai_action_server-0.12.1-cp311-cp311-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.12.1-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.12.1-cp311-cp311-macosx_11_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

sema4ai_action_server-0.12.1-cp310-cp310-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.12.1-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.12.1-cp310-cp310-macosx_11_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.12.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2a505024b799b7dbd087e0f9bd5e2881eec283b6bbdcae317dd8f3fa08c881ff
MD5 ddc6bb18cab67c2d9c799c1bd6d8acef
BLAKE2b-256 60209e32a25ebec2fe9924a728697a2153c25cbb68c017b408f9e4442b0ce292

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.12.1-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.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f42b17811db31b0da0ac3e3926fc8668e94ed879414bdb01d18a569cc5606354
MD5 6267bce611c98463c1dd2e6a7a1da4d2
BLAKE2b-256 e955e9a12155963fd078757c8a168711b6cab6ec6aede345bfa27c7d04c6c21e

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.12.1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.12.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 61c2c4d127698c67a1d0f99e489929d958a7a7ad58911e45cd1981bf6af42dee
MD5 905a6d67a1c9b7dcf984519ea2507313
BLAKE2b-256 b5412416d04e77b3d2946d8e7f113da59cffe812e5bf7e6341f066387e365204

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.12.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fc3b49eae3cf992907063288d9ec13c5be8870eb91a3ce43441ed11324ae494f
MD5 7ecb02f543fd32d41f38b6c53ad9791a
BLAKE2b-256 cbfab245e03f9fed2bcd52ce266fc70b16a00c47ef3aa2b1866ed1e2d2c928ee

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.12.1-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.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a59072c0b88646d35d5e22c43490dc73a95972fcabeec82e22b1776146b026b
MD5 48664a3a50295ff273478c2985ea0b91
BLAKE2b-256 044d4dac2249f7ed5b168af92b52a2c13f9f308c58bc1a17ce1bb4cda7d11413

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.12.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.12.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 50f5d841a8262d926752e441f37ffa91ef385a5a45f66a3ef0a4a8599d160b63
MD5 32cd3df9736cb2e1da299ab9b8ac08aa
BLAKE2b-256 d5506b520b96db184173fe5ddafc515a64b926ee163c50eb149db6da5642a0b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.12.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 83b56efb09288f3cfa0d646111f309c651b6775fb9a23c9b882cdef218a01006
MD5 defe5fb094734a333f0b42366bae58d2
BLAKE2b-256 d6d49e4a1d06cfc24c687e0aebf89e9053a92b9a858eea1727d75a0b5ca00095

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.12.1-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.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb1afc0f94f75381e02b6b67b8d485e2bd0b820ecc16c89a0b6f475f0337d354
MD5 0565d720f106e8aa15b10c9d11f9a7a5
BLAKE2b-256 3045bce04f97d805d9bc85d9af9a781fa6f8d4159950908ebd12bf47b95a3669

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.12.1-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.12.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 e244240455a6c177f22708d0b535cd14dda8baf12fbdbc7c7e8104fa22c993a9
MD5 70cb40493ef3814cf42d549beeb0edc1
BLAKE2b-256 01337dd352aab943c8d3c9f8ffe72f598114da6f8e4fea8175688ec64a0e05c6

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