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

# Finish a triage attempt: absorb whatever the continuation wrote and stamp the outcome — completed with provenance, expired on a zero-write continuation so the closer still runs, overflowed past the per-run ceiling — plus the cumulative event-id watermark.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/agent-sessions/triage/complete
openapi: 3.1.0
info:
  description: >-
    The /api/v1 REST mirror of the 3ngram memory core
    (docs/concepts/architecture.mdx: one core, N transports). Authenticate with
    an X-API-Key header or a session Bearer token.
  title: 3ngram REST API
  version: v1
servers:
  - description: 3ngram platform
    url: https://api.3ngram.ai
security:
  - apiKey: []
  - sessionBearer: []
paths:
  /api/v1/agent-sessions/triage/complete:
    post:
      summary: >-
        Finish a triage attempt: absorb whatever the continuation wrote and
        stamp the outcome — completed with provenance, expired on a zero-write
        continuation so the closer still runs, overflowed past the per-run
        ceiling — plus the cumulative event-id watermark.
      operationId: completeAgentSessionTriage
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                agent:
                  maxLength: 64
                  minLength: 1
                  pattern: ^[a-z0-9][a-z0-9-]*$
                  type: string
                attemptId:
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  type: string
                sessionId:
                  maxLength: 256
                  minLength: 1
                  type: string
              required:
                - agent
                - sessionId
                - attemptId
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  eventCount:
                    maximum: 500
                    minimum: 0
                    type: integer
                  sessionRunId:
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    type: string
                  sinceBeginCount:
                    maximum: 500
                    minimum: 0
                    type: integer
                  triageStatus:
                    enum:
                      - completed
                      - expired
                      - overflowed
                    type: string
                  truncated:
                    type: boolean
                required:
                  - sessionRunId
                  - triageStatus
                  - eventCount
                  - sinceBeginCount
                  - truncated
                type: object
          description: Success
        '404':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  error:
                    enum:
                      - not_found
                    type: string
                required:
                  - error
                type: object
          description: This tenant owns no session with that natural key
        '409':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  error:
                    enum:
                      - conflict
                    type: string
                required:
                  - error
                type: object
          description: >-
            The attempt named is no longer the current one — a stale hook
            delivery, a second Stop, or a closer that re-claimed the row
components:
  securitySchemes:
    apiKey:
      in: header
      name: X-API-Key
      type: apiKey
    sessionBearer:
      scheme: bearer
      type: http

````