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

# Get Agent Session

> Fetch one session's full detail: status, timing, and the conversation
timeline (transcript turns interleaved with tool calls, in order).



## OpenAPI

````yaml get /v1/agent/sessions/{session_id}
openapi: 3.1.0
info:
  title: FishAudio OpenAPI
  version: '1'
servers:
  - description: Fish Audio API
    url: https://api.fish.audio
security: []
tags: []
paths:
  /v1/agent/sessions/{session_id}:
    get:
      tags:
        - Agent Sessions
      summary: Get Agent Session
      description: |-
        Fetch one session's full detail: status, timing, and the conversation
        timeline (transcript turns interleaved with tool calls, in order).
      parameters:
        - in: path
          name: session_id
          description: ''
          required: true
          schema:
            title: Session Id
            type: string
          deprecated: false
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  session_id:
                    title: Session Id
                    type: string
                  agent_id:
                    title: Agent Id
                    type: string
                  agent_name:
                    title: Agent Name
                    type: string
                  name:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Name
                  status:
                    enum:
                      - pending
                      - active
                      - completed
                      - failed
                      - unknown
                    title: Status
                    type: string
                  source:
                    enum:
                      - api_key
                      - dashboard
                      - public
                      - phone
                    title: Source
                    type: string
                  caller_number:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Caller Number
                  dialed_number:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Dialed Number
                  timezone:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Timezone
                  created_at:
                    title: Created At
                    type: string
                  started_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Started At
                  ended_at:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Ended At
                  duration_seconds:
                    anyOf:
                      - type: integer
                      - type: 'null'
                    default: null
                    title: Duration Seconds
                  metadata:
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
                    title: Metadata
                    type: object
                  items:
                    items:
                      discriminator:
                        mapping:
                          message:
                            $ref: '#/components/schemas/AgentSessionMessageItem'
                          tool_call:
                            $ref: '#/components/schemas/AgentSessionToolCallItem'
                          tool_result:
                            $ref: '#/components/schemas/AgentSessionToolResultItem'
                        propertyName: type
                      oneOf:
                        - $ref: '#/components/schemas/AgentSessionMessageItem'
                        - $ref: '#/components/schemas/AgentSessionToolCallItem'
                        - $ref: '#/components/schemas/AgentSessionToolResultItem'
                    title: Items
                    type: array
                  analysis:
                    anyOf:
                      - $ref: '#/components/schemas/AgentSessionAnalysisResult'
                      - type: 'null'
                    default: null
                required:
                  - session_id
                  - agent_id
                  - agent_name
                  - status
                  - source
                  - created_at
                type: object
        '401':
          description: No permission -- see authorization schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                required:
                  - status
                  - message
                type: object
        '404':
          description: Nothing matches the given URI
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                required:
                  - status
                  - message
                type: object
        '502':
          description: Invalid responses from another server/proxy
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                required:
                  - status
                  - message
                type: object
      security:
        - BearerAuth: []
components:
  schemas:
    JsonValue: {}
    AgentSessionMessageItem:
      description: One transcript message; system messages never surface here.
      properties:
        type:
          const: message
          default: message
          title: Type
          type: string
        role:
          enum:
            - user
            - assistant
          title: Role
          type: string
        content:
          title: Content
          type: string
        turn_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Turn Id
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Created At
      required:
        - role
        - content
      title: AgentSessionMessageItem
      type: object
    AgentSessionToolCallItem:
      description: |-
        Tool invocation, mirroring the realtime `tool.started` event; `call_id`
        matches the SDK event's callId, so live UIs and history line up.
      properties:
        type:
          const: tool_call
          default: tool_call
          title: Type
          type: string
        call_id:
          title: Call Id
          type: string
        tool_name:
          title: Tool Name
          type: string
        tool_source:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Tool Source
        input:
          title: Input
          type: string
        turn_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Turn Id
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Created At
      required:
        - call_id
        - tool_name
        - input
      title: AgentSessionToolCallItem
      type: object
    AgentSessionToolResultItem:
      description: |-
        Tool outcome (`tool.completed`/`tool.failed` twin). A call that never
        resolved (session died mid-flight) has no result item.
      properties:
        type:
          const: tool_result
          default: tool_result
          title: Type
          type: string
        call_id:
          title: Call Id
          type: string
        tool_name:
          title: Tool Name
          type: string
        tool_source:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Tool Source
        status:
          enum:
            - completed
            - failed
          title: Status
          type: string
        output:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Output
        output_truncated:
          default: false
          title: Output Truncated
          type: boolean
        error:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Error
        latency_ms:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Latency Ms
        turn_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Turn Id
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Created At
      required:
        - call_id
        - tool_name
        - status
      title: AgentSessionToolResultItem
      type: object
    AgentSessionAnalysisResult:
      description: |-
        Public trim of the post-call analysis record: outcomes only, no run
        internals (model, tokens, config hash).
      properties:
        status:
          enum:
            - queued
            - running
            - completed
            - skipped
            - error
          title: Status
          type: string
        summary:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Summary
        data:
          items:
            $ref: '#/components/schemas/AgentSessionAnalysisDataValue'
          title: Data
          type: array
        criteria_results:
          items:
            $ref: '#/components/schemas/AgentSessionAnalysisCriterionResult'
          title: Criteria Results
          type: array
      required:
        - status
      title: AgentSessionAnalysisResult
      type: object
    AgentSessionAnalysisDataValue:
      properties:
        name:
          title: Name
          type: string
        type:
          enum:
            - boolean
            - text
            - number
            - enum
          title: Type
          type: string
        value:
          anyOf:
            - type: boolean
            - type: number
            - type: string
            - type: 'null'
          default: null
          title: Value
        rationale:
          default: ''
          title: Rationale
          type: string
      required:
        - name
        - type
      title: AgentSessionAnalysisDataValue
      type: object
    AgentSessionAnalysisCriterionResult:
      properties:
        name:
          title: Name
          type: string
        result:
          enum:
            - success
            - failure
            - unknown
          title: Result
          type: string
        rationale:
          default: ''
          title: Rationale
          type: string
      required:
        - name
        - result
      title: AgentSessionAnalysisCriterionResult
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````