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

# Write Agent understanding version

> Records the next Agent understanding version for a project and agent. Versions are append-only: this never edits an existing version, and the first version for an agent must supply both files in full. The response carries the new version identity, not its documents.



## OpenAPI

````yaml https://api.uselemma.ai/openapi.json post /projects/{project_id}/artifacts/versions
openapi: 3.1.0
info:
  title: Lemma Platform API
  description: Lemma Platform HTTP API for AI observability and workspace operations.
  version: 0.1.0
servers:
  - url: https://api.uselemma.ai
    description: Lemma production API
security:
  - bearerAuth: []
paths:
  /projects/{project_id}/artifacts/versions:
    post:
      tags:
        - Artifacts
      summary: Write Agent understanding version
      description: >-
        Records the next Agent understanding version for a project and agent.
        Versions are append-only: this never edits an existing version, and the
        first version for an agent must supply both files in full. The response
        carries the new version identity, not its documents.
      operationId: write_learn_agent_artifact_version
      parameters:
        - name: project_id
          in: path
          required: true
          description: Project ID
          schema:
            type: string
      responses:
        '201':
          description: Agent understanding version
          content:
            application/json:
              schema:
                type: object
                properties:
                  artifact_version_id:
                    type: string
                    format: uuid
                  version:
                    type: number
                  agent_name:
                    type:
                      - string
                      - 'null'
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - artifact_version_id
                  - version
                  - agent_name
                  - created_at
                  - updated_at
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````