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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.22.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.22.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.22.0-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.22.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.22.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.22.0-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.22.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.22.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.22.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.22.0.tar.gz
  • Upload date:
  • Size: 443.4 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.22.0.tar.gz
Algorithm Hash digest
SHA256 2b6194ac56d5271cf053bb7ff92a298dbaef6f74d2c14f687623434c6da2c23a
MD5 26ef7ed80492e883734bc4669f3a2eea
BLAKE2b-256 dd2e573c6fbec3dc5efc22f4269353e2dda678b9c6029f16d1ae001430451ba8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.22.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8e79b82d32b01f2d11706e4307983dc8b084580a554717bca6efb7b7270e6eee
MD5 503e1223557b28bc1f75dc5f18007a34
BLAKE2b-256 ea84f0a9cbe02754e169320e0c1d9f23dba702261b60b0785b43453ebc6786be

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.22.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.22.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba87321e6a8cda0b5f20ceec0aaf72cfce2cde4cd227d25d5ab0bd01c58a300c
MD5 fa639cf79374d836728641453638c8ad
BLAKE2b-256 896cd341cc27c29bff7d6c8ad07da93937a0ef25d0c3854fcabd3c12b8953cdf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.22.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 49944ae98f999a8dd1c9368e202d78764a304cdc786e71130d37c5f29e12e468
MD5 9cc828bba860c9f08f6475176935d29a
BLAKE2b-256 0e14e16aa55800a2ccd88e1a935415ce77668da976d15410b83d35f391ddc6dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.22.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 41d3029aa89aaa8210bc29aa4c07ba0de98787c6bffe8927f4a2b1c5f3533ca2
MD5 340494cf83321b49d6f601408368aefe
BLAKE2b-256 73731858db572ca4dd4d69ab1b06ab40a1dd60f0c3fe5a8a0c84687d7bf85077

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.22.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.22.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd421736945953dbe57af816d191bb931aee148fdcf0f9187c1f0d0198a04b2e
MD5 586af964771bdf60cad08fe72957e11d
BLAKE2b-256 dba542899e50d7bd45d8a465195086e780785ec4470ea435a331e68633083c1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.22.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f264f34b48365992b64719a52b0f8f537a74275c086d6569df4fd13f15d7e84e
MD5 a37602580254cbbd9d8fb2eef0d070c4
BLAKE2b-256 1131d361ea3729b94b8dbffbc35aef14a48d77aab02d3e93cd19944752a6b3e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.22.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8ffee0deb83e4f29c3ad92eff4a23949ba5a59e4551a91e0dc2fc41a53a9b855
MD5 9dd8aad840043da997265283432ee01a
BLAKE2b-256 9491cf0760d3ca175299127c6faea04c14d262006142a0844abc65d7ff00e6cd

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.22.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.22.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0fe1a1a7a064c550fdb91096c441f44a1af12c6d98120daf54f5ae47cbd3f266
MD5 9d6d2f9152a6b658e53c7293de3b533b
BLAKE2b-256 f495c7ed024656c9735fe5d09f5acd9361f2cadd3b95c950ff98c1ad0eb2f3b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.22.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 7a34acc80d88d373ad6c0c40184e0db82bc7e988be779e65aa0f93133774201e
MD5 d5a982324792521eab7469bc25fffe39
BLAKE2b-256 915f0a1b9e236e42a8b9ddb65ddd5b527ded6d89973680da08a3c7f699689003

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