> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenovia.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update inline sub-agent

> **Auth:** organization API key with `write` scope, or a signed-in user.

Change `name` or `description`. Its guardrails, capabilities and keys stay with it.



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json patch /api/v1/agents/{agent_id}/sub-agents/{sub_agent_id}
openapi: 3.1.0
info:
  title: Xenovia Control Plane API
  version: 1.0.0
  description: >-
    Management API for agents, providers, policies, telemetry, alerts and
    organization settings.
servers:
  - url: https://cp.xenovia.io
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v1/agents/{agent_id}/sub-agents/{sub_agent_id}:
    patch:
      tags:
        - agents
      summary: Update inline sub-agent
      description: >-
        **Auth:** organization API key with `write` scope, or a signed-in user.


        Change `name` or `description`. Its guardrails, capabilities and keys
        stay with it.
      operationId: >-
        update_sub_agent_route_api_v1_agents__agent_id__sub_agents__sub_agent_id__patch
      parameters:
        - name: sub_agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Sub Agent Id
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: X-Request-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Request-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubAgentUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InlineSubAgentRead'
        '404':
          description: No such sub-agent of this agent
        '422':
          description: >-
            Refused (`detail.code`): `invalid_name`, `duplicate_name`,
            `not_found` (no agent of this organisation has the id), `self`,
            `hybrid`, `duplicate_link`, `limit`, `not_inline`
components:
  schemas:
    SubAgentUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Description
      additionalProperties: false
      type: object
      title: SubAgentUpdate
      description: |-
        An inline sub-agent's name or description. Renaming changes nothing
        else: its guardrails, capabilities and keys refer to it by id.
    InlineSubAgentRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        kind:
          type: string
          const: inline
          title: Kind
          default: inline
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
        checks_count:
          type: integer
          title: Checks Count
          default: 0
        capabilities_count:
          type: integer
          title: Capabilities Count
          default: 0
        keys_count:
          type: integer
          title: Keys Count
          default: 0
      type: object
      required:
        - id
        - name
        - description
        - created_at
      title: InlineSubAgentRead
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token: an organization API key (`ak_…`) created under Settings →
        API Keys, or a dashboard user session token. Agent keys (`xe_…`) are not
        accepted here. Endpoints marked as user-only in their description reject
        organization keys with `403`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.