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://sema4.ai/cdn/downloads/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://sema4.ai/cdn/downloads/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.9.1.tar.gz (398.1 kB view details)

Uploaded Source

Built Distributions

sema4ai_action_server-0.9.1-cp312-cp312-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.9.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-0.9.1-cp312-cp312-macosx_11_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.12 macOS 11.0+ x86-64

sema4ai_action_server-0.9.1-cp311-cp311-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.9.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-0.9.1-cp311-cp311-macosx_11_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.11 macOS 11.0+ x86-64

sema4ai_action_server-0.9.1-cp310-cp310-win_amd64.whl (8.7 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.9.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-0.9.1-cp310-cp310-macosx_11_0_x86_64.whl (14.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

File details

Details for the file sema4ai_action_server-0.9.1.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.9.1.tar.gz
  • Upload date:
  • Size: 398.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1021-azure

File hashes

Hashes for sema4ai_action_server-0.9.1.tar.gz
Algorithm Hash digest
SHA256 d3b862fb0b7c0773a78868fb232bc96f0d722fb130267072dd3a163f37d080fb
MD5 86e8f21a070fcc65702e24d93a331765
BLAKE2b-256 094c35032b76f8fbc81e76a657c88385b759caf70b0a0bbd85a022b73530b805

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.9.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 838d18daa12647a9dabc0ae28b36c2fa0efff4290e316629eb0f594aef2fd18d
MD5 64c0cd8c1239076714906e0b105085f3
BLAKE2b-256 642b2a497aa7dd4425aea1c7f61ddfeb028a347b723dc28170657324761d5168

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.9.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-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c865aab8001dbdeab2f4558132f7282b93b9a0334f76e16bf8d571efde11ae02
MD5 40202ea6983f548b0f1143f8403ff451
BLAKE2b-256 aa0ae7f567ebfeba28ef4ef2a3b31b2f680c25c85f5e43f5ca8d1ae712d820c3

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.9.1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.9.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 989b04ce897f4bc7fe6665f7b5cda3e4c7d3329e4808b3f650b4ebe64be61b6e
MD5 14f146cd835c81b9fe8d66eafbad0b51
BLAKE2b-256 45891bfa8aafd001f18c6bca666b50298571756819b665229c0b9e9df02fa7ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.9.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 890c529c7f50b591e08eaf184d0c974c3e589ee902fa556768770107590a38f7
MD5 e47764f03a6c5632f2341e580feb7641
BLAKE2b-256 7a616fe71a61fb61ab7e89a0c46e32353753cefa40e44268785e8b60fb0f673f

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.9.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-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfbf6e49b7001f14bf2f458698e71bcc6bdfaf2b96b474f23238936437b24df8
MD5 daed12f661caff865a379145059317f5
BLAKE2b-256 6cb89e65b9165d1ded52da8ae7cac50bb655e4e3291f72f2e5161c2a3f614ccd

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.9.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.9.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 55110d8ee6d2deadd3a448845dfa93c31b7a1e01c804578dfc16644e3c2ce323
MD5 d6629c52be7ca2a438f8c8a615fabd74
BLAKE2b-256 544b2615419708405fe7d9493122d01479c4bcc087eaa727992333cf5c8710bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.9.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 800569fe248141634f419026441e53b1d6aa96d3a3c4728d35cb8998dc393813
MD5 e3b86fd7d5fd7ddf8583ee87564c8927
BLAKE2b-256 229f28d05f070d0b87c82a3f02cecf46ce35c63419d0236844e9cfb5ffaa7787

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.9.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-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8e8ab7bda222dc1e09736e7863a7e0ff0b08e65593326f35eb1b3a7e605d039
MD5 3fc8a2538feb6dd0b02488c15b4b309e
BLAKE2b-256 137541c73a8b9e775cd81a1e816384faa55bb9292fd8e5ef6bf24877291aed5e

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.9.1-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for sema4ai_action_server-0.9.1-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 09511084494f24e2d646fa4f74c216e5a586e0fb8ddce87b42794ef9c83d10bf
MD5 c3164f09166e542a903bbaead306ba62
BLAKE2b-256 bd0e3d54130c1b52ecdbb52b4547830616f5350edde5567cc547e2984837b5dc

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