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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-1.0.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-1.0.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-1.0.1.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-1.0.1.tar.gz
  • Upload date:
  • Size: 446.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.8.0-1014-azure

File hashes

Hashes for sema4ai_action_server-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d00b23c831c6b9761657c07233cf4ab2f05920e802467896ab771c71522d6396
MD5 3ff86b6c6d06ebce8a9f8ab12b1d9596
BLAKE2b-256 632dc578e9c3c1933f4f898e1059bcde1dc0100ceea3a14cb5915f0c883e4fad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 097cbe4c848ecacd01779b9b2bbdfdf52eed4063396947bb4c3afcb36de9430b
MD5 501b5fa56de09580dd6162dc156b432b
BLAKE2b-256 664015ce74d845b8367c0cb22b199c0c2f31da6296adc1d963efbe4b3101b122

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.0.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-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cea46c1a55bb91640f6eab639f7d3ca61216d7e9bc505a9ef2debd3327b0b62
MD5 240070f374654aa831f41a6785c3033b
BLAKE2b-256 17926db6ec7f8e1eb894b919bca4578fdd41dc360732ae781f1c10012507bb4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.1-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 40dcfc5eba6137deaffd6f0948694fdce9012e7aca4ed029e228dfb522be97fb
MD5 bb52c70d0ed1723093490ce82402826e
BLAKE2b-256 9c50662da4355dea4f069851c1b3064d420b53d3c6dca4848997f19624906766

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9c630856d7955b0f07095751231c1bd543180705ad118eb1e4d1bb45ca1df4b5
MD5 3bc97baabfea1f3db502fef83610d637
BLAKE2b-256 28d217eacbde1d2adbeeb6ef495b7070db1ce3834a69e752f5317fe4b09bd20c

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.0.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-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ccdc8495c5b7e0edc2b51dbbff5ccbfa3275a7ca43fe4b06004beef5989046d4
MD5 48fdf8dc84307f2a6324caf5a7b3de74
BLAKE2b-256 937d4ee1445aa63858ef35c6fa4f54257d31067e193bd21954d7b94600e52044

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 158eb5fcace0ff2fb64e100f6d34ac89ca166a675aae1e69b7114779c41b83d1
MD5 d53f268f97414e2a915e10ad45028fc5
BLAKE2b-256 9e03cc35e44f8556b489eb5de40fd477ce1581365c2da9c97ba1e2e032989fb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 29aa0a69445d77dec8c12ffed4b3864ea5884e8332a001a364ec237d266f7fd9
MD5 01d486d4b981301da13c602ca46e541c
BLAKE2b-256 d32fad369e32599719e34ea89b6933c04fa22440c39780e7a8fd96f27be72932

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.0.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-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 94f08e56e3386d2cc56639890342efb7b48df8d9e58043d949d587db1748e1eb
MD5 8563f9af11182d9b9499209ca86ea471
BLAKE2b-256 84b1e868737bc7910f1ec2111e8ccc35b78c7675ed44a0017d38f5f78f37c8ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.0.1-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 b728fe64581c1b8350de627fbe70e9468e49b06dcfd52943eeff3c50c18183b9
MD5 0b85f9fb30001794a75e06858041f02c
BLAKE2b-256 7af02848c028dc5bd8fb6c5beca16e275e8fe2fcf31e68f10493d69204c93331

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