---
title: "Rename or redescribe an inline sub-agent"
method: PATCH
path: "/api/v1/agents/{agent_id}/sub-agents/{sub_agent_id}"
tags: ["agents"]
---

# Rename or redescribe an inline sub-agent

`PATCH /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

``{name?, description?}``. Its guardrails, capabilities and keys refer
to it by id and stay with it. Audited ``agent.sub_agent.update`` with
each changed field before and after. A rename also drops the runtime's
cached verifications of its keys, which name it.

## Path parameters

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

## Headers

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

## Request body

- SubAgentUpdate: An inline sub-agent's name or description. Renaming changes nothing else: its guardrails, capabilities and keys refer to it by id.
  - `name` string, nullable
  - `description` string, nullable

## Response `200`

Successful Response

- InlineSubAgentRead
  - `id` string, uuid, required
  - `kind` 'inline'
  - `name` string, required
  - `description` string, nullable, required
  - `created_at` string, date-time, required
  - `checks_count` integer
  - `capabilities_count` integer
  - `keys_count` integer

## Other responses

- `404`: No such sub-agent of this agent
- `422`: Refused (`detail.code`): `invalid_name`, `duplicate_name`, `not_found` (no agent of this organisation has the id), `self`, `hybrid`, `duplicate_link`, `limit`, `not_inline`

## 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/patch.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)
