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

# Get an agent

> Get one accessible published agent. Use its assistant_id when starting a run.



## OpenAPI

````yaml /api/openapi.sdk.json get /api/ai/assistants/{assistant_id}
openapi: 3.0.3
info:
  title: XpertAI SDK HTTP API
  version: 1.0.0
  description: >-
    Current HTTP endpoints used by the SDK guide. Authenticate with a
    server-side API Key using Authorization: Bearer <API_KEY> or x-api-key.
    These endpoints do not require ChatKit. The reference covers the guide
    examples, not every method exported by the SDK. Check deployment support
    before using additional fields.
servers:
  - url: https://api.xpertai.cn
    description: XpertAI API. Replace with your own API origin for private deployments.
security:
  - ApiKeyBearer: []
  - ApiKeyHeader: []
tags:
  - name: Assistants
  - name: Threads
  - name: Runs
  - name: Contexts
  - name: Store
paths:
  /api/ai/assistants/{assistant_id}:
    get:
      tags:
        - Assistants
      summary: Get an agent
      description: >-
        Get one accessible published agent. Use its assistant_id when starting a
        run.
      operationId: get_assistant
      parameters:
        - name: assistant_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Assistant'
              example:
                assistant_id: 22222222-2222-4222-8222-222222222222
                name: Example agent
                version: 1
        '400':
          description: Invalid input, identifier mismatch or invalid operation state.
        '401':
          description: Missing or invalid API Key.
        '403':
          description: The caller cannot access the requested resource.
        '404':
          description: Resource not found or unavailable to the caller.
components:
  schemas:
    Assistant:
      type: object
      properties:
        assistant_id:
          type: string
          description: Published agent ID, also used as xpertId in SDK examples.
        graph_id:
          type: string
        name:
          type: string
        description:
          type: string
        version:
          type: number
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        config:
          type: object
          additionalProperties: true
        metadata:
          type: object
          additionalProperties: true
      required:
        - assistant_id
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      description: Server-side API Key; do not expose it in browser code.
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````

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