claude-opus-5 model. To run it on your own key, add
an Anthropic credential in Model
credentials and pin it from the
model config ("model": { "id": "claude-opus-5", "provider": "anthropic", "model_credential_id": "mcred_..." }); see Model
access. Starting a Session also
requires a ready Claude Code image and qualified Runner; check capability
status before trying one.
Create the Agent and Version 1
agent_… ID and version: 1.
Create the next AgentVersion
harness is not an update field. It is chosen once, at create, and every
later Version carries that choice forward unchanged, so a partial update can
never silently retarget an Agent’s execution loop. Sending it to
agents.update is rejected as an unexpected field. To run one Session on a
different harness, override it on that Session
(agent: { type: "agent_with_overrides", harness: "codex", … }); to change an
Agent’s standing choice, create a new Agent.
A changed effective configuration returns Version 2. The optional version
field is an optimistic-concurrency guard. It rejects the update if another
write already advanced the Agent. Omitting it applies the update to the current
head. An unchanged effective configuration is a no-op and returns the current
Version.
An update’s model replaces the whole model. If the Agent holds a provider
or a model_credential_id, send it again to keep it: an update that leaves a
held selector out is refused with validation.malformed and the field name,
instead of moving the Agent to another provider or payer. To change a held
selector, send the new value, or null to clear it, together with the Agent
version you last read. A change to supply without version, or with a stale
one, is refused, and a newly chosen credential must be an active credential in
the Workspace for the model’s provider. Moving a held credential to a different
provider by changing the model id also needs version. This rule applies to
Agent updates only.
The version field prevents stale writes; it does not decide authorship. UI,
HTTP, SDK, CLI, and MCP all invoke the same Agent operations. Keep zero or one
active desired-state owner for the Agent. See Author an Agent
project before adding a Git- or YAML-backed
reconciler.
Retrieve one exact AgentVersion
List AgentVersion history
Admit the Version into a Session
Create or choose an Environment, then create a Session. Pin the exact AgentVersion when reproducibility matters:version from the Agent selector when you want admission to resolve the
Agent’s current Version.