Start the Sema4.ai action server:
action-server startServer addresses:
- API root:
http://localhost:8080 - MCP (ModelContext Protocol):
http://localhost:8080/mcp
OpenAPI docs are available at http://localhost:8080/openapi.json when the server is running.
Short answer: the MCP server exposes the Python actions in src/actions_bootrapper and src/robot_bootrapper as HTTP POST endpoints so LLMs and agent frameworks can drive robot lifecycle and action-package workflows programmatically.
What it does (brief):
- Exposes automation operations (create, run, test, package, update) as HTTP endpoints.
- Manages action packages: bootstrap, update code/deps/devdata, open in editor, start/stop.
- Provides robot lifecycle commands that wrap
rccfunctionality via Python helpers. - Serves logs, files, and artifacts to help agents inspect state and debug.
- Accepts secrets when starting action packages so runtime code can access credentials.
Key implementation files:
src/actions_bootrapper/actions.py— action-package lifecycle actions (bootstrap, start/stop server, update code/devdata, retrieve logs/files).src/robot_bootrapper/robot_actions.py— robot lifecycle andrccwrappers (create, run, dependencies, wrap/unwrap, docs, etc.).
Note: action packages created by the bootstrapper are placed in the user's home directory under ~/actions_bootstrapper/<package-name>.
All routes are POST requests to http://localhost:8080/mcp. The action path in the request body maps to the following endpoints. Grouped by purpose for readability.
Action package management
/api/actions/actions-robot-bootstrapper/bootstrap-action-package/run— Create a new action package scaffold./api/actions/actions-robot-bootstrapper/update-action-package-dependencies/run— Replacepackage.yamlcontents./api/actions/actions-robot-bootstrapper/update-action-package-action-dev-data/run— Writedevdata/input_<action>.jsonfor an action./api/actions/actions-robot-bootstrapper/update-action-code/run— Replaceactions.pyin the package./api/actions/actions-robot-bootstrapper/open-action-code/run— Open package in VSCode (usescodebinary)./api/actions/actions-robot-bootstrapper/start-action-server/run— Start the packaged action-server (spawns subprocess, writesaction_server.log)./api/actions/actions-robot-bootstrapper/stop-action-server/run— POSTs/api/shutdownto the running package to stop it.
Robot lifecycle & rcc wrappers
/api/actions/actions-robot-bootstrapper/create-robot/run—rcc robot initializewrapper./api/actions/actions-robot-bootstrapper/pull-robot/run— Pull a robot from GitHub./api/actions/actions-robot-bootstrapper/list-templates/run— List available robot templates./api/actions/actions-robot-bootstrapper/create-from-template/run— Create robot from a remote template./api/actions/actions-robot-bootstrapper/run-robot/run— Run the robot (invokesrcc run)./api/actions/actions-robot-bootstrapper/run-task/run— Run a named task./api/actions/actions-robot-bootstrapper/list-tasks/run— List tasks for a robot./api/actions/actions-robot-bootstrapper/task-testrun/run— Robot task testrun helper./api/actions/actions-robot-bootstrapper/robot-dependencies/run— Check robot dependencies./api/actions/actions-robot-bootstrapper/robot-diagnostics/run— Run diagnostics./api/actions/actions-robot-bootstrapper/wrap-robot/runand/unwrap-robot/run— Package/unpackage robots.
Utilities, logs and docs
/api/actions/actions-robot-bootstrapper/get-file-contents/run— Read files inside action packages (defaultactions.py)./api/actions/actions-robot-bootstrapper/get-action-run-logs/run— Fetch a run's artifacts/text logs./api/actions/actions-robot-bootstrapper/get-action-run-logs-latest/run— Fetch the latest run logs./api/actions/actions-robot-bootstrapper/run-shell-command/run— Run arbitrary shell commands (safe usage note below)./api/actions/actions-robot-bootstrapper/docs-list/run,/docs-recipes/run,/docs-changelog/run— Exposerccdocs commands./api/actions/actions-robot-bootstrapper/help/run— Wrapper aroundrcc --help.
Other helpers
/api/actions/actions-robot-bootstrapper/prebuild-holotree/run— Prebuild holotree for faster runs./api/actions/actions-robot-bootstrapper/export-holotree-environment/run— Export holotree environment to zip./api/actions/actions-robot-bootstrapper/import-holotree-environment/run— Import exported holotree./api/actions/actions-robot-bootstrapper/update-robot-task-code/run— Replacetasks.pyin a robot./api/actions/actions-robot-bootstrapper/update-robot-yaml/run— Replacerobot.yaml./api/actions/actions-robot-bootstrapper/update-conda-yaml/run— Replaceconda.yaml.
Notes:
- The server exposes OpenAPI (OAS 3.1); fetch it at
/openapi.json. - Most endpoints are thin wrappers over Python functions in
src/— read those files to see expected arguments and behaviour. - Use
get-file-contentsand the action logs endpoints to inspect the action package state.
Start a packaged action server (example payload — MCP wrapper expects action path and arguments):
{
"action": "/api/actions/actions-robot-bootstrapper/start-action-server/run",
"args": { "action_package_name": "my-package", "secrets": "{}" }
}Fetch the latest action run logs:
{
"action": "/api/actions/actions-robot-bootstrapper/get-action-run-logs-latest/run",
"args": { "action_server_url": "http://localhost:8080" }
}MCP request format (HTTP)
POST to http://localhost:8080/mcp with JSON body. Minimal body example:
{
"action": "/api/actions/actions-robot-bootstrapper/get-file-contents/run",
"args": { "action_package_name": "my-package", "file_name": "actions.py" }
}Curl examples
Start action server (example):
curl -X POST http://localhost:8080/mcp \
-H 'Content-Type: application/json' \
-d '{"action":"/api/actions/actions-robot-bootstrapper/start-action-server/run","args":{"action_package_name":"my-package","secrets":"{}"}}'Get latest logs:
curl -X POST http://localhost:8080/mcp \
-H 'Content-Type: application/json' \
-d '{"action":"/api/actions/actions-robot-bootstrapper/get-action-run-logs-latest/run","args":{"action_server_url":"http://localhost:8080"}}'src/actions_bootrapper/actions.py— action-package lifecycle and server start/stop helpers.src/robot_bootrapper/robot_actions.py— robot-facing helpers that callrccvia subprocess.start_action_server.py— small helper used by thestart_action_serveraction to spawnaction-server startin the action package directory.package.yaml— package dependencies for action packages created by the bootstrapper.
Be cautious when using /run-shell-command/run and other endpoints that execute subprocesses — they run with the same permissions as the action server process. Prefer using specific helper actions that validate inputs.
When starting action packages you can pass secrets (JSON map). These are injected into the environment of the spawned process; validate and restrict secrets handling in production.
If you'd like, I can also add example curl requests, a short diagram, or inline examples of expected request/response shapes for a few key endpoints.
Common actions and required args (POST to /mcp with JSON {action, args}):
-
Start action server
- action:
/api/actions/actions-robot-bootstrapper/start-action-server/run - args:
{ action_package_name: string, secrets: string (JSON map) }
- action:
-
Stop action server
- action:
/api/actions/actions-robot-bootstrapper/stop-action-server/run - args:
{ action_server_url: string }
- action:
-
Get file contents
- action:
/api/actions/actions-robot-bootstrapper/get-file-contents/run - args:
{ action_package_name: string, file_name?: string }(file_name defaults toactions.py)
- action:
-
Update action code
- action:
/api/actions/actions-robot-bootstrapper/update-action-code/run - args:
{ action_package_name: string, action_code: string }
- action:
-
Create robot from template
- action:
/api/actions/actions-robot-bootstrapper/create-robot/run - args:
{ template: string, directory: string }
- action:
Common response shapes:
- Success: an object with
resultstring (or plain string for some actions). - Error: an object with
errorstring explaining the failure.
Example minimal success response:
{ "result": "Action Server started at http://localhost:8080" }Example error response:
{ "error": "File not found: /home/user/actions_bootstrapper/my-package/actions.py" }