Archive Agent
Changed onArchive an agent — or, with purge=true, hard-delete it.
Archive keeps the row for history, but the action is not reversible and the agent's authority is swept: permission grants, credential bindings, and OAuth consent grants are revoked. For the reversible kill switch use :disable / :enable instead.
Purge removes the agent and its authority and session rows; it archives first if needed, so the agent's authority is gone before any cleanup runs, and a failed purge leaves the agent archived and can be retried. Archive returns 409 for an already-archived agent; purge accepts any status.
Request
- Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
- URL: /agents/{agent_id}
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL /authorize, token URL /oauth/token)
Path parameters
ID of the agent.
Query parameters
Default false: the agent is archived (terminal-but-kept; its row stays for history). true hard-deletes the agent from any status, together with its tokens, consent grants, permission grants and rules, bindings and connect sessions, and cancels its queued and running jobs. History (audit entries, events, execution records, finished jobs, notes) and the credentials it created are kept; once the agent is gone that history is visible to org:admin only.
Response
Successful Response
Changes
- info
the endpoint scheme security
OAuth2was added to the API
- info
- info
added the new optional
queryrequest parameterpurge
- info