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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-1.1.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-1.1.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-1.1.1.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-1.1.1.tar.gz
  • Upload date:
  • Size: 446.8 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-1.1.1.tar.gz
Algorithm Hash digest
SHA256 10b6d286f26b14824a65b8f84c8052a1c02356d8b323c065cb530aa5d7540faa
MD5 9a7cb278ef414aff46084f3a8b0256e6
BLAKE2b-256 349ae50afdf15b3d2e4d6aae91d75ad7b3986eed4f93fd581372a28e3b890ef0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 73af7c1d8611c6803ba6cf14cdf642fc0db3844fb0997f0d4569509220bf16de
MD5 5cfe198d9cd426a9b7cafb3e32030c9b
BLAKE2b-256 2a0d607e91a589eb11e7bdedab81d1d0afc0038b519d5fc51026851144915637

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.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-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cb7f44c2de37afe71bed507b8560f5d1f488a57509edd718a4f07a309fe42d7d
MD5 25d60eb2d8679df1c71eaa80ea5b9ee7
BLAKE2b-256 73f4ed08f1b89a823a3b6e7e3725e423a88913e2c9f18db7d320d26bd2c82641

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.1-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 235e4a74c7aeb7df1db87a809e5c034947e513d99cc4fc995d5a53fbb0570885
MD5 203d9865877fe29301e86bfa05843890
BLAKE2b-256 2ec3149a8b0cdaef8c008056d98239ce8333cc1ff61e0b533a67bdabb3c3f9da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3b32d54d4464b2936c2dd6c32d9591f4007c60dc57a61f878131727b971de9b7
MD5 8cd0dc29b621800b31febfbcfca7ca71
BLAKE2b-256 0ceaf60c4ef24264a77d2f1f1b69612cde50174e10d4e9abb22b365b0a7e71db

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.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-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e569698de38c508b5666c7ba0f4885906f8365fa20d8484cf422acc8736a0a91
MD5 6f814de9ef2af9dd6162ff95b5e2b750
BLAKE2b-256 22845b3dd3285b295b35300a4ef94c4bf2b87e6949a965c49fc5bbf0679e4441

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 3f91c3c6aa1ec3837196e97f091e864d24cf8274d3ee014fdd17307326b17eb3
MD5 3116478a65328087fd124730e543ab4f
BLAKE2b-256 8b494342d4a7241003928ccb64c88b866778973a160ba8adb85c2253f8e5c3c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5f0bc261fa815a0c144d26720dae2ad9a22390eef8d6c84ce478a7c72d2865f8
MD5 2b69e86a222298d9471b6a30b239706d
BLAKE2b-256 a125211feb47bc2c08994757b0d0eed21795eab19614b945bd8817600e105fd0

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.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-1.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93cd2db8a4bd8018b8a2547c426500a6c33e13a5239bc2ae5627fced0b4c7acf
MD5 393ccd3c57868f854dba71a7375c062a
BLAKE2b-256 8639e8c1d2e1ea9041254112da620c6fa34ce7a2b1cff5506a0cb3967929c188

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.1-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 dd4ebcbb4b7441c9c52243041587da8d84dc63e6862b11af8c1c0f94066c044d
MD5 c720c27c32f7e76fd1ffb9036fcda23d
BLAKE2b-256 831e2d8e7b94ca1bf74d1eba5c914afe38335f3a8edcf3c15e8368eba0f23c83

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