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

# Agent Audit Log

> Read field-level changes for an agent (updates, template clones, clones, migrations).

## Usage

Every write path (`PATCH /agents/{id}`, template import, clone, canonical template create) appends diff entries to `agent_audit_log`.

```bash theme={null}
curl -X GET "https://eu-gcp-api.vg-stuff.com/v3/agents/{agentId}/audit-log?limit=50" \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
```

## Response

```json theme={null}
{
  "success": true,
  "entries": [
    {
      "agentId": "abc",
      "field": "nodes[__start__].llmConfig.modelId",
      "oldValue": "gpt-4o-mini",
      "newValue": "gpt-5.6-luna",
      "source": "user_update",
      "actor": "workspace_uid",
      "ts": 1710000000
    }
  ],
  "nextCursorTs": 1709990000
}
```

| `source`           | Meaning                                     |
| ------------------ | ------------------------------------------- |
| `user_update`      | `PATCH /agents/{id}`                        |
| `template_clone`   | Import template / canonical template create |
| `agent_clone`      | `POST /agents/{id}/clone`                   |
| `system_migration` | Automated migrations                        |

Pass `cursorTs` from `nextCursorTs` to page older entries.


## OpenAPI

````yaml GET /agents/{agentId}/audit-log
openapi: 3.0.3
info:
  title: Convocore OpenAPI
  description: Full API reference for Convocore
  version: 1.0.4
servers:
  - url: https://eu-gcp-api.vg-stuff.com/v3
security: []
paths:
  /agents/{agentId}/audit-log:
    get:
      tags:
        - Agents
      summary: Get agent audit log
      operationId: getAgentAuditLog
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: cursorTs
          in: query
          required: false
          schema:
            type: number
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  entries:
                    type: array
                    items:
                      type: object
                      properties:
                        agentId:
                          type: string
                        field:
                          type: string
                        oldValue:
                          $ref: '#/components/schemas/S_72792157'
                        newValue:
                          $ref: '#/components/schemas/S_72792157'
                        source:
                          type: string
                          enum:
                            - user_update
                            - system_migration
                            - template_clone
                            - agent_clone
                        actor:
                          type: string
                        ts:
                          type: number
                      required:
                        - agentId
                        - field
                        - oldValue
                        - newValue
                        - source
                        - actor
                        - ts
                      additionalProperties: false
                  nextCursorTs:
                    type: number
                    nullable: true
                required:
                  - success
                  - entries
                  - nextCursorTs
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  schemas:
    S_72792157:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - enum:
            - 'null'
          nullable: true
        - type: array
          items: {}
        - type: object
          additionalProperties: {}
    message_11569e:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      additionalProperties: false
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  $ref: '#/components/schemas/message_11569e'
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````