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

# Generated Round

> Persist an assistant-produced, non-user-confirmed statement as AI_GENERATED.

This is the dedicated, auditable write surface for the AI_GENERATED class.
It is deliberately separate from ``/infer`` (which only ever writes
AI_INFERRED and never produces AI_GENERATED): the safety-critical class gets
its own surface so it can be audited in isolation. The scaffolding mirrors
``ingest_round``/``infer_round`` for auth, quota, ownership, and RLS. A
single MemoryRecord is written through the writer chokepoint with
``provenance=AI_GENERATED`` (record_type FACTUAL, role assistant) and its new
uid is returned.

SAFETY (EC1A.4, locked spec 9): AI_GENERATED records are NEVER SIP-eligible
for the factual sections (identity, active_context, preferences). The SIP
builder raises on any AI_GENERATED record placed in those inputs, and the
retrieval layer (``cosine.py`` SIP_ELIGIBLE) excludes AI_GENERATED at the SQL
level so it is never even selected into the factual candidate set.
AI_GENERATED only ever surfaces in the ``uncertain_facts`` SIP section,
explicitly marked uncertain. This endpoint adds the first live writer for the
class and creates no path by which its output can reach a factual SIP slot.

# IDOR AUDIT PASS - session_id and user_id are attributed to the
# authenticated principal, never the request body.



## OpenAPI

````yaml post /api/v1/memory/generated
openapi: 3.1.0
info:
  title: EDN Memory Engine
  version: 0.1.0
servers:
  - description: EDN evaluation endpoint
    url: https://api.tensorpro.ai
security:
  - EDNApiKey: []
paths:
  /api/v1/memory/generated:
    post:
      summary: Generated Round
      description: >-
        Persist an assistant-produced, non-user-confirmed statement as
        AI_GENERATED.


        This is the dedicated, auditable write surface for the AI_GENERATED
        class.

        It is deliberately separate from ``/infer`` (which only ever writes

        AI_INFERRED and never produces AI_GENERATED): the safety-critical class
        gets

        its own surface so it can be audited in isolation. The scaffolding
        mirrors

        ``ingest_round``/``infer_round`` for auth, quota, ownership, and RLS. A

        single MemoryRecord is written through the writer chokepoint with

        ``provenance=AI_GENERATED`` (record_type FACTUAL, role assistant) and
        its new

        uid is returned.


        SAFETY (EC1A.4, locked spec 9): AI_GENERATED records are NEVER
        SIP-eligible

        for the factual sections (identity, active_context, preferences). The
        SIP

        builder raises on any AI_GENERATED record placed in those inputs, and
        the

        retrieval layer (``cosine.py`` SIP_ELIGIBLE) excludes AI_GENERATED at
        the SQL

        level so it is never even selected into the factual candidate set.

        AI_GENERATED only ever surfaces in the ``uncertain_facts`` SIP section,

        explicitly marked uncertain. This endpoint adds the first live writer
        for the

        class and creates no path by which its output can reach a factual SIP
        slot.


        # IDOR AUDIT PASS - session_id and user_id are attributed to the

        # authenticated principal, never the request body.
      operationId: generated_round_api_v1_memory_generated_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeneratedRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneratedResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    GeneratedRequest:
      properties:
        assistant_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Assistant Message
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        user_message:
          anyOf:
            - type: string
            - type: 'null'
          title: User Message
      title: GeneratedRequest
      type: object
    GeneratedResponse:
      properties:
        provenance:
          title: Provenance
          type: string
        record_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Record Id
        records_written:
          title: Records Written
          type: integer
        status:
          title: Status
          type: string
      required:
        - status
        - records_written
        - provenance
      title: GeneratedResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    EDNApiKey:
      description: >-
        EDN API key presented as 'Bearer <key>' in the Authorization header.
        Create and manage keys from the Console.
      in: header
      name: Authorization
      type: apiKey

````