curl -X DELETE "http://localhost:8000/api/v2/agents/old-agent"
curl -X DELETE "http://localhost:8000/api/v2/agents/old-agent?delete-backup-too=true"
{
"message": "Agent 'old-agent' successfully deleted (backup retained in Moorcheh)"
}
{
"message": "Agent 'old-agent' successfully deleted with all namespace memories"
}
{
"detail": "Unauthorized. Agent management endpoints require either a loopback client or a valid management credential (Authorization: Bearer <key> or X-Api-Key)."
}
{
"detail": {
"error": "AgentNotFound",
"message": "Agent 'old-agent' not found",
"details": {}
}
}
{
"detail": {
"error": "InternalServerError",
"message": "An unexpected error occurred",
"details": {
"original_error": "..."
}
}
}
Agent Management
Delete Agent
Delete an agent’s local metadata; optionally remove its Moorcheh namespace.
DELETE
/
api
/
v2
/
agents
/
{agent_id}
curl -X DELETE "http://localhost:8000/api/v2/agents/old-agent"
curl -X DELETE "http://localhost:8000/api/v2/agents/old-agent?delete-backup-too=true"
{
"message": "Agent 'old-agent' successfully deleted (backup retained in Moorcheh)"
}
{
"message": "Agent 'old-agent' successfully deleted with all namespace memories"
}
{
"detail": "Unauthorized. Agent management endpoints require either a loopback client or a valid management credential (Authorization: Bearer <key> or X-Api-Key)."
}
{
"detail": {
"error": "AgentNotFound",
"message": "Agent 'old-agent' not found",
"details": {}
}
}
{
"detail": {
"error": "InternalServerError",
"message": "An unexpected error occurred",
"details": {
"original_error": "..."
}
}
}
Overview
Removes the agent record from Memanto’s local store. By default, memories remain in Moorcheh under that agent’s namespace. Passdelete-backup-too=true to also delete the namespace and its contents in Moorcheh.
Without
delete-backup-too=true, only local agent metadata is removed; the cloud namespace is left intact.Authentication
string
Bearer <key> — required unless the request originates from a loopback client. See Management Endpoint Authentication.string
Alternative to
Authorization: Bearer — same credential.Path Parameters
string
required
The unique identifier of the agent to delete.
Query Parameters
boolean
When
true, also deletes the agent’s Moorcheh namespace (memanto_agent_{agent_id}) and its memories. When false or omitted, the namespace is not deleted. Accepts true or false.curl -X DELETE "http://localhost:8000/api/v2/agents/old-agent"
curl -X DELETE "http://localhost:8000/api/v2/agents/old-agent?delete-backup-too=true"
{
"message": "Agent 'old-agent' successfully deleted (backup retained in Moorcheh)"
}
{
"message": "Agent 'old-agent' successfully deleted with all namespace memories"
}
{
"detail": "Unauthorized. Agent management endpoints require either a loopback client or a valid management credential (Authorization: Bearer <key> or X-Api-Key)."
}
{
"detail": {
"error": "AgentNotFound",
"message": "Agent 'old-agent' not found",
"details": {}
}
}
{
"detail": {
"error": "InternalServerError",
"message": "An unexpected error occurred",
"details": {
"original_error": "..."
}
}
}
Next Steps
After deleting an agent, you can:- Create a new Agent
- List remaining Agents to verify deletion