delete_agents

Permanently remove a list of agents, keyed by id.

AgentwritesidempotentdestructiveMCP tool

This is a hard delete, not the panel's archive: the records and the transcripts go with them and search will never find the conversations again. The worktree of each one is removed with it, so a batch can tear down real directories. Returns not_found, and deletes nothing at all, if any id given holds no agent. It answers as soon as the teardown of each directory is under way rather than once it has finished, so success here means the removal was started. The agents leave list_agents at once and stay out while their teardowns run: one that fails afterwards comes back in AGENT_STATE_FAILED_TO_CLEANUP with the reason on it, rather than being removed, and the panel shows that row. Prefer archive_agents, and prefer leaving agents alone unless asked to remove them. The children of any agent named here are deleted with it, and a child named on its own is deleted alone, since it holds no directory of its own to tear down.

Calling it#

curl -X POST http://127.0.0.1:8787/agent.v1.AgentService/DeleteAgents \
  -H 'Content-Type: application/json' \
  -d '{
  "ids": [
    "<ids>"
  ]
}'

Request#

DeleteAgentsRequest#

FieldTypeDescription
idslist of string

The agents to remove for good, transcripts and worktrees with them.

required

Response#

Empty#

No fields.