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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.21.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.21.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.21.0-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.21.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.21.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.21.0-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.21.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.21.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.21.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.21.0.tar.gz
  • Upload date:
  • Size: 443.5 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.21.0.tar.gz
Algorithm Hash digest
SHA256 b4b897dfbc7ba5692729885ec46969c12342751b905b8c3c05590b0c379e054d
MD5 b811594046cbc50b03315928e36bab6c
BLAKE2b-256 68cc3955fbb60b6aa54e163bb6c7712f2244c8183edec81511f8473ab2ad1cdb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.21.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1bfd967b263cd77452faee0acc7f1eabc73c449799932b4c1fb7206fa9c4c72e
MD5 0b75c2c03f8da26744c21294d2ac51f1
BLAKE2b-256 bb501fca5deb67981333de8990780d55fc9be86cea903648fa2ef9166755206e

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.21.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.21.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b4086a7f206a8b2cf6cfa21b60ba6a10a71d74008f2e61f5b2c574b28e3f322b
MD5 8f68330588cf2f2660d58bc8d5dc1660
BLAKE2b-256 e358f9f98411bc7fe57ea653db5642f792844cfe6b0b227ba89c1a7bf6bf894e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.21.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 70b5b95459d57af4e72b5d29631223d9a02e471b6a93ae3f3725d5a11a83b279
MD5 4d49ba30ba6a203206e0e3fd02f6a77b
BLAKE2b-256 718118d06b1d8a8a6dc94be460f9d97699777310ed3a4d35176a1edd6e662388

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.21.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9c34eab680269b1e41a598cef36886562081794c81a0a320b5fcb6ee94cd4358
MD5 7ac4ea0b703b5e5c216155053c8778fb
BLAKE2b-256 b4a586662ce096b41d86b972f2da9247241edf2f3f9031e72e136eae7f878326

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.21.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.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 449e1bcd7d65f3ccceec7afae43dbc518f130539068f48241a99ac16eb7f97a6
MD5 561d840f3fe1383e7a21427298cb3f73
BLAKE2b-256 637312b48f424d4c0f19c2f1e0f9ef83bf58849aca4b74bba17b8c8a41e80f3d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.21.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d3d4280baf3e1a21fbf570aaf1a73bcf1001c8742e6091c38a36e5190d8450ff
MD5 0f35986f7885b340ef40d982332ac637
BLAKE2b-256 13ac69af3e41c884e8aaa3dace198d32934811852cb01aa18c3be0d68f2c0af7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.21.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1cc9a1547e1b0a8692d45eb674563704366869ff1dc99478543076af9bd7216d
MD5 1a2a19cb7b2580732705b974e5b7bdad
BLAKE2b-256 300d3f5c8ae2b1422c6c608208a0ced21ec3451ac6591ea9ca09f8ebdea496ac

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.21.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.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3bb0cefb9ea6339c7a689332661f7521b7c032d65a6e870ee7ff5c8c2e0ae705
MD5 8fc54ac1a97b7dbf1ee191730f449702
BLAKE2b-256 65d58b87fd191255fe8ca5c6e5bd94fbd49c29ec89fa45c57c856638469b0a1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.21.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 a8536ebbe176b5c4a5dce2278e880e06006cf80d339a88442ae5c6bab6637fec
MD5 f5b9ef4f42c38811c8e9ad3b575ff901
BLAKE2b-256 86fe046d541c120613ab220b105e576baf901382fb1551bb31421fa9e8ffd04d

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