Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete an agent

DELETE/agents/{agent_id}

Deletes a reusable agent. See agent configuration.

Path ParametersExpand Collapse
agent_id: string
minLength0
maxLength1048576
ReturnsExpand Collapse
AgentDeleted object { id, deleted, object }

A deleted reusable agent.

id: string

The ID of the deleted agent.

minLength0
deleted: boolean

Whether the agent was deleted. Always true.

object: "agent.deleted"

The object type. Always agent.deleted.

Delete an agent

curl https://api.openai.com/v1/agents/$AGENT_ID \
    -X DELETE \
    -H 'OpenAI-Beta: agents=v1' \
    -H "Authorization: Bearer $OPENAI_API_KEY"
{
  "id": "id",
  "deleted": true,
  "object": "agent.deleted"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "agent.deleted"
}