---
title: "Delete a sub-agent"
method: DELETE
path: "/api/v1/agents/{agent_id}/sub-agents/{sub_agent_id}"
tags: ["agents"]
---

# Delete a sub-agent

`DELETE /api/v1/agents/{agent_id}/sub-agents/{sub_agent_id}`

## Request

- Base URL: `https://cp.xenovia.io` (the document declares no server; this is the origin it was published from)
- URL: `https://cp.xenovia.io/api/v1/agents/{agent_id}/sub-agents/{sub_agent_id}`
- Auth: none declared

Deleting an inline sub-agent deletes the guardrails, capabilities and
keys scoped to it (its keys stop working at once); unlinking an agent
leaves that agent as it is. Audited ``agent.sub_agent.delete`` with what
went with it.

## Path parameters

- `sub_agent_id` string, uuid, required
- `agent_id` string, uuid, required

## Headers

- `Authorization` string, nullable
- `X-Request-ID` string, nullable

## Response `204`

Successful Response

## Other responses

- `404`: No such sub-agent of this agent
- `422`: Validation Error

## Changes

- **2026-10-26** `3e25bef24f8f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/xenovia/apis/controlplane/changes/api/v1/agents/:agent_id/sub-agents/:sub_agent_id/delete.md)

---

[API](https://skmtc.dev/xenovia/apis/controlplane.md) - [All operations](https://skmtc.dev/xenovia/apis/controlplane/llms.txt) - [OpenAPI document](https://skmtc.dev/xenovia/apis/controlplane/revisions/3e25bef24f8f?raw)
