Connect a client
The endpoint is per project:- Claude Code
- JSON configuration
Rights
A client is offered only the tools whose scopes its key holds; with* it
sees them all. The API checks the scopes again on every call. A project key is
never offered the tools that change organization-shared MCP servers and
policies.
Publishing an agent version that binds Skills or MCP toolsets also needs
skill:bind or mcp:bind, as it does over REST.
No tool takes a plaintext secret. Model, storage, and sandbox provider
credentials, MCP credentials, and API keys are created in the console or
through the HTTP API, so a secret never passes through an agent’s context.
Ask an agent about its run
To question an agent about work it did:list_sessionsfinds the session; passagentIdto keep one agent’s sessions.get_sessionreads its runs and full transcript.send_messagesends the question to that same session as a new run. The agent answers with the whole session in context.
conflict.
start_session, send_message, and message_delegation wait up to
waitSeconds (default 45, at most 600) for the run to settle and then return
the agent’s answer. When the run is still going, the result has
settled: false; call wait_for_run later. A run waiting for a human
approval does not settle until someone decides it, for example with
decide_approval.
Let OAO agents use these tools
An agent inside OAO can use the same tools, for example to check what other agents did and ask them about it. The server is built in, so there is no connection, endpoint, or credential to set up:- MCP connections lists OAO as a built-in connection in every project. Manage shows which agents use it; Use next to an agent picks the scopes and publishes a new version of that agent with them, and Stop using publishes one without.
- In the agent editor, OAO MCP server does the same for the version you are editing.
- Through the API, set
oaoToolsin the agent version config:
oao__ prefix, such as
oao__list_sessions and oao__send_message.
- Identity. A run acts as the person or API key that started it. Its
rights are the scopes in
oaoToolsthat this principal still holds when the tool runs; removing a member or revoking the key takes them away at once. Like a project key, a run stays in its project and is never offered the tools that change organization-shared connections. The audit trail records the acting run asviaRunId. - Grant.
scopesare any ofagent:read,agent:write,skill:read,skill:write,skill:bind,mcp:read,mcp:write,mcp:discover,mcp:bind,credential:read_metadata,session:read,session:write,run:create,run:read,run:cancel,delegation:read,delegation:message, andaudit:read. The publisher must hold each one.approval:resolveandproject:admincannot be granted, so an agent never approves its own or another agent’s tool calls. - Approval. Read-only tools run at once.
approval(defaultalways) decides whether tools that change OAO wait for a person to approve each call. - No chains. A run an agent started, by sending a message or starting a session, keeps only the read scopes of its grant, and so do the runs it delegates to. It cannot change OAO or start or message further runs, which rules out agents asking each other in a loop.
- Credentials. The runtime worker mints a token for each call, valid only
for that call and while the run is unsettled, and keeps only its SHA-256.
Writes use the tool call as their
Idempotency-Key, so a replayed call repeats nothing.
OAO_API_URL, for example
http://127.0.0.1:3000. pnpm dev:local sets it; in a deployment, set it on
the worker to an address of the API the worker can reach. Without it, OAO tool
calls fail with an error that names the variable.
Retries and results
Every write sends anIdempotency-Key. Pass idempotencyKey to retry a call
safely: the same key and arguments return the first result instead of doing
the work twice. Without it, each call is a new write.
Results are the API’s JSON. get_session leaves out the debug block (model
invocations, tool calls, and sandbox detail) unless includeDebug is true.
It always includes resolvedVersions, the exact agent, Skill, and delegate
versions the session runs. create_agent and publish_agent_version take the
same configuration as the API, so a delegate can pin agentVersionId or follow
agentId, and Skills can be pinned in skillVersionIds or followed in
skillIds. See Multi-agent
orchestration.
A failed call is a tool error carrying the API’s status, code, message,
and requestId.
