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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

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

File metadata

  • Download URL: sema4ai_action_server-1.1.2.tar.gz
  • Upload date:
  • Size: 450.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-1.1.2.tar.gz
Algorithm Hash digest
SHA256 c9f2d071c2e0228cda5467451469f20de821854617cf6b0836f833c44964c156
MD5 1b95e38850340e138a473160ebb8539d
BLAKE2b-256 006cc001356a68c3d66c0faea0d804482a876f03dc76d157237a7bd119c1b038

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a22a6eabf1b808315aa9a40cd58e6628f7d4f48c2b7853ad5ba5c4b4f318bf5f
MD5 babb42d56deaa13c2eaa2536d0e2c3cf
BLAKE2b-256 60a05a301bbebdd6be13ad20472692abf4a9237c9af0d7f492e3f7fa63c3bd9b

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.2-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.2-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b26d7e102520dfce1e8937149b1cce080a1af3295dc827ef14611a5ce847ddb9
MD5 a085c9b1403501289129b69347b1a162
BLAKE2b-256 34648bc42a2f98603a7e216cbc5bffcc22e28644e81c2a38f3ddb864d717b193

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.2-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 39f75a47d46a78581695788faf6fbb8df9e1f33292b5d4105bc9f8559c36504a
MD5 da10d7c1e144a3e8ca523c063ace4e5a
BLAKE2b-256 2fc69a49c83361bb5a919584f96555fc630694df525b2ed70d0c23f72a12af4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 487d8776130fc18014ac9a41cfc15a65b298b0f42a7f24d5cf5570de53a8629c
MD5 bbdda8ff381a5cca3c77fe74b390fd21
BLAKE2b-256 274d36effbc12b2d9268a4e08c1fee50d7578ae945d4b85e906480fddf518499

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.2-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.2-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 99f58e62572deb1f08fc792dc2260dc11a9d6047fa1ea32797b22db65bccb6db
MD5 02f56ce6f2346ec9a70ae61ba7d97554
BLAKE2b-256 c063f1627d9494afa5cc6eb8f087bf343e5685ef8beabed64abbd56c52c2ffd9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.2-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 0611dd9e9ae171f5150b0b31f7cd72420d688791aceb62f157f3615c3b95c06e
MD5 97d949f0d49392586ac69d3cebaa20b8
BLAKE2b-256 e9b6b043443f13ca01a1fe6430c0640c8f9ac8f1c958bed797754bfe36565bae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 34e6a77e3dced09f94b46bbd34b9384e99296eaf1f113c4b72567996479b4364
MD5 08e37ac6b3bbfa1956635207b3d7f677
BLAKE2b-256 75dbf0c8b6a45b668a3444009556c361fffb4b8135e1dce3dd0c40bb4646d491

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.2-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.2-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2d401a7463b1d5594e72de09db0c7149fa08fac5695ffd4273ccfe3b6f93c0fe
MD5 ee16ac4bd92ea67a225b07bce179d093
BLAKE2b-256 bfe5300fb65c5ebb352740029813d022dcc779b989424e16eafa77314570cf7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.2-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 cdbdcf47e7f6f37074fff26d6aebba654eee274b7aab256fa03604ad053edba7
MD5 4b528871075b15f14fc2e541627bf9d5
BLAKE2b-256 874051340005f03878c95bb8ce339d7920277136ded6742ec2bfe4f97f6db1b4

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