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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.19.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.19.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.19.0-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.19.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.19.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.19.0-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.19.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.19.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.19.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.19.0.tar.gz
  • Upload date:
  • Size: 443.1 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.19.0.tar.gz
Algorithm Hash digest
SHA256 87d8111e3672af0ad65c5d0c887415b395f5805017b44217ca5ea1be8b897e00
MD5 2dedeeee598496cfba8d5e45bf7175c6
BLAKE2b-256 e6007bf9d6d267860ed7b218bceccd71664d5392922cf1ae5e5b3ff386bba085

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.19.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2479ee4b6e45fe7e9d047b0dcbff04fdf1361a26cab5d409d08b0068401ab0ea
MD5 a823c8660919c756546591ff8c062adb
BLAKE2b-256 225ae9e8e15d6f1224591a5bd046a30fbae88d4949af54c73d4f0fb37a0b23f1

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.19.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.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9acb30684f454d091be1808aea00ee933b0b076d3cdc6f6efaecd37027be3d4
MD5 b2172e9d598f0dc7c22be598f3f32edb
BLAKE2b-256 a599ca130c945158d4e2a27275fcb148d506d161517cc56c69878ef7b3c87758

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.19.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 da613f0e0648e2a989a056758c2d3a14fc6c23bdf8493a629db9c9433f0a65fb
MD5 be648013976ff8e9c8f22a8320d3eab9
BLAKE2b-256 d44db2950fd01569f51a952217aa4fafb14a794da8d95d88e4e55e7ee652e0f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.19.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6f13c96c096ba04e03581ac204c1dc712dba95256ebc157c8280435e009d1c3a
MD5 c8f4ea7efa18bf3cf6ca0ab6e7d3c994
BLAKE2b-256 7a1137f295c45af34aa1bd560cc7f508ab578a32a0be2eed0ced7872eef174f0

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.19.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.19.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c3f6ef2a43c3d46a659658f87e1a7f0d07c5ef6d1b320dcd258eabd34b93abcc
MD5 0b5803d0fa28d257e56cb65b32dabf80
BLAKE2b-256 cb14273865eebb0a238c451056b6ea174b08a9087aeddef219d1daea3d8beff7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.19.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f779d0fda8a15ad6e6a45087f4d46c4647f8f9065800391397aa76835d4fa122
MD5 f23e0d2778f19ac414dae5782a248866
BLAKE2b-256 8cca773dd00161d827c3ae9b406789517394b881fa6adf91a63e437647d73043

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.19.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2b828145f5c3657844026ae742e02b0d3a9a61efbfca2fb162bbc01b7ef388e7
MD5 1ac0bae30783363e62c227e811f9b20e
BLAKE2b-256 0f30fdc6ed51e340b33f9a8206a82bc29438e1fdfd34083eae3149660a6c9391

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.19.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.19.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25d26662a4b437c9aa1738de186d93f99b62571599029919ad2597e07f3f0ae4
MD5 068e5a1b7b24d6abd2ed2c8bd13f65bb
BLAKE2b-256 cf89626f6999e86e9c2c5b693c9611a20258725f518171f018490cf77e90764c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.19.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 5760ac41026499e9ccf89ad990543b9210d2c8b3bf00973a5ac1e7d8eda69bce
MD5 49ab0c921ea294d48c29cd754db37ebd
BLAKE2b-256 57181deb2845e784af77309e2fb2615363b686191b06ff298030074fbe8ea89c

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