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 Distribution

sema4ai_action_server-0.6.0.tar.gz (393.8 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.6.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.6.0-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.6.0-cp311-cp311-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.6.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.6.0-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.6.0-cp310-cp310-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.6.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.6.0-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.6.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.6.0.tar.gz
  • Upload date:
  • Size: 393.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/6.5.0-1018-azure

File hashes

Hashes for sema4ai_action_server-0.6.0.tar.gz
Algorithm Hash digest
SHA256 f57aaf88d84b75ca87fa98cf092e8cc88544dfe3902049f586cc1700d3b52c47
MD5 85996091f9417a24168910ea83af314b
BLAKE2b-256 e19399c0e6955719011a9ca6e30a3c0e949c4fc131691030e628fa402c91f4ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.6.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d7ea8a85693160f112148efae3703e9dd5cce9b9900a684c83cf9f3f69bd6c79
MD5 8e92668903ed2044b4e652552ba08e6a
BLAKE2b-256 604b3839ced9c9669b9ae17eed1f4f37e646487f0a199d6949c706fe83e96f44

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.6.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.6.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c0be97aacbb30b1aaea382499f56ddbc5ab6d3a2047f7eb80228517098aa2020
MD5 f1589908570c3a50e2465b96b1b63f5f
BLAKE2b-256 4f79b85818ca9ff5d1d044114b9adcddfe611123510ffd1de8d5d6df0965d5c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.6.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d343f190d8e7f4d7ef735ff9b5be88f034ba6684ef6478fe767a27f2e66bbcae
MD5 3329fcd90e0e598a7cc93c5f91758b51
BLAKE2b-256 5273a73c972757feef5d9e5659e12a887e6a8da5b0f6a3145db39bdf0530bb7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.6.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ec65db072f151413da5d9c17066fa605e6fac4391db0b3c433e6a626529e68b6
MD5 5c537622e41f23a16e01826534f8bf25
BLAKE2b-256 7736b23f81bb0de8a3ade81b54b8d9514e15d3f401b14c4c29aa1a168b1fb32f

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.6.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.6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 77e1ae4f0c4ba88a8209e2bb25e836c60bbb0d8e01ec365afe5efa1d7d97f9ba
MD5 5d372bd4842c6257c87c11f75d9191e4
BLAKE2b-256 0e912205dfcf1030c04601293b4dca265e7aa3516b9bbe17c00daeb589b7ee19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.6.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 344fff95733a507644cd195ea81b2f165fdd948cef48cd08e3ab32b22316a885
MD5 f4ed57dc17a5e062511b4701281d1291
BLAKE2b-256 11a8cbfcb32e83553059f820f51d863a2b4b741f03e9460a8a5de74b1fc7cf5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.6.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 435c78b982f9ede9f54d4752c919343522bf2add294424c04029cbc31739ba05
MD5 67477d24ded56d6e8907a9bdb2800818
BLAKE2b-256 d13f261e62cbc8401ecd55e119bb75c3ada666dbf0674129b6617480f74942c5

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.6.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.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 48abad43833c4737f391ee502ce98916b857024a4ed3605d8a9ba8f7c968ca6b
MD5 5b81f59f124f67e7cd009f477008d11e
BLAKE2b-256 2409c6aaf61c8a81a9f505bcc29839d5b934c32e09b378903caed3e71fdf8189

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.6.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 317a610617285df99a44b306b35f37bb1d54dbb4ef992344ff60edff99785173
MD5 c57880e9585b76d7f199c0903907f90f
BLAKE2b-256 4d053e39234d4a97b5d1a94474e0c7a5f30b1719a91db7deb7d84c90bc2dec22

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