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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

sema4ai_action_server-1.1.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-1.1.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-1.1.0.tar.gz.

File metadata

  • Download URL: sema4ai_action_server-1.1.0.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.1.0.tar.gz
Algorithm Hash digest
SHA256 f630baff707e288f7ff13c25a2d013888601ed5a55d9f689455bab42fd639711
MD5 b420cb0b743b20a5dcd4b69f574f311a
BLAKE2b-256 f5f380ff883c5d0587bf9f6fed8792377935f5159ee44df78ed650b9f29a3da4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 872085de2b592875691c16438782f6379d41f276a9be9a9f30b154eb4d71a481
MD5 c8797f349602adfa0327cedb8377c764
BLAKE2b-256 dd4a146a2fc25b8db0fdfb970b800195bf6c1952aa92cb34e1333334b9e0443e

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.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-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4a0ebdcd3391c1b06d74eabd939cd5d59d6dae7f25c2aca7697b3734d9de5930
MD5 0ce46a9ac6cfd88b734e677b9e3a7921
BLAKE2b-256 1f9b7d990479f5d31974733706e6f93df7d99528e89d710b8d964feccdf908a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 1bd2a0248890d68a84080de57d7f3dac4b0acc3721c0ab22e6ad8063bd4732b7
MD5 3bc11f5b71d3d6bc3f81615ee9fab2c2
BLAKE2b-256 005e0e08d90533dd276098ce2a2eeb1ae1450dabf3ab8441625ec552c2ac5ced

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 159394b4ee2d559ce8e53dd7a7075f93e3834ad6c98daf7d18b7db5087f21758
MD5 d8db8d75955630b76fd6666fb494676b
BLAKE2b-256 ee44e17840f9456a410da9d1a60235b0a05c34ed1e451e141b433633d4e14fb3

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.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-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 538bffc25ebcc4483f38d930d1388aecc3b7e3daed2f8bb13a7afaf607732968
MD5 592874d278c4265e49a81bb6e616d83f
BLAKE2b-256 9737641de7446148cd2c3f7f89d60879e5085b69d3918d9f286199a27258f7e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 cbb8d30b6b7033a0c28023246de935a265f2718ba3ba3beab0b7f79541b99141
MD5 68bd7ec62bda4cc9b75539dd7769766c
BLAKE2b-256 03b8ad6210a9a9916a3c4a7f31fa3d051892c33cce754cd7297752da15263b3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5601eed44f867bf88c6e3c11487cc9d8e6d4819d7232e884cc4825f147685735
MD5 0ac08ab628eb7351e68f22609407e52c
BLAKE2b-256 5534c0523356df525906a2cc961b3d8d028e8ff2afc005369de35ec3718e638e

See more details on using hashes here.

File details

Details for the file sema4ai_action_server-1.1.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-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 05c736fd1b42ffd2a9f6d3bc84d7034914846f6bf3cdc5afd9e0369907ef5257
MD5 76c4eb643b526da37bff3ffc1f2f9d9f
BLAKE2b-256 5b57e846f538174fc597458229022dfb8bc49071e6e53b56a9d228acd1a40deb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sema4ai_action_server-1.1.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 2f26182cdb1d4523f41497b858807fb84aef0a0ceb8118553b642fa0ec6d6a48
MD5 60ed549d962fbca53fff3e528ddebd8a
BLAKE2b-256 0389667709347bc6bd82761ce091363102d21835fba83a56f4b5a507e0d8ba01

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