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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.23.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.23.1-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.1-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.23.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.23.1-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.1-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.23.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.23.1-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.1.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.23.1.tar.gz
  • Upload date:
  • Size: 444.6 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.1.tar.gz
Algorithm Hash digest
SHA256 3e2cd7f4372f5fe735d09c85d267f00468930b45e56f6f3be5624fc1c92213c9
MD5 c4c2ed1002ded93023929747b688eed9
BLAKE2b-256 6070ea6fa839f8d9e27e8acb0d4699a78d60563e42f9c9833c136e13a032cb32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e5cec73a98d6bd92c8c7cafdc3a90692d407161fd1e8c612eb5c6428cbf9cfeb
MD5 3a7efb50fc425939737414b3fb07c6ba
BLAKE2b-256 9d12d10482ef3692710b3cfb6b782dcd27edac3bc4267b628414e6b90f922813

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.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.23.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a787cd463cbdbc9a0f30fecf0457d104ee925604e79b583c5c175bce08f5b53d
MD5 d240e8e28ac4ed0e2dad604ebda4db75
BLAKE2b-256 378d9e2b943cd93ad5247e82b9ccb13d9cfefe232b88a32e7550eae834484081

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.1-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 1ba5a072028973b43b2b6a213548d5866eb7c70e9f96237f9aa401da30852045
MD5 153c237c6cd356d98746e3ea2d275049
BLAKE2b-256 c943faa34aad6a91f2f1a4a974cc39c769e1ad4206a5f58161a629ce303d930b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 066db93ba6f8192dfe6327c0a829189ad219d6c5d24f01dee41142c8fc816cc4
MD5 a97e127f2310f7d03197c15394ac3efd
BLAKE2b-256 6d31f8d9428a48edd08cfb0b927839eff5af20a428369612051cbcc1c16d5729

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.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.23.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 11f2e878312d94fda68ebe8a6f0c84b67bfbfeff0ed53d27c3758993f9a7c2b1
MD5 138857f412441f99aa249a062ecb119e
BLAKE2b-256 1b54d56233be0c5ced9123c0a50c5c007546acfd2cf6659843546c3b4b74a39e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 ab34469aae0255f4556464128212c8a1759df86c78782d683eff3b31d1e1a7c2
MD5 13946e15ed7e028bd6f82cc197d74f80
BLAKE2b-256 c3caf62f71c90a9f4cc6b4a157ad8f1e69ffaf3ea4bd3bfaa811f207babfa17f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 221d6d4647b74d5a42ed59306c754d54b032b33d700d0287f26e8a867b4e370d
MD5 53997aad2f8337d4821be6d004ba15a1
BLAKE2b-256 1a96930e92a84a1ca1755bfafd056c6b194575c0c667e7c16ed45d821e0cde2b

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.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.23.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db97481f4ff47a6241ed1dcca21841b50f02cf1a85c5413ee439e38cab1701a9
MD5 854063e8edf14b21decc0d3cb505e675
BLAKE2b-256 c9dcd7a12597d0cd2a718d45c5eed068f5f82cd42fff18f6c5e0b0c5fc66288b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.1-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 7528cbf06abf6ddb4b1b0f1feddfde4e5b496720d8a9f7c0f98d9f07b27bbf9d
MD5 aaa150297b4cd4ba7e572fb7ab6e70bb
BLAKE2b-256 a6651f9b2b341998ed25b013c7fb7de014cfe57b12d54b40ac405a8592de2ff0

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