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