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

# Retrieve an agent

> Retrieves an agent your Account owns, with its current `status` and
`version`.




## OpenAPI

````yaml /openapi/agents.yaml get /agents/{id}
openapi: 3.0.3
info:
  title: Ionic Agents API
  version: '2026-11-05'
  description: |
    Create and manage your platform's agent identities from your server.

    These endpoints use a platform secret key with `agents:read` or
    `agents:write`, sent without `Ionic-Account`. The Account that owns the key
    owns each agent it creates. An agent identity carries no access to any
    business: a business allows an agent through an
    agent grant request, and agent keys
    are issued in the Ionic dashboard.
servers:
  - url: '{baseUrl}/v1'
    variables:
      baseUrl:
        default: https://api.ionicfi.com
        description: API base URL for your environment.
security:
  - secretKey: []
tags:
  - name: Agents
    description: Create and manage your platform's agent identities.
paths:
  /agents/{id}:
    get:
      tags:
        - Agents
      summary: Retrieve an agent
      description: |
        Retrieves an agent your Account owns, with its current `status` and
        `version`.
      operationId: retrieveAgent
      parameters:
        - $ref: '#/components/parameters/AgentId'
      responses:
        '200':
          description: The agent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          description: >-
            `ACCOUNT_CONTEXT_NOT_SUPPORTED` when the request sends
            `Ionic-Account`. `MIXED_AUTHENTICATION` when a dashboard session
            cookie accompanies the key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/AgentNotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/Unavailable'
      security:
        - secretKey:
            - agents:read
components:
  parameters:
    AgentId:
      name: id
      in: path
      required: true
      description: The agent's ID (`agt_…`).
      schema:
        type: string
  schemas:
    Agent:
      type: object
      description: An agent identity your Account owns.
      example:
        id: agt_3Wd9Kp2Lm7Xq4R
        object: agent
        owner_account_id: mer_9Jt4Wx8Qn2Lp6V
        name: Booking assistant
        handle: '@acme-booking'
        description: Books visits for front-desk staff.
        metadata:
          team: front-desk
        avatar_hue: null
        status: active
        version: 1
        created_by: sk_4Rt8Lm2Qx7Vn3Kp9Wd5Hs1Bz
        created_at: 1793782800
        updated_at: 1793782800
        last_active_at: null
      required:
        - id
        - object
        - owner_account_id
        - name
        - handle
        - description
        - metadata
        - avatar_hue
        - status
        - version
        - created_by
        - created_at
        - updated_at
        - last_active_at
      properties:
        id:
          type: string
          pattern: ^agt_[0-9A-Za-z]{14}$
          description: Unique identifier for the agent.
        object:
          type: string
          enum:
            - agent
        owner_account_id:
          type: string
          pattern: ^mer_[0-9A-Za-z]{14}$
          description: The Account that owns the agent.
        name:
          type: string
          minLength: 1
          maxLength: 120
          description: The agent's display name.
        handle:
          type: string
          description: >-
            The agent's permanent handle, with a leading `@`, for example
            `@acme-booking`.
        description:
          type: string
          maxLength: 2000
          description: What the agent does. An empty string when not set.
        metadata:
          type: object
          maxProperties: 50
          additionalProperties:
            type: string
          description: >-
            Up to 50 string entries for your own use. Keys are 1 to 40 bytes and
            values at most 500 bytes.
        avatar_hue:
          type: integer
          nullable: true
          minimum: 0
          maximum: 359
          description: >-
            Hue of the agent's tile, from 0 to 359. `null` uses the color
            derived from the handle.
        status:
          type: string
          enum:
            - active
            - suspended
            - deactivated
          description: >-
            `active` agents can act where a business allows them. `suspended`
            agents are paused by you or by Ionic. `deactivated` is permanent.
        version:
          type: integer
          minimum: 1
          description: >-
            Increases with each change to the identity. Send it as
            `expected_version` when you change the agent. Agent activity does
            not change it.
        created_by:
          type: string
          pattern: ^(user_.+|sk_[0-9A-Za-z]{24})$
          description: >-
            Who created the agent. The ID of the secret key (`sk_…`) for an
            agent created through the API, or the dashboard user (`user_…`).
            Never contains a key's secret.
        created_at:
          type: integer
          format: int64
          description: Unix timestamp when the agent was created.
        updated_at:
          type: integer
          format: int64
          description: Unix timestamp of the last change to the identity.
        last_active_at:
          type: integer
          format: int64
          nullable: true
          description: >-
            Unix timestamp of the agent's most recent activity, or `null` before
            any.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          description: Details about the error.
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        `PLATFORM_CREDENTIAL_REQUIRED` for a key that is not a platform secret
        key. `AGENT_MANAGEMENT_FORBIDDEN` when the key lacks this operation's
        permission, your Account is not active, or your Platform Program does
        not allow delegated API access with this permission in the key's mode.
        `AGENT_OPERATION_UNAVAILABLE` for an agent's own key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    AgentNotFound:
      description: '`AGENT_NOT_FOUND` when your Account owns no agent with this ID.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: >-
        `AGENT_MANAGEMENT_UNAVAILABLE` when Ionic cannot check your key's
        current access. Retry later. For a change, retry with the same
        `Idempotency-Key` and body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: 'A platform secret key (`sk_…`) sent as `Authorization: Bearer <key>`.'

````

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