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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.13.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.13.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.13.0-cp311-cp311-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.13.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.13.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.13.0-cp310-cp310-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.13.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.13.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.13.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.13.0.tar.gz
  • Upload date:
  • Size: 409.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1021-azure

File hashes

Hashes for sema4ai_action_server-0.13.0.tar.gz
Algorithm Hash digest
SHA256 c65c1b8786221bd3b8edef82bbe3166df16a9a3c99759ecd003a4f9f1e731d8a
MD5 199982e608fca90fc7da8b248e131598
BLAKE2b-256 3d56a494c97a4e551e92d77fef685c1396711f1374dfe28b8619328811180f69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.13.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4bdf2c3c316305372d5a2bf183900e95fa82cc381725545c95794124dda9f10c
MD5 a03331452b958c489ddb71762a7811e9
BLAKE2b-256 cf7e42d1f794f6aaa5ab2893e32b8e7b49108a8611a3b77fb4e41ce455d1c8ce

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.13.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.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 996edd3da4275b278eb328c226966d778500f339befd9e2160e5a86a46451ee6
MD5 b9314083f5a7283d379cc40114d9ebc9
BLAKE2b-256 3d1c255f7a969fc3fa7fe01bb83144e27f7a34709b5029313e0b281d31b31a20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.13.0-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 3658e0718041f8ab240dd5586e94e3a3ac25a99722ea6ccebc6d23f7f91f0ad2
MD5 827a3ccd38aa54294f56883f4663d852
BLAKE2b-256 4b3b38336bc3034b6c8d73e24b2638c7153d4076c8af6089a7fb9debb618c860

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.13.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a22f77b1c3d34e5171fd6d72b2d21cbbafeb7a24c7b813cf77aa45673347cc5a
MD5 9da1ba2251faf368600f7afed71043e5
BLAKE2b-256 fa2689ded7b3717ad670489b92c97fc3d3c75e5888a62ec7e52b993532a389b7

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.13.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.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 327d911bb77fd05aabe6a513477af404858cfb0448238adf625720549d829669
MD5 8c04b307fc168d6054dfc60c4416ce51
BLAKE2b-256 3353a8494a7317af79688ce6714d7de79a0ef5818ae064494b87a09ce08753bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.13.0-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 9c7c94c9d707145ff356f101aefa14e0a71c53fee4567575e57599a4a380661d
MD5 003bc979ec5d6f978cc7119cd8f5e9e6
BLAKE2b-256 fa4f5f191f6123236f658bceaf1fe7e180e4e195905a7d72165d4287e6543f2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.13.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9bebbf6c116fc92d952663e9814e6647d83e05d5624cd226e23811f73268ee8f
MD5 bb5c7f465fb273eda428c24e7d935793
BLAKE2b-256 5937be3084deba10c1086981482a54f53d80a3cc850ae7df6b8d8283acd98d04

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.13.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.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e3a50e000255fddae57118b9f06f0e4aae4368612de2125adee5c74330278343
MD5 a55ad6be73d0785cbeef2d66b7eb3f2d
BLAKE2b-256 50166a6cda383c152507b9cb26c9381371cbbb6575a4abaf3eb7b25d9d61365c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.13.0-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 33275ad06d86f3fddb78991230424599de10f030fbbbc353647fbeeb0305e45d
MD5 394b024e834189ef723b16c26589eb46
BLAKE2b-256 9b45dde94454034f53440acd64401d6f4451277d02ca109367cf810c74ffb9a6

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