Agents

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

delete/agents/{agent_id}

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

agent_idstring required

ID of the agent.

Example:agnt_6968b3984d1c238dbe7e2e29

Query parameters

purgeboolean

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.

Example:true

Response

Successful Response

Changes