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

# List an agent's config version history

> Return the append-only history of config snapshots for an agent,
newest first. Every save (via `POST /agents`, the `manage_agents`
tool, tool-schema sync, skill changes, or org cloning) appends a
version; unchanged saves are de-duplicated and add no row.

The `config` is not returned in the list (it can be large); this
endpoint returns lightweight metadata for building a history view.




## OpenAPI

````yaml /openapi.yaml get /agents/versions
openapi: 3.1.0
info:
  title: AsterAgents API
  version: 1.0.0
  description: >
    API for AsterAgents platform operations.


    - **Admin endpoints** (`/admin/*`) require organization admin privileges
    (`org:admin` role)

    - **Agent endpoints** (`/agents`) require agent management permissions or
    `org:admin` role

    - **Knowledge base endpoints** (`/kb/*`) require standard authentication

    - **Skills endpoints** (`/skills/*`) require standard authentication

    - **File endpoints** (`/upload/*`, `/kb/files`, `/skills/files`) require
    standard authentication
  contact:
    name: AsterAgents Support
    url: https://asteragents.com/support
servers:
  - url: https://asteragents.com/api
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Manage active organization users
  - name: Invitations
    description: Manage organization invitations
  - name: Files
    description: Upload and manage files
  - name: Knowledge Bases
    description: Manage knowledge bases and their files
  - name: Knowledge Base Management
    description: Create, update, and delete knowledge bases
  - name: Agents
    description: Create, update, and delete agents
  - name: Agent Tags
    description: Organize agents with tags
  - name: Tools
    description: Discover the tool catalog available to your organization
  - name: Skills
    description: Manage agent skills
  - name: Skill Files
    description: Manage bundled files for skills
  - name: Conversations
    description: Invoke agents and retrieve conversation history and messages
  - name: Scheduled Tasks
    description: Schedule agents to run automatically on a cron schedule
paths:
  /agents/versions:
    get:
      tags:
        - Agents
      summary: List an agent's config version history
      description: |
        Return the append-only history of config snapshots for an agent,
        newest first. Every save (via `POST /agents`, the `manage_agents`
        tool, tool-schema sync, skill changes, or org cloning) appends a
        version; unchanged saves are de-duplicated and add no row.

        The `config` is not returned in the list (it can be large); this
        endpoint returns lightweight metadata for building a history view.
      operationId: listAgentVersions
      parameters:
        - name: agentId
          in: query
          required: true
          schema:
            type: integer
          description: The agent to list versions for
          example: 1
      responses:
        '200':
          description: Version history retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  agentId:
                    type: integer
                  publishedVersionId:
                    type: integer
                    nullable: true
                    description: The version the agent's config currently reflects
                  versions:
                    type: array
                    items:
                      $ref: '#/components/schemas/AgentVersion'
              examples:
                success:
                  value:
                    agentId: 1
                    publishedVersionId: 42
                    versions:
                      - id: 42
                        label: null
                        createdByUserId: user_2abc...
                        createdAt: '2026-06-22T02:43:23.693Z'
                        isCurrent: true
                      - id: 17
                        label: Initial version (backfill)
                        createdByUserId: user_2abc...
                        createdAt: '2026-06-21T23:23:02.051Z'
                        isCurrent: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          description: Agent not found in the organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    AgentVersion:
      type: object
      required:
        - id
        - createdByUserId
        - createdAt
      properties:
        id:
          type: integer
          description: Unique version identifier
          example: 42
        label:
          type: string
          nullable: true
          description: |
            Optional human-readable note for the change. `null` for versions
            created by a plain save; backfilled versions read
            "Initial version (backfill)".
          example: before reworking the system prompt
        createdByUserId:
          type: string
          description: ID of the user whose action created this version
          example: user_2abc...
        createdAt:
          type: string
          format: date-time
          description: When the version was recorded
          example: '2026-06-22T02:43:23.693Z'
        isCurrent:
          type: boolean
          description: >-
            Whether this is the version the agent's live config currently
            reflects
          example: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Bad Request
        details:
          type: array
          items:
            type: object
            additionalProperties: true
  responses:
    BadRequest:
      description: Bad Request - Invalid parameters or user not part of organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: User is not part of any organization
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT token from Clerk authentication.

        Must be from a user with `org:admin` role.

````