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

# The bookkeeping row for one run, addressed by sessionRunId: identity, lifecycle timestamps, activation_epoch, triage status and the briefed memories the run was shown. Read-only — the read never refreshes the lease or resurrects a closed row. The last assistant-message excerpt and the watermark ids are not projected.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/agent-sessions/{sessionRunId}
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/{sessionRunId}:
    get:
      summary: >-
        The bookkeeping row for one run, addressed by sessionRunId: identity,
        lifecycle timestamps, activation_epoch, triage status and the briefed
        memories the run was shown. Read-only — the read never refreshes the
        lease or resurrects a closed row. The last assistant-message excerpt and
        the watermark ids are not projected.
      operationId: getAgentSessionRun
      parameters:
        - in: path
          name: sessionRunId
          required: true
          schema:
            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
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  activationEpoch:
                    exclusiveMinimum: 0
                    maximum: 9007199254740991
                    type: integer
                  agent:
                    maxLength: 64
                    minLength: 1
                    pattern: ^[a-z0-9][a-z0-9-]*$
                    type: string
                  briefedMemories:
                    items:
                      additionalProperties: false
                      properties:
                        id:
                          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
                        status:
                          maxLength: 64
                          minLength: 1
                          type: string
                        topic:
                          maxLength: 256
                          minLength: 1
                          type: string
                      required:
                        - id
                        - topic
                        - status
                      type: object
                    maxItems: 100
                    type: array
                  briefingDeliveredAt:
                    anyOf:
                      - format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        type: string
                      - type: 'null'
                  closedAt:
                    anyOf:
                      - format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        type: string
                      - type: 'null'
                  lastSeenAt:
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    type: string
                  openedAt:
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                    type: string
                  project:
                    anyOf:
                      - maxLength: 256
                        minLength: 1
                        type: string
                      - type: 'null'
                  scope:
                    anyOf:
                      - maxLength: 64
                        minLength: 1
                        pattern: ^[a-z0-9][a-z0-9-]*$
                        type: string
                      - type: 'null'
                  selector:
                    oneOf:
                      - additionalProperties: false
                        properties:
                          kind:
                            const: all
                            type: string
                        required:
                          - kind
                        type: object
                      - additionalProperties: false
                        properties:
                          kind:
                            const: scope
                            type: string
                          scope:
                            maxLength: 64
                            minLength: 1
                            pattern: ^[a-z0-9][a-z0-9-]*$
                            type: string
                        required:
                          - kind
                          - scope
                        type: object
                      - additionalProperties: false
                        properties:
                          kind:
                            const: project
                            type: string
                          project:
                            maxLength: 256
                            minLength: 1
                            type: string
                        required:
                          - kind
                          - project
                        type: object
                      - additionalProperties: false
                        properties:
                          includeUnscoped:
                            default: false
                            description: >-
                              Also match memories in the scope written with NO
                              project (project IS NULL). Default false: strict
                              scope AND project intersection.
                            type: boolean
                          kind:
                            const: scope_project
                            type: string
                          project:
                            maxLength: 256
                            minLength: 1
                            type: string
                          scope:
                            maxLength: 64
                            minLength: 1
                            pattern: ^[a-z0-9][a-z0-9-]*$
                            type: string
                        required:
                          - kind
                          - scope
                          - project
                          - includeUnscoped
                        type: object
                  sessionId:
                    maxLength: 256
                    minLength: 1
                    type: string
                  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
                  source:
                    enum:
                      - startup
                      - resume
                    type: string
                  triageStatus:
                    enum:
                      - idle
                      - pending
                      - completed
                      - expired
                      - overflowed
                    type: string
                required:
                  - sessionRunId
                  - agent
                  - sessionId
                  - source
                  - project
                  - scope
                  - selector
                  - activationEpoch
                  - triageStatus
                  - openedAt
                  - closedAt
                  - lastSeenAt
                  - briefingDeliveredAt
                  - briefedMemories
                type: object
          description: Success
        '400':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  detail:
                    maxLength: 512
                    type: string
                  error:
                    const: invalid_input
                    type: string
                required:
                  - error
                type: object
          description: Malformed run id, or a run id this tenant does not own
components:
  securitySchemes:
    apiKey:
      in: header
      name: X-API-Key
      type: apiKey
    sessionBearer:
      scheme: bearer
      type: http

````