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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-2.2.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.2.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.2.0-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-2.2.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.2.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.2.0-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-2.2.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.2.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.2.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-2.2.0.tar.gz
  • Upload date:
  • Size: 454.1 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.2.0.tar.gz
Algorithm Hash digest
SHA256 a3a44210bee20d5317986583e0ec4a9f1fd4f702e1caeadb33def92ab4e60e89
MD5 2b3cb0af73957fb001e6c864a9c6f870
BLAKE2b-256 3773c295c92d3f062c1d323131b70502f0f1739af4fc5547ae48131e656d8f3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3f533758d98cb88cf5a692cb586ad6c5b75f4dc22854f1c6a270ae1460058b94
MD5 074afe8c5b0f3a4397ee9379aeeb8d6b
BLAKE2b-256 d015fd5ec18ce15fa86318b450ddba79bf2f70ea6ce3be0ee1b7a8978ea34961

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-2.2.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.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 923dbce526bd60d99671b3c64461293078d3291d3ec2d57c1e00a5f0758448f6
MD5 c3316ff36fe3bc933829f7798ba99ce5
BLAKE2b-256 016a426a9652b70557555467a89e608a82a3b18cebf014973f3d03e86c6b9758

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.2.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 ce6be4fc6d95f7476df591ec7d21b466958caa4a328bb005d012b5bc4b74a710
MD5 278233e8dd681cc8a625e44875d55805
BLAKE2b-256 4f30b02dd33f8f2b57637a4c14b7ff8844533c0725afab61e25b9e9a805b7df3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 681f91034b0b2edc336266093fb53991b2f7ffd90fe6e96746fa05e652892923
MD5 eade6b4a045e86ca2e8281af8364381d
BLAKE2b-256 dc791df8c06ba8f4319805f5091ad8c2d9ff4cd72b0e9686f3dcf9daee183029

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-2.2.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.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a5a564c21e4b1c78a04b5e8a36cd523235b78a63a8de21a0c8f6b8762251971
MD5 0fec709dfa931c84487c24eb17e4f9be
BLAKE2b-256 c9ae3f5c05106024b02ea088e0ad453f42198a361898ec8540bdbb79e4b1dbe4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.2.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f6f9e7b9174db00274385339892896194914a0897e02456d1082c9f39e02d20d
MD5 def845527bcbd18df32c3a125def3540
BLAKE2b-256 21f3c5d301784de9ab2ec17153e30935ba018a31ce88dfec7dda8f1e7a01bd2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6e9337560193ad98b8092e762bcd67a6fc15fc63d24e2d4d2dc59a4a21e3139a
MD5 875d368704aef7654d09abefc1fe0403
BLAKE2b-256 0c1cf46d033de4e313376ec5fa6032e184eeabd1eb0315967664365dcb84ed32

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-2.2.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.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b6850b9340d406ec83fcdc443b3b2455971cccbfffc90d59e9a10fb13014f5a9
MD5 b7b4e9d580a5dd48349e181e83d8c914
BLAKE2b-256 772ba5353de67cf0479774e8fda40a9114648bd6eba810b78e1ffd466d16e74a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-2.2.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d636a7751a64c6c5d73d2370023a1a9ff725ef5c76c709ac1a4733c120f1e89a
MD5 e2c6240c2585c801d0cba5b6dc92db33
BLAKE2b-256 d49b6af21624bff943b4d421c49b4ecc72f1cf2100c971a3dcd6a7686be63c0e

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