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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.20.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.20.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-0.20.0-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.20.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.20.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-0.20.0-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.20.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.20.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-0.20.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.20.0.tar.gz
  • Upload date:
  • Size: 443.0 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-0.20.0.tar.gz
Algorithm Hash digest
SHA256 442f12442a0758114155572f6c68eac019446d1f71b84993f4271bb25080d01d
MD5 233a29bba85cf5a1373bf001e5d4965b
BLAKE2b-256 6d21156f04b1c0527ac60a46b8545c5e1af021b1c4cbdfb2eeb22455b5c44aec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.20.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 97f81974dcce84eaeb6467322c0e2745198a8660b90af6c4c83e0bb801baa119
MD5 2cdfba0366a228ca9e6a5135bb9982c9
BLAKE2b-256 b31f82384686c85cc770dcf8631f14a12e3bb2e3c255b81ef2b66d26874862e7

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.20.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.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 beac2a7305135ae8e3bea25e6550f785212155ccb3b3e36c4ff3541560fc5329
MD5 b6793c8e6f410aa6d8325f5e3ead63af
BLAKE2b-256 68d920393f8331715fb7dd38b449c70a86d9709b9d00d292a8f325b7d8854c5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.20.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 2370dd091402435d3a0d58b0ec1f09b2b113bbb17a38f963c21fb86909a0e211
MD5 bc3f1db1f8b1d1f014f800d9f436d8a4
BLAKE2b-256 cbfca6910ee262dbf94256e12c9b65058116a5cd19d7fe5d954a7aac5a68555d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.20.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3e26ea09c0b3afc132596da10d5fd6e408e7ed10688847c116d18d22e4629efa
MD5 e1e38b66af24296ad1d8d209a1570b7b
BLAKE2b-256 cd0c55567b4c4a495784f35af51ddcb1f6b709e8ad739e7f36d2499850d38563

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.20.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.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d95cf6ee23f1a596fc386d5d862fab7c360f8c70ba1273544f50e05e3526dbab
MD5 f93be3af3d62757519f63f6bd7496a93
BLAKE2b-256 d920975d18e5d8940c49ac485968ee62026b8fd51b948c88d9ae3501a0b32c34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.20.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 1422287952b62e2013de49a6e1c14f4348bebf578dec1a11abeaaa92e63dd168
MD5 5254c5233e78156b48f1d82a75e00f25
BLAKE2b-256 88abaa6078f7a7450cad713d0875b2f6db17585ca495f88709117452c6846883

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.20.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7a3bf55d3266d1fb4e116fbc3c48747261fb901634e4a4ff1a85b97b9ea40bfc
MD5 db39ca905dc1ece4e8c66e7ba7e06813
BLAKE2b-256 91a85600ccd87d77e4cb4f41e1f996a13519f04435ee3007eda437099a8c5dd6

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.20.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.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5dd0ddd09f99e9011233d4bd1642997cf748cde6b5aca03e9e17ae9123a12bcb
MD5 b4180a8af54b835909e515c1c5d04eee
BLAKE2b-256 4d155820a91d2ebacce4cbe432ecaebada4f4041e4eb8f46820d30a5b449c7e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.20.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 334efbb966811e48cf5cc92c357eb4d2443e246e4cf60f1804aad41f9762c86a
MD5 78ee38f942049995f24bc7907d0cecc4
BLAKE2b-256 d8b41e23875156cafbdd1b68b480fa505d9d8ebf04b1afb6fb5f07f9632a4566

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