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

# Retrieve an agent instruction revision

> Retrieve the instruction JSON document saved in one revision. Other agent configuration is not included. Author details are redacted from public API responses.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public get /v1/agents/{agentId}/content-revisions/{version}
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}/content-revisions/{version}:
    get:
      tags:
        - Agents
      summary: Retrieve an agent instruction revision
      description: >-
        Retrieve the instruction JSON document saved in one revision. Other
        agent configuration is not included. Author details are redacted from
        public API responses.
      operationId: retrieveAgentContentRevision
      parameters:
        - in: path
          name: agentId
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required: true
        - in: path
          name: version
          schema:
            type: integer
            exclusiveMinimum: 0
            maximum: 9007199254740991
          required: true
      responses:
        '200':
          description: Retrieve an agent instruction revision
          content:
            application/json:
              schema:
                type: object
                properties:
                  version:
                    type: integer
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                  authorId:
                    type:
                      - string
                      - 'null'
                  authorName:
                    type:
                      - string
                      - 'null'
                  source:
                    type: string
                  restoredFromVersion:
                    anyOf:
                      - type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      - type: 'null'
                  createdAt:
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                  instructions:
                    anyOf:
                      - $ref: '#/components/schemas/TipTapDocument'
                        description: >-
                          Instructions for the agent as a rich-text document.
                          Mentions can reference integrations used by the agent.
                      - type: 'null'
                    description: >-
                      The instruction JSON document saved in this revision.
                      Other agent configuration is not versioned.
                required:
                  - version
                  - authorId
                  - authorName
                  - source
                  - restoredFromVersion
                  - createdAt
                  - instructions
                additionalProperties: false
                description: A saved revision of an agent’s instruction JSON document.
        '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 contentRevision = await
            client.agents.contentRevisions.retrieve(1, {
              agentId: '7c9e6679-7425-40de-944b-e07fc1f90ae7',
            });
        - lang: rust
          label: Rust SDK
          source: |
            use tembo_rs::*;

            let client = Tembo::from_env()?;

            let response = client
                .agents()
                .content_revisions()
                .retrieve("7c9e6679-7425-40de-944b-e07fc1f90ae7", 1)
                .send()
                .await?;
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
    TipTapNode:
      anyOf:
        - oneOf:
            - $ref: '#/components/schemas/TipTapImageNode'
            - $ref: '#/components/schemas/TipTapMentionNode'
            - $ref: '#/components/schemas/TipTapHeadingNode'
            - $ref: '#/components/schemas/TipTapOrderedListNode'
            - $ref: '#/components/schemas/TipTapTaskItemNode'
            - $ref: '#/components/schemas/TipTapCodeBlockNode'
        - $ref: '#/components/schemas/TipTapContentNode'
    CustomDocument:
      type: object
      additionalProperties: {}
      description: Rich-text content with custom document properties and node attributes.
    TipTapImageNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: image
        attrs:
          $ref: '#/components/schemas/TipTapImageAttributes'
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapMentionNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: mention
        attrs:
          $ref: '#/components/schemas/TipTapMentionAttributes'
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapHeadingNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: heading
        attrs:
          type: object
          properties:
            level:
              type: integer
              minimum: 1
              maximum: 6
          additionalProperties: {}
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapOrderedListNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: orderedList
        attrs:
          type: object
          properties:
            start:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            type:
              type:
                - string
                - 'null'
          additionalProperties: {}
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapTaskItemNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: taskItem
        attrs:
          type: object
          properties:
            checked:
              type: boolean
          additionalProperties: {}
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapCodeBlockNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          const: codeBlock
        attrs:
          type: object
          properties:
            language:
              type:
                - string
                - 'null'
          additionalProperties: {}
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      required:
        - type
      additionalProperties: {}
    TipTapContentNode:
      type: object
      properties:
        text:
          type: string
          maxLength: 1000000
        marks:
          maxItems: 1000
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TipTapLinkMark'
              - $ref: '#/components/schemas/TipTapMark'
        type:
          type: string
          minLength: 1
          maxLength: 100
          not:
            enum:
              - image
              - mention
              - heading
              - orderedList
              - taskItem
              - codeBlock
        attrs:
          $ref: '#/components/schemas/TipTapExtensionAttributes'
        content:
          maxItems: 10000
          type: array
          items:
            $ref: '#/components/schemas/TipTapNode'
      additionalProperties: {}
    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:
          anyOf:
            - type: object
              properties:
                integrationType:
                  type: string
                codeRepositoryId:
                  type: string
                isHeader:
                  type: boolean
                argumentHint:
                  type: string
                commandName:
                  type: string
                source:
                  type: string
              additionalProperties: {}
            - type: 'null'
      additionalProperties: {}
    TipTapExtensionAttributes:
      type: object
      propertyNames:
        type: string
      additionalProperties: {}
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

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