Agents
Pin Agent Version
Pin Agent Version
PUT
/v2/agents/{agent_id}/pinENG-1219 §4.1: point the agent at one of its versions. New tasks then run that version's definition (spec P6) until the pin moves. Manage gate + id-scoped version read, in that order (404 before any write; no existence oracle for other agents' versions). Not a configuration change: no capture mark is enqueued.
Path Parameters
agent_idstring · uuidrequiredRequest Body
version_idstring · uuidrequiredexpected_version_idstring · uuidoptionalThe pin the caller last saw: a version id, or null for no pin. When sent, the pin moves only if it is still that, and a pin changed in the meantime is refused with 409 pin_changed. Omit it (do not send null) to move the pin whatever it is now.
curl --request PUT \
--url https://api.brainbaselabs.com/v2/agents/{agent_id}/pin \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",
"expected_version_id": "49ca9bba-dad0-4265-8635-2d2ed4eba517"
}'