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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

sema4ai_action_server-0.23.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.23.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.23.0-cp311-cp311-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

sema4ai_action_server-0.23.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.23.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.23.0-cp310-cp310-win_amd64.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-0.23.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.23.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.23.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-0.23.0.tar.gz
  • Upload date:
  • Size: 444.7 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.23.0.tar.gz
Algorithm Hash digest
SHA256 58b821190bbb1a94142038d5a6d9dd4f532c46b5208b7631e9aed6f6e2d3f930
MD5 a1b3ea16d7c871be3ef51f9287ebc4e3
BLAKE2b-256 f39ff3e3e5b3441cfb93099ac4b85960402a178451a9697b62017ea820d38ebb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 62a5bcfddf640ae6350d0004c84cc202926b3d3515f869af629061fa895e28cf
MD5 ab25bfdbca54de017e3985ef9e2da63e
BLAKE2b-256 b6320416cdcb967cccdf8e96328a09e32a26d7e422ed1937bb8e1741129e59f5

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.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.23.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f72023b0d5e272015fbcd35bfc31f0618a50904cc56d9ba489be56618fb80ee8
MD5 4e5b24451b979a4ead28761214444190
BLAKE2b-256 2f311fe304d6af0e230d9fb3d63420ae7b5d05241d4b0700acf8689413ff34c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 80a4213b84292ff3dc8d1d1fc01a0e54dba0f56a09c67a36b257a5eed8fe2642
MD5 d0b17ae56067678250d50b546bdfa917
BLAKE2b-256 364a42d6d9b2f06bf8d0f7a0c4b14e952706e36680103a6bd0edb5e2c093ae05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 acc8047d966e1974468edb4c380d8c007d0492d96159dc671df2b0e45ec17fc6
MD5 24727edba72a61598ce43dea87e56ee2
BLAKE2b-256 a43e93d8547846cd2c048e2ce3b96f6c184cae09bc5966145ce18dc719425c93

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.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.23.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7c6056fdc982372ef6b2c13fb7d48ba01509a3c8f200d161da100540639637a
MD5 467904ba2b36c4fc472f372bbb8824d9
BLAKE2b-256 11af821711db865e43fc5a143c1c6f3a3cc0f27bcd64e5c5a4b913c7b1173f3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 6de04ff7f8fa8ea399124c86c15511079feee1465276d85cea039bf40c66c200
MD5 7a3c9fb946a4b39acbd365cf1c8e16c0
BLAKE2b-256 a55c1d4a279f53680624be9f72b0033800cc3ce3189e46f6d41299ebd95b09e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fea0bfa0d4044a9764dd8f8dea3f32a3ecc4b53c2fe95706f41aa1300868897f
MD5 50d2a326a8ac92a9d668153e534de6b3
BLAKE2b-256 372134c484eb47d75536e6e958aa960315e7af0b0a79379a10b0d521a5aa0023

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-0.23.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.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c057b58dff16979c3af30a209f3dbf5f925e4bdee45f7f24cce2c06f092a4896
MD5 078734ae8f4490fd8c6c2d0c29dc7e23
BLAKE2b-256 ba74016fa433fa085732ac34d1f5ca4fe5a58978582344796db517b8530349dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-0.23.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 ffd49d80c0a1fcbcaad7064fac4ef6f83efc066c45ca6ac80708846e7245dd2d
MD5 4125670d8f44ce9d7314cc671f6cec7d
BLAKE2b-256 56fbfddb93bbc41c8da733aeadd2eecd16b49737b2a7c6dcf008b9bb7658c6f5

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