sema4ai-action-server


Namesema4ai-action-server JSON
Version 2.14.0 PyPI version JSON
download
home_pagehttps://github.com/sema4ai/actions/
SummarySema4AI Action Server
upload_time2025-07-29 12:36:15
maintainerNone
docs_urlNone
authorFabio Z.
requires_python<3.14,>=3.12
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sema4ai-action-server

[Sema4.ai Action Server](https://github.com/sema4ai/actions#readme) is a Python framework designed to provide your Python functions to AI Agents. It works both as an MCP Server (hosting tools, resources and prompts) and also provides an OpenAPI compatible API.

A `tool` or `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 provides a `/mcp` endpoint for connecting `MCP` clients and also 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 any tool or action call (open the `/runs` endpoint in a browser to see not only inputs and output, but also a full `log.html` with internal details, such as variables and function calls that your Python function executed).

## 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

```sh
# Install Sema4.ai Action Server
brew update
brew install sema4ai/tools/action-server
```

#### For Windows

```sh
# 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

```sh
# 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 MCP tool

```sh
# 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
```

👉 You should now have an Action Server running locally at: [http://localhost:8080](http://localhost:8080), so open that in your browser and the web UI will guide you further.

## 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](https://github.com/robocorp/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](https://github.com/sema4ai/actions/tree/master/action_server/docs) for extensive documentation.

## Changelog

A list of releases and corresponding changes can be found in the [changelog](https://github.com/sema4ai/actions/blob/master/action_server/docs/CHANGELOG.md).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sema4ai/actions/",
    "name": "sema4ai-action-server",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.12",
    "maintainer_email": null,
    "keywords": null,
    "author": "Fabio Z.",
    "author_email": "fabio@robocorp.com",
    "download_url": "https://files.pythonhosted.org/packages/24/43/2aaa17691f17bea9a2e7b832536d9dc6ce93e0ba931a46203725b5adf997/sema4ai_action_server-2.14.0.tar.gz",
    "platform": null,
    "description": "# sema4ai-action-server\n\n[Sema4.ai Action Server](https://github.com/sema4ai/actions#readme) is a Python framework designed to provide your Python functions to AI Agents. It works both as an MCP Server (hosting tools, resources and prompts) and also provides an OpenAPI compatible API.\n\nA `tool` or `action` in this case is defined as a Python function (which has inputs/outputs defined), which is served by the `Sema4.ai Action Server`.\n\nThe `Sema4.ai Action Server` automatically provides a `/mcp` endpoint for connecting `MCP` clients and also 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 any tool or action call (open the `/runs` endpoint in a browser to see not only inputs and output, but also a full `log.html` with internal details, such as variables and function calls that your Python function executed).\n\n## 1. Install Action Server\n\nAction Server is available as a stand-alone fully signed executable and via `pip install sema4ai-action-server`.\n\n> We recommend the executable to prevent confusion in case you have multiple/crowded Python environments, etc.\n\n#### For macOS\n\n```sh\n# Install Sema4.ai Action Server\nbrew update\nbrew install sema4ai/tools/action-server\n```\n\n#### For Windows\n\n```sh\n# Download Sema4.ai Action Server\ncurl -o action-server.exe https://cdn.sema4.ai/action-server/releases/latest/windows64/action-server.exe\n\n# Add to PATH or move to a folder that is in PATH\nsetx PATH=%PATH%;%CD%\n```\n\n#### For Linux\n\n```sh\n# Download Sema4.ai Action Server\ncurl -o action-server https://cdn.sema4.ai/action-server/releases/latest/linux64/action-server\nchmod a+x action-server\n\n# Add to PATH or move to a folder that is in PATH\nsudo mv action-server /usr/local/bin/\n```\n\n## 2. Run your first MCP tool\n\n```sh\n# Bootstrap a new project using this template.\n# You'll be prompted for the name of the project (directory):\naction-server new\n\n# Start Action Server\ncd my-project\naction-server start\n```\n\n\ud83d\udc49 You should now have an Action Server running locally at: [http://localhost:8080](http://localhost:8080), so open that in your browser and the web UI will guide you further.\n\n## What do you need in your Action Package\n\nAn `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`).\n\nThe `package.yaml` file is required for specifying the Python environment and dependencies for your Action ([RCC](https://github.com/robocorp/rcc/) will be used to automatically bootstrap it and keep it updated given the `package.yaml` contents).\n\n> 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).\n\n### Bootstrapping a new Action\n\nStart new projects with:\n\n`action-server new`\n\nNote: 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`.\n\nAfter creating the project, it's possible to serve the actions under the current directory with:\n\n`action-server start`\n\nFor example: When running `action-server start`, the action server will scan for existing actions under the current directory, and it'll start serving those.\n\nAfter it's started, it's possible to access the following URLs:\n\n- `/index.html`: UI for the Action Server.\n- `/openapi.json`: Provides the openapi spec for the action server.\n- `/docs`: Provides access to the APIs available in the server and a UI to test it.\n\n## Documentation\n\nExplore our [docs](https://github.com/sema4ai/actions/tree/master/action_server/docs) for extensive documentation.\n\n## Changelog\n\nA list of releases and corresponding changes can be found in the [changelog](https://github.com/sema4ai/actions/blob/master/action_server/docs/CHANGELOG.md).\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Sema4AI Action Server",
    "version": "2.14.0",
    "project_urls": {
        "Homepage": "https://github.com/sema4ai/actions/",
        "Repository": "https://github.com/sema4ai/actions/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e463832188066a7d71f5325aa257c8a5fc0164b52a5382242ed6c8cde9199cb0",
                "md5": "7c40cb7b89611f942c666dd30ad6acd8",
                "sha256": "e70300c28ba04bc1933698b7eefcab3859d0649478ffca75b82c82ef0fa9d150"
            },
            "downloads": -1,
            "filename": "sema4ai_action_server-2.14.0-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "7c40cb7b89611f942c666dd30ad6acd8",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<3.14,>=3.12",
            "size": 10967734,
            "upload_time": "2025-07-29T12:36:59",
            "upload_time_iso_8601": "2025-07-29T12:36:59.520591Z",
            "url": "https://files.pythonhosted.org/packages/e4/63/832188066a7d71f5325aa257c8a5fc0164b52a5382242ed6c8cde9199cb0/sema4ai_action_server-2.14.0-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "674d9727b7db18b9e314f6e6daa2cdc258c40e79c7797e5f0696fd4b6524db6b",
                "md5": "e651f9a20fc33eaab5e34c7cbdbf2dd8",
                "sha256": "2b51ff74395e5c91ce5e7a5791328e88624b9040f9a8d69aab0678a972f7e0df"
            },
            "downloads": -1,
            "filename": "sema4ai_action_server-2.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e651f9a20fc33eaab5e34c7cbdbf2dd8",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<3.14,>=3.12",
            "size": 11182373,
            "upload_time": "2025-07-29T12:37:04",
            "upload_time_iso_8601": "2025-07-29T12:37:04.516643Z",
            "url": "https://files.pythonhosted.org/packages/67/4d/9727b7db18b9e314f6e6daa2cdc258c40e79c7797e5f0696fd4b6524db6b/sema4ai_action_server-2.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ffb374ae087e902b4ed112c2665a97bef2c9d0a2aaeed3f92dba18e85f7bb94d",
                "md5": "57e8942896acb3fd61e85c183feedf7a",
                "sha256": "393b03341c340cfa05b6ae4b66247492d07995c84943ab1c32bec4c5e692038d"
            },
            "downloads": -1,
            "filename": "sema4ai_action_server-2.14.0-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "57e8942896acb3fd61e85c183feedf7a",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<3.14,>=3.12",
            "size": 9237736,
            "upload_time": "2025-07-29T12:39:15",
            "upload_time_iso_8601": "2025-07-29T12:39:15.344316Z",
            "url": "https://files.pythonhosted.org/packages/ff/b3/74ae087e902b4ed112c2665a97bef2c9d0a2aaeed3f92dba18e85f7bb94d/sema4ai_action_server-2.14.0-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "255493d58a68a1750eca4e7b88e6384c9b07906c955d32d340492c86f2246b2e",
                "md5": "b361d6167f745a02c7459c9dd7156106",
                "sha256": "1cffe727b216542617760351506744316da0c04d4a07c9b77683bf107448564d"
            },
            "downloads": -1,
            "filename": "sema4ai_action_server-2.14.0-cp313-cp313-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "b361d6167f745a02c7459c9dd7156106",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": "<3.14,>=3.12",
            "size": 10967735,
            "upload_time": "2025-07-29T12:37:01",
            "upload_time_iso_8601": "2025-07-29T12:37:01.703765Z",
            "url": "https://files.pythonhosted.org/packages/25/54/93d58a68a1750eca4e7b88e6384c9b07906c955d32d340492c86f2246b2e/sema4ai_action_server-2.14.0-cp313-cp313-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a9508b7f946d97e63b981b460c36097a7bf6da7f547208b6198a99270ee7d34d",
                "md5": "69e9ecd99aea466706f878bab87071e5",
                "sha256": "deb62e607812322c018cd7bfcbc539618e3b5c74286ede57f854da46938601d1"
            },
            "downloads": -1,
            "filename": "sema4ai_action_server-2.14.0-cp313-cp313-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "69e9ecd99aea466706f878bab87071e5",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": "<3.14,>=3.12",
            "size": 11182373,
            "upload_time": "2025-07-29T12:37:06",
            "upload_time_iso_8601": "2025-07-29T12:37:06.878451Z",
            "url": "https://files.pythonhosted.org/packages/a9/50/8b7f946d97e63b981b460c36097a7bf6da7f547208b6198a99270ee7d34d/sema4ai_action_server-2.14.0-cp313-cp313-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a41a85fd054eddb2a4767a05052a4f3062d9905aefe9bb8ffc09dc2b4bff72ad",
                "md5": "a07157164f1c5ad9da4ec9c04c549f80",
                "sha256": "6c985009828bf8ed8f53a252d53560c5cf4c6174f0f71fec5e4bc388f6b0535f"
            },
            "downloads": -1,
            "filename": "sema4ai_action_server-2.14.0-cp313-cp313-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "a07157164f1c5ad9da4ec9c04c549f80",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": "<3.14,>=3.12",
            "size": 9237735,
            "upload_time": "2025-07-29T12:39:16",
            "upload_time_iso_8601": "2025-07-29T12:39:16.978913Z",
            "url": "https://files.pythonhosted.org/packages/a4/1a/85fd054eddb2a4767a05052a4f3062d9905aefe9bb8ffc09dc2b4bff72ad/sema4ai_action_server-2.14.0-cp313-cp313-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "24432aaa17691f17bea9a2e7b832536d9dc6ce93e0ba931a46203725b5adf997",
                "md5": "fd1d150836af1740bfa39c0ba0142f15",
                "sha256": "87d13cf3eec8c5ea0698b13eaf4fb14fe1f684b642baf79fa8988db5d70d3f9a"
            },
            "downloads": -1,
            "filename": "sema4ai_action_server-2.14.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fd1d150836af1740bfa39c0ba0142f15",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.12",
            "size": 465928,
            "upload_time": "2025-07-29T12:36:15",
            "upload_time_iso_8601": "2025-07-29T12:36:15.781418Z",
            "url": "https://files.pythonhosted.org/packages/24/43/2aaa17691f17bea9a2e7b832536d9dc6ce93e0ba931a46203725b5adf997/sema4ai_action_server-2.14.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 12:36:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sema4ai",
    "github_project": "actions",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sema4ai-action-server"
}
        
Elapsed time: 0.42610s