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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.16.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.16.1-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.16.1.tar.gz.

File metadata

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

File hashes

Hashes for sema4ai_action_server-0.16.1.tar.gz
Algorithm Hash digest
SHA256 9ef247f0f2c26ebbe017bf98ae5da496e18931320520ff39f1df4937457bee84
MD5 60d7e3f0659b16199a075793b5ddce55
BLAKE2b-256 107eca810a6f937518641304590357d1d4ef9a4083b890f03ff4128a194e9fa2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.16.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 864c33eefde4b0cc18bb7b9c6a351a7ab15bf4721432d17de2a6652bccdaaa2c
MD5 2ca1f8e524c9e65967e2c6c82b59867a
BLAKE2b-256 eecd5a985fd53c40458b5bcb0e6bfd9f4921afd40b1125b98926486d4fdb7f41

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.16.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.16.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c5c1ba363e706813cfdc5a2d21b9d9997e3e7de3a57cf4d5c42a6067b0be903e
MD5 0444353dd77db5377622e6e0ac8dda7b
BLAKE2b-256 c8e80b9b422156e0cca0bdd68f3757c40471aea5d69ec6a3f922e11d27489edf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.16.1-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 32b767e0ffb9306aad1d2dd93f91a22e025067b8e9e6c10696025978a256e312
MD5 d96479929ae3f6a1b8eedda9cae6dd8b
BLAKE2b-256 a434cb4755ec2b51451432c4f3b4ccf55e16200bf886495495da59507908f1c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.16.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2e055ddfc3eae578eb42fc8cfa5120b00bc87618a1cf2cc9d26df39c2764d5bf
MD5 f8ae3577157dc190b77df707ff6debb2
BLAKE2b-256 f91923abb42e5fa706dceb6bba592ca5416ef3149573740bdfe966b22d1c62a6

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.16.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.16.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4477ae409bd1f6e680a8d676c59c2e8ead1d639cad102150b0cfd7b0c912a57a
MD5 dbcf91082613bd1e8151392b06ee95e5
BLAKE2b-256 cd577997aacd73aff3da1db70689e043cb5fe852b8aaaaae7b8239309f84c704

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.16.1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 bfc9199a8b48e4cb6e9ebb21280dc25dd0a305009bfaad766f729490115373d2
MD5 6a26cd2f979c8710bd3841d98a947461
BLAKE2b-256 bd714a4f7b50fd91e5e625d814293eb3ca0b1028e06de601b71b2dc911dd2a0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.16.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6701fa61e83e9bc89bd8c5c4748f493f1c454058314118bd805be67508c32b02
MD5 4b68e751844c907af4840b9a45569838
BLAKE2b-256 41011d10900f2dc673586334b45f10e7cf65c982b3a4f36eb8d35069aef1d7c8

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.16.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.16.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2fce283d6da45032ab48c58d473dd03254bc9e32ab6068be8ed078336b2bde48
MD5 eeeef98b1ef92c093ed6d30128770b3b
BLAKE2b-256 94b444a9f12e73ecf2b117833eb2c23f5c0c223b611245ec8bd3652c1858bd94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.16.1-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 79567b95d5d13c91ace2a9e359319ab1b90301a7db1a35eb18d623ec401ad83d
MD5 5884abb49c28311c7e8c289bbe16947d
BLAKE2b-256 4c860b273817bb08a7a0604f1f18453e94ac0a56eabacb47e47d4f444951897c

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