> ## 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.

# List sub-agents

> **Auth:** organization API key (`read` scope or higher) or a signed-in user.

The agent's inline sub-agents, with how many guardrails, capabilities and keys are scoped to each, and its linked sub-agents (the agents it may call), oldest first.



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json get /api/v1/agents/{agent_id}/sub-agents
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:
    get:
      tags:
        - agents
      summary: List sub-agents
      description: >-
        **Auth:** organization API key (`read` scope or higher) or a signed-in
        user.


        The agent's inline sub-agents, with how many guardrails, capabilities
        and keys are scoped to each, and its linked sub-agents (the agents it
        may call), oldest first.
      operationId: list_sub_agents_route_api_v1_agents__agent_id__sub_agents_get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubAgentList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SubAgentList:
      properties:
        inline:
          items:
            $ref: '#/components/schemas/InlineSubAgentRead'
          type: array
          title: Inline
        linked:
          items:
            $ref: '#/components/schemas/LinkedSubAgentRead'
          type: array
          title: Linked
      type: object
      title: SubAgentList
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    LinkedSubAgentRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        kind:
          type: string
          const: linked
          title: Kind
          default: linked
        agent_id:
          type: string
          format: uuid
          title: Agent Id
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
        agent_status:
          $ref: '#/components/schemas/AgentStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - agent_id
        - agent_name
        - agent_status
        - created_at
      title: LinkedSubAgentRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AgentStatus:
      type: string
      enum:
        - draft
        - active
      title: AgentStatus
  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.