> ## Documentation Index
> Fetch the complete documentation index at: https://test-8862363a-tembo-docs-codex-usage-reset.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve an agent

> Retrieve an agent and its configuration, repository associations, and run summary.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public get /v1/agents/{agentId}
openapi: 3.1.0
info:
  title: Tembo Public API
  description: >-
    Manage agents, sessions, repositories, and organization resources with the
    Tembo API.
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/agents/{agentId}:
    get:
      tags:
        - Agents
      summary: Retrieve an agent
      description: >-
        Retrieve an agent and its configuration, repository associations, and
        run summary.
      operationId: retrieveAgent
      parameters:
        - in: path
          name: agentId
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          description: Retrieve an agent
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  key:
                    type:
                      - string
                      - 'null'
                  sandboxSize:
                    type:
                      - string
                      - 'null'
                    enum:
                      - nano
                      - micro
                      - small
                      - medium
                      - large
                      - xl
                      - xxl
                      - ultra
                      - null
                  projectId:
                    type:
                      - string
                      - 'null'
                  templateId:
                    type:
                      - string
                      - 'null'
                  script:
                    type:
                      - string
                      - 'null'
                  artifactType:
                    type:
                      - string
                      - 'null'
                    enum:
                      - PullRequest
                      - ToolCall
                      - Plan
                      - Response
                      - File
                      - Service
                      - Source
                      - null
                  autoDetectRepositories:
                    type: boolean
                    default: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  archivedAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  enabledAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                  organizationId:
                    type:
                      - string
                      - 'null'
                    minLength: 1
                    maxLength: 255
                  organizationName:
                    type:
                      - string
                      - 'null'
                  createdBy:
                    type:
                      - string
                      - 'null'
                  instructions:
                    oneOf:
                      - $ref: '#/components/schemas/TipTapDocument'
                        description: >-
                          Instructions for the agent as a rich-text document.
                          Mentions can reference integrations used by the agent.
                      - type: 'null'
                  agent:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Runtime and model selection key; not the ID of an agent
                      resource.
                  agentOptions:
                    $ref: '#/components/schemas/AgentOptionsInput'
                  mcpServers:
                    type: array
                    items:
                      type: string
                      minLength: 1
                      maxLength: 200
                    maxItems: 100
                    description: >-
                      Selected MCP server identifiers, including built-in server
                      keys.
                  userState:
                    oneOf:
                      - $ref: '#/components/schemas/AgentState'
                      - type: 'null'
                  codeRepositories:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        owner:
                          type:
                            - string
                            - 'null'
                        integrationId:
                          type: string
                          format: uuid
                        integrationType:
                          type: string
                      required:
                        - id
                        - name
                        - owner
                        - integrationId
                        - integrationType
                      additionalProperties: false
                    maxItems: 250
                  lastRun:
                    type:
                      - object
                      - 'null'
                    properties:
                      id:
                        type: string
                        format: uuid
                      sessionId:
                        type:
                          - string
                          - 'null'
                      status:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      durationMs:
                        type: integer
                        description: Measured duration of the agent run in milliseconds.
                      errorMessage:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - sessionId
                      - status
                      - createdAt
                      - updatedAt
                      - durationMs
                      - errorMessage
                    additionalProperties: false
                  runCount:
                    type: integer
                    minimum: 0
                  scheduleCount:
                    type: integer
                    minimum: 0
                  triggerCount:
                    type: integer
                    minimum: 0
                  hasPausedSchedule:
                    type: boolean
                  hasPausedTrigger:
                    type: boolean
                  integrationIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                  integrationTypes:
                    type: array
                    items:
                      type: string
                required:
                  - id
                  - name
                  - key
                  - sandboxSize
                  - projectId
                  - templateId
                  - script
                  - artifactType
                  - autoDetectRepositories
                  - createdAt
                  - updatedAt
                  - archivedAt
                  - enabledAt
                  - organizationId
                  - organizationName
                  - createdBy
                  - instructions
                  - agent
                  - agentOptions
                  - mcpServers
                  - userState
                  - codeRepositories
                  - lastRun
                  - runCount
                  - scheduleCount
                  - triggerCount
                  - hasPausedSchedule
                  - hasPausedTrigger
                  - integrationIds
                  - integrationTypes
                additionalProperties: false
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Resource conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Agent operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: >
            import Tembo from '@tembo-io/sdk';


            const client = new Tembo();


            const agent = await
            client.agents.retrieve('7c9e6679-7425-40de-944b-e07fc1f90ae7');
components:
  schemas:
    TipTapDocument:
      anyOf:
        - $ref: '#/components/schemas/TipTapNode'
        - $ref: '#/components/schemas/CustomDocument'
      description: >-
        Rich-text document containing text, formatting, images, and mentions. A
        document typically has a "doc" root with nested content nodes.
      example:
        type: doc
        content:
          - type: paragraph
            content:
              - type: text
                text: Hello
    AgentOptionsInput:
      anyOf:
        - type: object
          properties:
            reasoningLevel:
              type: string
              minLength: 1
              maxLength: 100
            mode:
              type: string
              enum:
                - normal
                - planning
            speed:
              type: string
              enum:
                - normal
                - fast
            goal:
              type: object
              properties:
                enabled:
                  type: boolean
                objective:
                  type: string
                  maxLength: 100000
              additionalProperties: false
          additionalProperties: true
        - $ref: '#/components/schemas/RuntimeAgentOptions'
      description: >-
        Execution settings for the selected agent runtime, including
        provider-specific options.
    AgentState:
      type: object
      additionalProperties: {}
      description: >-
        User-defined state keyed by name. Values may be any JSON value,
        including nested objects and arrays. No application-specific keys are
        required.
    TipTapNode:
      anyOf:
        - oneOf:
            - type: object
              properties:
                text:
                  type: string
                  maxLength: 1000000
                marks:
                  type: array
                  items:
                    anyOf:
                      - $ref: '#/components/schemas/TipTapLinkMark'
                      - $ref: '#/components/schemas/TipTapMark'
                  maxItems: 1000
                type:
                  type: string
                  const: image
                attrs:
                  $ref: '#/components/schemas/TipTapImageAttributes'
                content:
                  type: array
                  items:
                    $ref: '#/components/schemas/TipTapNode'
                  maxItems: 10000
              required:
                - type
              additionalProperties: {}
            - type: object
              properties:
                text:
                  type: string
                  maxLength: 1000000
                marks:
                  type: array
                  items:
                    anyOf:
                      - $ref: '#/components/schemas/TipTapLinkMark'
                      - $ref: '#/components/schemas/TipTapMark'
                  maxItems: 1000
                type:
                  type: string
                  const: mention
                attrs:
                  $ref: '#/components/schemas/TipTapMentionAttributes'
                content:
                  type: array
                  items:
                    $ref: '#/components/schemas/TipTapNode'
                  maxItems: 10000
              required:
                - type
              additionalProperties: {}
            - type: object
              properties:
                text:
                  type: string
                  maxLength: 1000000
                marks:
                  type: array
                  items:
                    anyOf:
                      - $ref: '#/components/schemas/TipTapLinkMark'
                      - $ref: '#/components/schemas/TipTapMark'
                  maxItems: 1000
                type:
                  type: string
                  const: heading
                attrs:
                  type: object
                  properties:
                    level:
                      type: integer
                      minimum: 1
                      maximum: 6
                  additionalProperties: {}
                content:
                  type: array
                  items:
                    $ref: '#/components/schemas/TipTapNode'
                  maxItems: 10000
              required:
                - type
              additionalProperties: {}
            - type: object
              properties:
                text:
                  type: string
                  maxLength: 1000000
                marks:
                  type: array
                  items:
                    anyOf:
                      - $ref: '#/components/schemas/TipTapLinkMark'
                      - $ref: '#/components/schemas/TipTapMark'
                  maxItems: 1000
                type:
                  type: string
                  const: orderedList
                attrs:
                  type: object
                  properties:
                    start:
                      type: integer
                    type:
                      type:
                        - string
                        - 'null'
                  additionalProperties: {}
                content:
                  type: array
                  items:
                    $ref: '#/components/schemas/TipTapNode'
                  maxItems: 10000
              required:
                - type
              additionalProperties: {}
            - type: object
              properties:
                text:
                  type: string
                  maxLength: 1000000
                marks:
                  type: array
                  items:
                    anyOf:
                      - $ref: '#/components/schemas/TipTapLinkMark'
                      - $ref: '#/components/schemas/TipTapMark'
                  maxItems: 1000
                type:
                  type: string
                  const: taskItem
                attrs:
                  type: object
                  properties:
                    checked:
                      type: boolean
                  additionalProperties: {}
                content:
                  type: array
                  items:
                    $ref: '#/components/schemas/TipTapNode'
                  maxItems: 10000
              required:
                - type
              additionalProperties: {}
            - type: object
              properties:
                text:
                  type: string
                  maxLength: 1000000
                marks:
                  type: array
                  items:
                    anyOf:
                      - $ref: '#/components/schemas/TipTapLinkMark'
                      - $ref: '#/components/schemas/TipTapMark'
                  maxItems: 1000
                type:
                  type: string
                  const: codeBlock
                attrs:
                  type: object
                  properties:
                    language:
                      type:
                        - string
                        - 'null'
                  additionalProperties: {}
                content:
                  type: array
                  items:
                    $ref: '#/components/schemas/TipTapNode'
                  maxItems: 10000
              required:
                - type
              additionalProperties: {}
        - $ref: '#/components/schemas/TipTapContentNode'
    CustomDocument:
      type: object
      additionalProperties: {}
      description: Rich-text content with custom document properties and node attributes.
    RuntimeAgentOptions:
      type: object
      additionalProperties: {}
      description: Runtime-specific execution settings and provider extensions.
    TipTapLinkMark:
      type: object
      properties:
        type:
          type: string
          const: link
        attrs:
          type: object
          properties:
            href:
              type:
                - string
                - 'null'
            target:
              type:
                - string
                - 'null'
            rel:
              type:
                - string
                - 'null'
            class:
              type:
                - string
                - 'null'
            title:
              type:
                - string
                - 'null'
          additionalProperties: {}
      required:
        - type
      additionalProperties: {}
    TipTapMark:
      type: object
      properties:
        type:
          type: string
          minLength: 1
          maxLength: 100
          not:
            enum:
              - link
        attrs:
          $ref: '#/components/schemas/TipTapExtensionAttributes'
      required:
        - type
      additionalProperties: {}
    TipTapImageAttributes:
      type: object
      properties:
        src:
          type:
            - string
            - 'null'
        alt:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        width:
          type:
            - string
            - 'null'
        data-uploading:
          type:
            - string
            - 'null'
        data-placeholder-id:
          type:
            - string
            - 'null'
        upload-progress:
          type:
            - string
            - 'null'
      additionalProperties: {}
    TipTapMentionAttributes:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
        label:
          type:
            - string
            - 'null'
        type:
          type:
            - string
            - 'null'
        mentionSuggestionChar:
          type:
            - string
            - 'null'
        metadata:
          type:
            - object
            - 'null'
          properties:
            integrationType:
              type: string
            codeRepositoryId:
              type: string
            isHeader:
              type: boolean
            argumentHint:
              type: string
            commandName:
              type: string
            source:
              type: string
          additionalProperties: {}
      additionalProperties: {}
    TipTapContentNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
          maxItems: 1000
        type:
          type: string
          minLength: 1
          maxLength: 100
          not:
            enum:
              - image
              - mention
              - heading
              - orderedList
              - taskItem
              - codeBlock
        attrs:
          $ref: '#/components/schemas/TipTapExtensionAttributes'
        content:
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
          maxItems: 10000
      additionalProperties: {}
    TipTapExtensionAttributes:
      type: object
      additionalProperties: {}
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````