Delete a voice agent
delete_agentDelete a voice agent. If it has a phone number attached, it gets safely detached first and the number stays on the account: give a voice number new routing with set_number_routing (PATCH /v1/numbers/{e164}) and a calls and SMS number with set_voice_sms_number_routing (PATCH /v1/voice-sms-numbers/{e164}). If detaching a calls and SMS number fails (in_progress: another operation is processing the number, or routing_failed: the engine could not disconnect it), the agent is not deleted and nothing changes: repeat the call shortly. Same data as DELETE /v1/agents/{id} (response schema in /openapi.json).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "delete_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the agent to delete, from list_agents. Looks like ag_9f3a2b7c4d1e. |