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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sema4ai_action_server-2.0.0-cp312-cp312-macosx_13_0_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

sema4ai_action_server-2.0.0-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sema4ai_action_server-2.0.0-cp311-cp311-macosx_13_0_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

sema4ai_action_server-2.0.0-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sema4ai_action_server-2.0.0-cp310-cp310-macosx_13_0_x86_64.whl (15.0 MB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

File details

Details for the file sema4ai_action_server-2.0.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-2.0.0.tar.gz
  • Upload date:
  • Size: 453.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for sema4ai_action_server-2.0.0.tar.gz
Algorithm Hash digest
SHA256 d361a5f17490aa7cc9f6c2a1c737e3c2c5fd9d4677e6359cde7f4adabd5305d3
MD5 3c078cc69f15248afaeed02c8d176e86
BLAKE2b-256 ba05984ffe8cb0e99026376fc04d05149deb363e0ae32ee15a94c3d3fe07b864

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0974616fb6df05387623c88a06afd914bf626c222ee12ce8938e9d14510a53ae
MD5 819d88866bc1f0707173ba2d5bba9fd3
BLAKE2b-256 be3462a79589c39bd2d7713e691958d8e2bfbca7e2b934c68ccdc87b1e9096df

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-2.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-2.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 043449ae7b05e59798e376a054b38a537dbcb60d52fceb67cc61a056d6a280d5
MD5 d9cb2b4c76bac691ad29abef4142f29d
BLAKE2b-256 6fbfc133e86a443bb0cab6b8973a028149d9e5054edbc7ad4ae0bc9667bed008

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.0.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 cebe2a390c0a16f8e70fb574698078539476cd5992b54c11fbbd2030dac5fdab
MD5 b131be76336486a95a43a9b1e5c319b8
BLAKE2b-256 776b4c08a2ebb1e8bdf894967a045432cee0fd5d4f207ddac2aa24034c2156aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6ee8f7d61cceda87c8bcdc85a287bc46ad6350235ecc5fa186921f11438b5cfb
MD5 66d1f1786e8fd6be47b589fc240251cd
BLAKE2b-256 c0b170f14f48f5e4e08ea0076d59b72ba57ab338c94e97106318105203527a1c

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-2.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-2.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 bc8d5e451cdbf1510ec5e2436bdc7e172c8629925672626eae9a3f337160a370
MD5 4504c12fb2db36fe0119bef60ee40855
BLAKE2b-256 7d1cc3c85be74edf0f44758b37bc1f491eaae0ccce164c524b5cc385ca8bb8b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.0.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 3f3ccbea4456b3e218d75e246d415eb511245c700f3b57dd7505e4eddb7f8406
MD5 2c6bb29c8c911d83430b829739b992ea
BLAKE2b-256 d2e391b63b8f211cc692db82d35d70fae933539691a9c79822af35714242d361

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e066d8656d110894b5fe7d66ac7c6009479997fe77c23dfd6bb5c593d8a61f5f
MD5 956ab2b4a866d5f46298615d491ec46a
BLAKE2b-256 112c995cbfd1beb01ad46aa65d2d0815dc411054b40da627e5a249436a9c2d8d

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-2.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-2.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 64e059b5ad576f8599459c60172b55f46dc110ce4e847e2c07ba08724f742f20
MD5 d366e0c6ec91998d4493c5f519555e73
BLAKE2b-256 0abdc3a81ec88ae6f11f81f90ec576ed858d005adb66a90b33f7e24cf5be447f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.0.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 7c521b239f15cee68ed42f338a8df11998a4b428d53621fe5f565fe4efdc150c
MD5 3ef5f1dcba49d976f6e86dc212e9930c
BLAKE2b-256 363242c354efb059bd64cb0964fd734c250abbb766ceb261515bbb02e5c83643

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