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

# Get AI Agent

> Returns a single AI agent by ID, including vector store files when available.

<Note>
  Call this endpoint on the AI service: `https://ai.pingmee.co.il`.
</Note>


## OpenAPI

````yaml GET /ai-agents/{id}
openapi: 3.1.0
info:
  title: Pingmee API
  description: A complete guide to Pingmee micro service architecture.
  version: 1.0.0
servers:
  - url: https://api.pingmee.co.il
security:
  - cookieAuth: []
    ApiKeyAuth: []
paths:
  /ai-agents/{id}:
    servers:
      - url: https://ai.pingmee.co.il
        description: AI service
    get:
      summary: Get AI agent
      description: >-
        Returns a single AI agent by ID, including vector store files when
        available.
      parameters:
        - name: id
          in: path
          required: true
          description: AI agent identifier
          schema:
            type: string
      responses:
        '200':
          description: AI agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AIAgent'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: AI agent not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AIAgent:
      type: object
      required:
        - id
        - name
        - associatedTo
        - folderId
        - created
        - lastModified
        - isActive
        - profileImage
        - roles
      properties:
        id:
          type: string
          description: AI agent identifier
        name:
          type: string
          description: Display name
        description:
          type: string
          maxLength: 5000
          description: Business / agent description used as context (max 5000 characters)
        associatedTo:
          type: string
          description: Business the agent belongs to
        folderId:
          type: string
          description: Folder that contains this agent
        created:
          type: number
          description: Unix timestamp (milliseconds) when the agent was created
        lastModified:
          type: number
          description: Unix timestamp (milliseconds) when the agent was last modified
        isActive:
          type: boolean
          description: Whether the agent is active
        profileImage:
          type: string
          description: Profile image URL (may be signed)
        tokensUsed:
          type: number
          description: Cumulative tokens used by this agent
        roles:
          type: array
          items:
            $ref: '#/components/schemas/AIAgentRole'
        vectorStore:
          $ref: '#/components/schemas/AIAgentVectorStore'
      additionalProperties: false
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    AIAgentRole:
      type: object
      required:
        - name
        - description
        - instructions
        - webhook
        - allRequired
      properties:
        name:
          type: string
          maxLength: 40
          description: >-
            Role name (max 40 characters). Also used to derive the OpenAI
            function tool name.
        description:
          type: string
          maxLength: 1500
          description: Short description of the role (max 1500 characters)
        instructions:
          type: string
          maxLength: 1500
          description: >-
            Instructions used when generating the role tool schema (max 1500
            characters)
        webhook:
          type: string
          maxLength: 300
          description: >-
            Webhook URL invoked when this role tool is called (max 300
            characters)
        allRequired:
          type: boolean
          description: When true, generated tool parameters are all required (strict mode)
        tool:
          type: object
          description: Generated OpenAI function tool definition
          additionalProperties: true
      additionalProperties: false
    AIAgentVectorStore:
      type: object
      properties:
        id:
          type: string
          description: Vector store identifier
        required:
          type: boolean
          description: Whether the agent must use the vector store for answers
        files:
          type: array
          description: Files currently in the vector store
          items:
            type: object
            additionalProperties: true
        fileNamesMapping:
          type: object
          description: Map of vector store file IDs to display names
          additionalProperties:
            type: string
      additionalProperties: false
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: header
      name: Cookie
      description: Personal access token from Pingmee Settings → Developer Tools
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Business API key from Pingmee Settings → Developer Tools

````