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

# Get Observability Session Transcript

> Full transcript timeline for one session.

Reads ``streamkap_agent_transcript`` (the Flink-runtime transcript
stream). A row is one chat call, tool call, or final output emission;
they share an ``iteration_id`` when they belong to the same input
record's processing chain. Rows are returned oldest-first.

Tenant + service scoping enforced at the query layer — a session id
that belongs to another tenant or sibling service simply returns an
empty ``rows`` list, identical to "session not found / expired".
No existence leak across tenants.



## OpenAPI

````yaml /openapi/openapi.json get /agentic/observability/sessions/{session_id}/transcript
openapi: 3.1.0
info:
  title: Streamkap REST API
  description: >-
    The Streamkap REST API allows you to programmatically manage your CDC
    pipelines, sources, destinations, transforms, and more.


    Authenticate using a bearer token obtained from the [Access
    Token](/api-reference/auth/access-token) endpoint with your API client
    credentials.
  contact:
    name: Streamkap Support
    url: https://streamkap.com/
    email: support@streamkap.com
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api.streamkap.com
    description: Production
security: []
tags:
  - name: Agents
    description: Create, deploy, and manage Flink-based AI agents.
  - name: Agents Observability
    description: >-
      Read-only views over the MCP audit log: agent rollup, sessions, spans,
      histograms, external-agent verify.
  - name: Alerts
    description: Manage alert subscribers, preferences, and notification credentials.
  - name: Authentication
    description: Obtain and refresh access tokens, manage client credentials and roles.
  - name: Billing
    description: Retrieve usage metrics, summaries, and export billing data.
  - name: Consumer Groups
    description: List, inspect, and reset Kafka consumer group offsets.
  - name: Dashboard
    description: Retrieve organisation-level statistics and overview data.
  - name: Destinations
    description: Create, configure, and manage data destinations and their lifecycle.
  - name: Kafka Access
    description: Manage Kafka users and their access permissions.
  - name: Logs
    description: Query and summarise system logs.
  - name: Pipelines
    description: Create, configure, and manage CDC pipelines and their lifecycle.
  - name: Project Keys
    description: Manage project keys that bundle API credentials and optional Kafka access.
  - name: Schema Registry
    description: Browse schema subjects, versions, and retrieve schema definitions.
  - name: Services
    description: View and switch service metadata.
  - name: Sources
    description: >-
      Create, configure, and manage data sources, snapshots, and their
      lifecycle.
  - name: Tags
    description: Create, update, and manage resource tags for organisation.
  - name: Topics
    description: Browse topic details, statistics, configurations, metrics, and messages.
  - name: Transforms
    description: >-
      Create, deploy, and manage data transforms, unit tests, and implementation
      details.
paths:
  /agentic/observability/sessions/{session_id}/transcript:
    get:
      tags:
        - Agents Observability
      summary: Get Observability Session Transcript
      description: |-
        Full transcript timeline for one session.

        Reads ``streamkap_agent_transcript`` (the Flink-runtime transcript
        stream). A row is one chat call, tool call, or final output emission;
        they share an ``iteration_id`` when they belong to the same input
        record's processing chain. Rows are returned oldest-first.

        Tenant + service scoping enforced at the query layer — a session id
        that belongs to another tenant or sibling service simply returns an
        empty ``rows`` list, identical to "session not found / expired".
        No existence leak across tenants.
      operationId: getAgenticObservabilitySessionTranscript
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObservabilityTranscriptResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - FronteggHTTPAuthentication: []
components:
  schemas:
    ObservabilityTranscriptResponse:
      properties:
        session_id:
          type: string
          title: Session Id
        rows:
          items:
            $ref: '#/components/schemas/ObservabilityTranscriptRow'
          type: array
          title: Rows
        truncated:
          type: boolean
          title: Truncated
          default: false
      additionalProperties: false
      type: object
      required:
        - session_id
        - rows
      title: ObservabilityTranscriptResponse
      description: |-
        `/agentic/observability/sessions/{session_id}/transcript` envelope.

        Rows are returned oldest-first so the FE can render the timeline in
        natural reading order without an additional sort.

        ``truncated`` is ``True`` when the BE applied a defensive row cap
        on the underlying ClickHouse read (rare; happens when a runaway
        agent produced an unusually long session). The FE should surface a
        "showing first N rows" notice; full transcript is not paginatable
        at this endpoint (sessions are conceptually one timeline).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ObservabilityTranscriptRow:
      properties:
        event_timestamp:
          type: string
          format: date-time
          title: Event Timestamp
        agent_id:
          type: string
          title: Agent Id
        iteration_id:
          type: string
          title: Iteration Id
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        operation:
          type: string
          enum:
            - chat
            - tool_call
            - output
          title: Operation
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        input_tokens:
          type: integer
          title: Input Tokens
          default: 0
        output_tokens:
          type: integer
          title: Output Tokens
          default: 0
        tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Name
        tool_call_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Call Id
        duration_ms:
          type: integer
          title: Duration Ms
          default: 0
        status:
          type: string
          title: Status
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        payload_truncated:
          type: boolean
          title: Payload Truncated
          default: false
        payload_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Payload Text
      additionalProperties: false
      type: object
      required:
        - event_timestamp
        - agent_id
        - iteration_id
        - operation
        - status
      title: ObservabilityTranscriptRow
      description: |-
        One row inside a session's transcript timeline.

            A row is the runtime's record of a single chat call, tool call, or
            final output emission. ``iteration_id`` correlates rows that belong
            to the same input-record processing chain (a ``chat`` followed by
            one or more ``tool_call`` rows followed by another ``chat`` followed
            by an ``output`` row all share an iteration id).

            ``payload_text`` is capped at 32 KB UTF-8 by the runtime emitter
            (matches the MCP cap). When the cap fires, ``payload_truncated`` is
            ``True`` and the visible text ends with the ``
        ... (truncated)``
            marker.
            
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    FronteggHTTPAuthentication:
      type: http
      scheme: bearer

````