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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-1.0.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-1.0.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-1.0.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-1.0.0.tar.gz
  • Upload date:
  • Size: 445.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-1014-azure

File hashes

Hashes for sema4ai_action_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4377defe7d8b10fc2147ed0739f944d0bc7c2f2f745fab72089e4d6bd789d645
MD5 6006d25a6bb60d6e8947d38589abed65
BLAKE2b-256 6a760534c388e3f0a0a8b58716266c8424e523b9a8e663a8c9ce6d69dd60e4e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4efe8776848751b589da797fce1e0d59bd8cd9301c5635246cf03cabd80163bf
MD5 756c667a47d13dc66d9da7e30dc0c16a
BLAKE2b-256 df5e8451dac030f7e8e0cc4d4647ac2a3e98e460688cf3323a613862a1baa04e

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.0.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-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad685808d295c56a1a4389f0149e8ce82472030c394fd66e933b5a00469e303b
MD5 f09b74aae2772d062e131ba169800c50
BLAKE2b-256 4ee39ac3627fb7f64762342522f1c7caa4a94808c794ebfed3219ead3177e0d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 317fa143b10f41060977258911a1678f36d048c63389199fd85f4b6052354165
MD5 5ce561bbc21b986b1fdaea4c0e53b410
BLAKE2b-256 897698680e6ed6d35052590cf432de8327e1f8238f1d87160ed6a4009b08495a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5592af9c0aa2b4f8d753577b6b52c8cbe38f414d31747a7f17919fe7e50e9522
MD5 078c3e4b25edf66680d29534c0c7ce7d
BLAKE2b-256 8e6cd4b9f4437c887a741cb630e6d83f40212640ae877b0684c6c6f710132525

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.0.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-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 175cce7038620f87216016cf607ac59ecace60fa353ab42a63bbc6724ef4656f
MD5 098e937afde364a320a7ae17fdfdd9f4
BLAKE2b-256 7b509d0186f96695de77c63fef64783ee801c00106db7b771a394b0596e8cf60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 22981fc5814a7543dbb1bfb9066cc506b79b5fac433844431e59ad23e85b8445
MD5 93d481d2a0d66fa067e395db0e08fbb6
BLAKE2b-256 b1cf32ed2b1656c1665eeb721fe3c7f92af816d70ff8eda4cc2f9972a7d6de1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5cb2f822971a5431364a2aab9546d275e50a341f710b34b0a42f70f1d67295f3
MD5 1341875b4dbb531a7135be3c0d0f82d0
BLAKE2b-256 4c2a16e93be9b5bab448122c24e726c71115cda3704208a6a7b7898fafb08b2c

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.0.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-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 69ff275364f07985d0ecf4ac9341fd692176bf05da1bf59f243ae9fe5b5675bb
MD5 46700e93dd36e931861344834d187308
BLAKE2b-256 74bda0546d005b5b4cd08ef805fcc7085643b62cba717a3bccf23744910ca322

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 a2907cfdd9e368d8c4175906ab0dffca369876aae378f29d9865ebd8ac32bff0
MD5 04d318eaafa564f3ed1023174b618ddf
BLAKE2b-256 ebe1d7a7eea08addcf3d10ed030f91c0de813f4b1ce89810db14d61ed3ddfef8

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