Running agents from outside¶
A published agent can be run from outside the Crios app in three ways: the REST API, an AI client connected to the Crios MCP server, and an A2A client. Each runs the agent as the person whose credentials it uses, who needs editor access to the agent's project, and each run appears on the agent's Runs tab like any other.
| Way | Needs on the agent | Needs for the organization |
|---|---|---|
| REST API | Chat on | Nothing |
| MCP | As Mcp Tool and Chat on | Nothing |
| A2A | A2a on | A2A turned on |
The switches are under Exposure on the agent's Gates tab (see Limits, checks & exposure), and like the rest of the definition they take effect when you publish the version. The one exception is the MCP tool agent_list, which reads As Mcp Tool as soon as you save (see MCP clients).
REST API¶
The agents endpoints are part of the workflows API (see the REST API):
POST /api/v1/workflows/agents/{id}/runsruns the agent. Send either a chatmessage, optionally with the earlier turns of the conversation asmessages(each with aroleofuserorassistantand itscontent), or aninputlist of items. With"wait": truethe call waits up to 30 seconds and returns the finished run; otherwise, or when the run takes longer, it returns the execution id and status to follow.GET /api/v1/workflows/agents/{id}/statsreturns the summary the Runs tab shows.GET /api/v1/workflows/agents/{id}/cardreturns a short card for the agent: its name, description, live version, its tools as skills, and its exposure settings.
A run uses the live version unless you name a version. It is a Test run, which never writes into production memory, unless you ask for "mode": "production"; a version that is not the live one always runs as a test. The call is refused when the agent is archived, when it has no live version and you named none, and when the version that would run has Chat off.
MCP clients¶
An AI client connected to the Crios MCP server, such as Claude Code or Cursor, can run the agents that opted in (see MCP to connect one). Turn on As Mcp Tool and publish; the client then has three tools:
| Tool | What it does |
|---|---|
agent_list |
Lists the published agents you can access whose newest saved version has As Mcp Tool on: id, name, slug, description, model and project. It looks only at the 50 most recently updated published agents; narrow it to one project or by name to reach others |
agent_run |
Runs one of them on a message, or on structured input, as you and in production mode. It waits up to about 30 seconds for the answer; a longer run returns its execution id |
agent_result |
Reads a run back: its status and, once finished, its answer |
agent_run refuses an agent that has no published version or whose published version has As Mcp Tool off, and, like the REST API, one whose Chat is off. So until you publish a change to As Mcp Tool, an agent can be listed but refused, or runnable without being listed.
A2A clients¶
An agent can also act as a server of the A2A (Agent2Agent) protocol, version 0.3.0, so that agents built on other platforms can call it. This takes two things:
- A2A turned on for your organization. It is off by default, and an instance administrator turns it on with
PATCH /api/v1/admin/organizations/{id}and{"features": {"agents.a2a": true}}. - A2a on in the agent's published version.
The agent then serves:
- its Agent Card at
GET /api/v1/a2a/agents/{id}/card, also at/api/v1/a2a/agents/{id}/.well-known/agent-card.json; - a JSON-RPC endpoint at
POST /api/v1/a2a/agents/{id}that answersmessage/send,message/stream(server-sent events),tasks/getandtasks/cancel.
Callers authenticate as a Crios user, for example with a personal access token sent as a bearer token, as the card says. Reading the card takes view access to the agent's project; sending messages takes editor access. An agent that does not exist, is not published or does not have A2a on answers 404, so the endpoint does not reveal which agents exist.
How messages map onto runs:
- Each message starts one task, which is one production run of the agent. Its text parts become the agent's message, and the fields of a data part ride along with it. File parts are not supported.
- A follow-up message that names an earlier task's
contextIdcontinues that conversation: the agent sees the earlier messages and its own answers, and every task of the conversation reports the samecontextId. A message that names an existingtaskIdis refused as unsupported; send a new message instead. - A stream lasts up to 10 minutes. A run that takes longer finishes through
tasks/get.