> ## 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.

# Regenerate agent understanding

> Start a run that writes the next agent understanding for one agent.



## OpenAPI

````yaml https://api.uselemma.ai/openapi.json post /projects/{project_id}/artifacts/regenerate
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/regenerate:
    post:
      tags:
        - Artifacts
      summary: Regenerate agent understanding
      description: Start a run that writes the next agent understanding for one agent.
      operationId: regenerate_project_artifacts
      parameters:
        - name: project_id
          in: path
          required: true
          description: Project ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agent_name:
                  type:
                    - string
                    - 'null'
              required:
                - agent_name
              additionalProperties: false
      responses:
        '200':
          description: Agent understanding run state
          content:
            application/json:
              schema:
                type: object
                properties:
                  state:
                    type: string
                    enum:
                      - pending
                      - running
                      - completed
                      - failed
                  phase:
                    type:
                      - string
                      - 'null'
                required:
                  - state
                  - phase
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                  retryable:
                    type: boolean
                  retry_after_seconds:
                    type: number
                    minimum: 0
                required:
                  - detail
                  - code
                  - retryable
                additionalProperties: false
        '401':
          description: Unauthenticated
          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
                  retryable:
                    type: boolean
                  retry_after_seconds:
                    type: number
                    minimum: 0
                required:
                  - detail
                  - code
                  - retryable
                additionalProperties: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                  retryable:
                    type: boolean
                  retry_after_seconds:
                    type: number
                    minimum: 0
                required:
                  - detail
                  - code
                  - retryable
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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