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

# Get Agent

> Retrieve an agent in a simplified view — its attached tools as one flat list, plus core configuration.

Returns a **simplified agent view**. Instead of the low-level `graph`, `attached_tools`, `oas`, and fully-resolved tool schemas, the agent's tools are surfaced as one flat `tools` array (see the `AgentTool` shape below). Use the [Tools API](/api-reference/v1/tools/list-tools) to add or remove tools.

## Path Parameters

<ParamField path="agent_id" type="string" required>
  Unique identifier of the agent (UUID format)
</ParamField>

## Response

<ResponseField name="id" type="string">Agent UUID</ResponseField>
<ResponseField name="name" type="string">Display name</ResponseField>
<ResponseField name="description" type="string">What the agent does (auto-generated on deploy from `instructions`)</ResponseField>
<ResponseField name="icon" type="string">Emoji icon (e.g., `🚀`)</ResponseField>
<ResponseField name="type" type="string">Agent type (e.g., `regular`, `manager`)</ResponseField>
<ResponseField name="status" type="string">`ACTIVE` (deployed) or `INACTIVE`</ResponseField>
<ResponseField name="model_provider" type="string">LLM provider (e.g., `anthropic`)</ResponseField>
<ResponseField name="model_name" type="string">LLM model (e.g., `claude-sonnet-4-6`)</ResponseField>

<ResponseField name="instructions" type="object">
  <Expandable title="Instructions">
    <ResponseField name="role" type="string[]">Role statements</ResponseField>
    <ResponseField name="goal" type="string[]">Goals</ResponseField>
    <ResponseField name="general" type="string">Free-form general instructions</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="knowledge_base_ids" type="string[]">IDs of attached knowledge bases</ResponseField>
<ResponseField name="source_node_types" type="string[]">Trigger source types (e.g., `sdk`, `webhook`, `slack`)</ResponseField>

<ResponseField name="tools" type="array">
  The agent's attached tools, unified across kinds. Each item is an `AgentTool`:

  <Expandable title="AgentTool">
    <ResponseField name="id" type="string">Stable handle for this attached tool. Pass it to [Remove Agent Tool](/api-reference/v1/agents/tools/remove-agent-tool).</ResponseField>
    <ResponseField name="type" type="string">One of `action`, `custom_function`, `mcp`, `agent`, `workflow`.</ResponseField>
    <ResponseField name="name" type="string | null">Human-readable tool name.</ResponseField>
    <ResponseField name="connection_id" type="string | null">Connector connection id. `action` only.</ResponseField>
    <ResponseField name="operation_id" type="string | null">Operation catalog id. `action` only.</ResponseField>
    <ResponseField name="operation_name" type="string | null">OpenAPI operationId. `action` only.</ResponseField>
    <ResponseField name="custom_function_id" type="string | null">Custom function id. `custom_function` only.</ResponseField>
    <ResponseField name="mcp_id" type="string | null">MCP registry id. `mcp` only.</ResponseField>
    <ResponseField name="allowed_tools" type="string[] | null">Subset of MCP tools exposed. `mcp` only.</ResponseField>
    <ResponseField name="target_id" type="string | null">Referenced sub-agent or workflow id. `agent` / `workflow` only.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="created_at" type="string">ISO 8601 creation timestamp</ResponseField>
<ResponseField name="created_by" type="string | null">UUID of the creating user</ResponseField>

<ResponseField name="created_by_details" type="object | null">
  Resolved creator details (`null` when unavailable — null-check before reading).

  <Expandable title="Created By Details">
    <ResponseField name="id" type="string">User UUID</ResponseField>
    <ResponseField name="name" type="string">Display name (falls back to email/id)</ResponseField>
    <ResponseField name="email" type="string">User email</ResponseField>
  </Expandable>
</ResponseField>


## OpenAPI

````yaml GET /v1/agents/{agent_id}
openapi: 3.1.0
info:
  title: xpander.ai API Service
  description: |2-

        The xpander.ai API Service provides a unified REST API for managing AI agents,
        executing tasks, managing knowledge bases, and integrating with external systems.
        
        Features:
        - Agent Management: Create, update, deploy, and delete AI agents
        - Task Execution: Invoke agents with support for sync, async, and streaming modes
        - Knowledge Bases: Manage knowledge bases and documents for RAG workflows
        - Tools: Discover, connect, and attach tools (connectors, custom functions, MCP servers, sub-agents, workflows) to agents and workflows
        - MCP Integration: Model Context Protocol support for standardized AI interactions
        
        Authentication: All endpoints require authentication via either an API key (`x-api-key`) or an OAuth2 JWT (`Authorization: Bearer <jwt>`).
        
  version: '0.001'
servers:
  - url: https://api.xpander.ai
security: []
paths:
  /v1/agents/{agent_id}:
    get:
      tags:
        - API v1
        - Agents
      summary: Get Agent
      description: >-
        Retrieve a specific AI agent in a simplified view (tools as one list, no
        low-level graph/oas).
      operationId: Get_Agent_v1_agents__agent_id__get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimplifiedAIAgent'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    SimplifiedAIAgent:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Agent id.
        name:
          type: string
          title: Name
          description: Agent name.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Agent description.
        icon:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon
          description: Agent icon.
        type:
          anyOf:
            - $ref: '#/components/schemas/AgentType'
            - type: 'null'
          description: Agent type.
        status:
          anyOf:
            - $ref: '#/components/schemas/AgentStatus'
            - type: 'null'
          description: Agent status.
        model_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Provider
          description: LLM provider.
        model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Name
          description: LLM model.
        instructions:
          anyOf:
            - $ref: '#/components/schemas/AIAgentInstructions'
            - type: 'null'
          description: Agent instructions.
        knowledge_base_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Knowledge Base Ids
          description: Attached knowledge base ids.
          default: []
        source_node_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Source Node Types
          description: Trigger source types (sdk, webhook, slack, ...).
          default: []
        tools:
          items:
            $ref: '#/components/schemas/AgentTool'
          type: array
          title: Tools
          description: Tools attached to this agent.
          default: []
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Creation timestamp.
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
          description: Creator user id.
        created_by_details:
          anyOf:
            - $ref: '#/components/schemas/CreatedByDetails'
            - type: 'null'
          description: Creator details.
      type: object
      required:
        - name
      title: SimplifiedAIAgent
      description: >-
        Lean agent view exposing tools as one simple list, hiding low-level
        graph/oas internals.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentType:
      type: string
      enum:
        - manager
        - regular
        - a2a
        - curl
        - orchestration
      title: AgentType
      description: |-
        Enumeration of the agent types.

        Attributes:
            Manager: marks the agent as a Managing agent.
            Regular: marks the agent as a regular agent.
            A2A: marks the agent as an external agent used via A2A protocol.
            Curl: marks the agent as an external agent used via a CURL.
            Orchestration: marks the agent as an Orchestration object.
    AgentStatus:
      type: string
      enum:
        - DRAFT
        - ACTIVE
        - INACTIVE
      title: AgentStatus
      description: |-
        Enumeration of possible agent statuses.

        Attributes:
            DRAFT: Agent is in a draft state.
            ACTIVE: Agent is active and operational.
            INACTIVE: Agent is inactive and not operational.
    AIAgentInstructions:
      properties:
        role:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Role
          default: []
        goal:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Goal
          default: []
        general:
          anyOf:
            - type: string
            - type: 'null'
          title: General
          default: ''
      type: object
      title: AIAgentInstructions
    AgentTool:
      properties:
        id:
          type: string
          title: Id
          description: >-
            Stable handle for this attached tool. Pass it to DELETE to remove
            the tool.
        type:
          $ref: '#/components/schemas/AgentToolType'
          description: The kind of attached tool.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Human-readable tool name.
        connection_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Connection Id
          description: Connector connection id. Actions only.
        operation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Operation Id
          description: Operation catalog id. Actions only.
        operation_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Operation Name
          description: OpenAPI operationId. Actions only.
        custom_function_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Custom Function Id
          description: Custom function id. Custom functions only.
        mcp_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Mcp Id
          description: MCP registry id. MCP only.
        allowed_tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Tools
          description: Subset of MCP tools exposed. MCP only.
        target_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Id
          description: Referenced sub-agent or workflow id.
      type: object
      required:
        - id
        - type
      title: AgentTool
      description: >-
        A tool attached to an agent — the simplified, unified view of one graph
        entry.
    CreatedByDetails:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        email:
          type: string
          title: Email
      type: object
      required:
        - id
        - name
        - email
      title: CreatedByDetails
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AgentToolType:
      type: string
      enum:
        - action
        - custom_function
        - mcp
        - agent
        - workflow
      title: AgentToolType
      description: Type of a tool attached to an agent.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: API Key for authentication
      in: header
      name: x-api-key

````