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

# List extended session states

> List extended session states for a given namespace



## OpenAPI

````yaml /api_v1.json get /api/v1/local/namespace/{namespace}/extended
openapi: 3.1.0
info:
  title: Coral Server API
  version: 1.5.0
servers: []
security: []
tags: []
externalDocs:
  url: /
paths:
  /api/v1/local/namespace/{namespace}/extended:
    get:
      tags:
        - local
      summary: List extended session states
      description: List extended session states for a given namespace
      operationId: getSessionStatesExtended
      parameters:
        - name: namespace
          in: path
          description: The namespace name
          required: true
          deprecated: false
          explode: false
          schema:
            type: string
            title: String
      responses:
        '200':
          description: Success
          headers: {}
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SessionStateExtended'
                title: ArrayList<SessionStateExtended>
        '404':
          description: Invalid namespace provided
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteException'
      deprecated: false
      security:
        - token: []
components:
  schemas:
    SessionStateExtended:
      type: object
      description: The state of a running session
      properties:
        base:
          $ref: '#/components/schemas/SessionStateBase'
          description: Base session state
        agents:
          type: array
          description: A list of the states of all agents in this session
          items:
            $ref: '#/components/schemas/SessionAgentState'
          title: ArrayList<SessionAgentState>
        threads:
          type: array
          description: A list of the states of all threads in this session
          items:
            $ref: '#/components/schemas/SessionThread'
          title: ArrayList<SessionThread>
        runningBudget:
          $ref: '#/components/schemas/SessionRunningBudget'
          description: >-
            A counter for the session's running budget.  See
            SessionRunningBudget for more information
        budgetSettings:
          $ref: '#/components/schemas/SessionBudgetSettings'
          description: The budget settings for this session
        agentClaimReceipts:
          type: array
          description: A list of receipts for all claims made by all agents in this session
          items:
            $ref: '#/components/schemas/SessionAgentClaimReceipt'
          title: ArrayList<SessionAgentClaimReceipt>
      required:
        - agentClaimReceipts
        - agents
        - base
        - budgetSettings
        - runningBudget
        - threads
      title: SessionStateExtended
    RouteException:
      type: object
      properties:
        message:
          type: string
          title: String
      required:
        - message
      title: RouteException
    SessionStateBase:
      type: object
      description: The base state of a running session, without agent or threads
      properties:
        id:
          type: string
          description: The unique identifier for this session
          title: String
        timestamp:
          type: string
          description: The timestamp of when this state was generated
          title: UTC timestamp ISO-8601
        namespace:
          type: string
          description: The namespace that this session resides in
          title: String
        status:
          anyOf:
            - type: object
              description: |2-

                        The session is closing and will soon be removed from memory.  The closing status can only be observed when 
                        the session has persistence configure in SessionRuntimeSettings.  Note that there is no closed state for 
                        sessions, as closed sessions are deleted from memory
                        
              properties:
                type:
                  type: string
                  enum:
                    - closing
                  title: String
                executionTime:
                  type: string
                  title: UTC timestamp ISO-8601
                closingTime:
                  type: string
                  title: UTC timestamp ISO-8601
              required:
                - closingTime
                - executionTime
                - type
              title: closing
            - type: object
              description: >-
                This session status is only achieved when creating sessions with
                deferred execution
              properties:
                type:
                  type: string
                  enum:
                    - pending_execution
                  title: String
              required:
                - type
              title: pending_execution
            - type: object
              description: |2-

                        The session launched it's agents and is currently running.  The session's status will remain as running until:
                        
                        1. All the agents in the session exit, or
                        2. The session's TTL expires, or
                        3. Manual exit 
                        
              properties:
                type:
                  type: string
                  enum:
                    - executed
                  title: String
                executionTime:
                  type: string
                  title: UTC timestamp ISO-8601
              required:
                - executionTime
                - type
              title: executed
          description: The status of the session
          discriminator:
            propertyName: type
          title: SessionStatus
        annotations:
          type: object
          additionalProperties:
            type: string
            title: String
          title: LinkedHashMap<String,String>
      required:
        - annotations
        - id
        - namespace
        - status
        - timestamp
      title: SessionStateBase
    SessionAgentState:
      type: object
      description: The state of an agent running in a session
      properties:
        name:
          type: string
          description: >-
            The name given for this agent in the AgentGraph, this is unique in
            the graph
          title: String
        registryAgentIdentifier:
          $ref: '#/components/schemas/RegistryAgentIdentifier'
          description: >-
            The identifier for this agent's registry entry.  See RegistryAgent
            for more information
        status:
          anyOf:
            - type: object
              description: >-
                The agent is running and potentially has a connection with the
                agent's MCP server
              properties:
                type:
                  type: string
                  enum:
                    - running
                  title: String
                connectionStatus:
                  anyOf:
                    - type: object
                      description: >-
                        The agent has an active MCP connection with the agent's
                        MCP server
                      properties:
                        type:
                          type: string
                          enum:
                            - connected
                          title: String
                        communicationStatus:
                          anyOf:
                            - type: object
                              description: The agent is sleeping
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - sleeping
                                  title: String
                              required:
                                - type
                              title: sleeping
                            - type: object
                              description: >-
                                The agent is not waiting for messages or
                                sleeping and is assumed to be thinking
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - thinking
                                  title: String
                              required:
                                - type
                              title: thinking
                            - type: object
                              description: The agent is waiting for a message
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - waiting_message
                                  title: String
                              required:
                                - type
                              title: waiting_message
                          discriminator:
                            propertyName: type
                          title: SessionAgentCommunicationStatus
                      required:
                        - communicationStatus
                        - type
                      title: connected
                    - type: object
                      description: >-
                        The agent is not connected to the agent's MCP server, it
                        may be trying to connect actively or it may have
                        encountered an error
                      properties:
                        type:
                          type: string
                          enum:
                            - not_connected
                          title: String
                      required:
                        - type
                      title: not_connected
                  discriminator:
                    propertyName: type
                  title: SessionAgentConnectionStatus
                startTime:
                  type: string
                  description: The time that this agent started
                  title: UTC timestamp ISO-8601
              required:
                - connectionStatus
                - startTime
                - type
              title: running
            - type: object
              description: The agent's runtime started and then subsequently stopped
              properties:
                type:
                  type: string
                  enum:
                    - stopped
                  title: String
                startTime:
                  type: string
                  description: The time that this agent started
                  title: UTC timestamp ISO-8601
              required:
                - type
              title: stopped
            - type: object
              description: The agent is waiting to be launched
              properties:
                type:
                  type: string
                  enum:
                    - waiting
                  title: String
              required:
                - type
              title: waiting
          description: >-
            Nested status state for this agent, running -> connected ->
            thinking/waiting/sleeping
          discriminator:
            propertyName: type
          title: SessionAgentStatus
        description:
          type: string
          description: The description of this agent, given to other agents in the graph
          title: String
        links:
          type: array
          description: >-
            A list of agents that this agent is aware of, constructed from agent
            groups in the AgentGraph
          items:
            type: string
            title: String
          title: LinkedHashSet<String>
          uniqueItems: true
        runningBudget:
          $ref: '#/components/schemas/SessionRunningBudget'
          description: >-
            A counter for the agent's running budget.  See SessionRunningBudget
            for more information
        budgetSettings:
          $ref: '#/components/schemas/GraphAgentBudgetSettings'
          description: The budget settings for this agent
        annotations:
          type: object
          additionalProperties:
            type: string
            title: String
          title: LinkedHashMap<String,String>
      required:
        - annotations
        - budgetSettings
        - links
        - name
        - registryAgentIdentifier
        - runningBudget
        - status
      title: SessionAgentState
    SessionThread:
      type: object
      properties:
        id:
          type: string
          title: String
        name:
          type: string
          title: String
        creatorName:
          type: string
          title: String
        participants:
          type: array
          items:
            type: string
            title: String
          title: LinkedHashSet<String>
          uniqueItems: true
        messages:
          type: array
          items:
            $ref: '#/components/schemas/SessionThreadMessage'
          title: ArrayList<SessionThreadMessage>
        state:
          anyOf:
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - closed
                  title: String
                summary:
                  type: string
                  title: String
                timestamp:
                  type: string
                  title: UTC timestamp ISO-8601
              required:
                - state
                - summary
                - timestamp
              title: closed
            - type: object
              properties:
                state:
                  type: string
                  enum:
                    - open
                  title: String
              required:
                - state
              title: open
          discriminator:
            propertyName: state
          title: SessionThreadState
        timestamp:
          type: string
          title: UTC timestamp ISO-8601
      required:
        - creatorName
        - id
        - messages
        - name
        - participants
        - state
        - timestamp
      title: SessionThread
    SessionRunningBudget:
      type: object
      properties:
        startBudget:
          type: integer
          title: AgentBudgetUnit
        clamp:
          type: boolean
          title: Boolean
        remaining:
          type: integer
          title: AgentBudgetUnit
        overclaim:
          type: integer
          title: AgentBudgetUnit
      required:
        - clamp
        - overclaim
        - remaining
        - startBudget
      title: SessionRunningBudget
    SessionBudgetSettings:
      type: object
      description: >-
        Budgets settings for this session.  Budgets are consumed by agents in
        the session.
      properties:
        budget:
          type: integer
          description: |2-

                    This budget is shared across all agents in the session and can be used by any agent configured to consume the shared budget.
                    
                    The value is specified in micro cents. $1.00 is 100000000 and $0.01 is 1000000.")    
                    
          title: AgentBudgetUnit
        exhaustionBehavior:
          anyOf:
            - type: object
              description: >-
                The exhaustion of the session's budget will be ignored.  This
                has a high chance of overclaiming.
              properties:
                type:
                  type: string
                  enum:
                    - ignore
                  title: String
              required:
                - type
              title: ignore
            - type: object
              description: >-
                Once the session budget drops below the specified minimum,
                agents that claim for it will be killed.  The higher the minimum
                is the lower the chance of overclaiming.
              properties:
                type:
                  type: string
                  enum:
                    - kill_agent
                  title: String
                minimum:
                  type: integer
                  description: >-
                    The minimum value, specified in micro cents. $1.00 is
                    100000000 and $0.01 is 1000000.
                  title: AgentBudgetUnit
                force:
                  type: boolean
                  description: >-
                    If this is true, when an agent claims from the session
                    budget that is below the minimum, the agent will be killed
                    immediately.  If this is false, the agent will only be
                    killed if the agent requests for automatic closing.
                  title: Boolean
                forceDelay:
                  type: string
                  description: >-
                    If force killing is enabled, it will be delayed by this
                    amount before the agent is killed.  If this delay is too low
                    the agent may be killed before it handles to response to a
                    claim
                  title: Duration
              required:
                - force
                - minimum
                - type
              title: kill_agent
            - type: object
              description: >-
                Once the session budget drops below the specified minimum,
                agents that claim for it will trigger the session to be killed. 
                The higher the minimum is the lower the chance of overclaiming.
              properties:
                type:
                  type: string
                  enum:
                    - kill_session
                  title: String
                minimum:
                  type: integer
                  description: >-
                    The minimum value, specified in micro cents. $1.00 is
                    100000000 and $0.01 is 1000000.
                  title: AgentBudgetUnit
                delay:
                  type: string
                  description: >-
                    The delay before the session is killed.  If this delay is
                    too low, the agent whose claim triggered this may be killed
                    before it receives the response to that claim
                  title: Duration
              required:
                - minimum
                - type
              title: kill_session
          description: |2-

                    The behavior for agents consuming from this budget after it has been exhausted.  Note that this behavior
                    only applies to agents that consume from the session budgets. Agents that have their own budget will first 
                    perform behaviors described by the agent's own budget settings.
                    
          discriminator:
            propertyName: type
          title: SessionBudgetExhaustionBehavior
      title: SessionBudgetSettings
    SessionAgentClaimReceipt:
      type: object
      description: A receipt for a claim made by an agent
      properties:
        claim:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - llm_proxy_claim
                  title: String
                timestamp:
                  type: string
                  title: UTC timestamp ISO-8601
                inputTokenCount:
                  type: integer
                  title: ULong
                inputTokenCost:
                  type: integer
                  title: AgentBudgetUnit
                outputTokenCount:
                  type: integer
                  title: ULong
                outputTokenCost:
                  type: integer
                  title: AgentBudgetUnit
              required:
                - inputTokenCost
                - inputTokenCount
                - outputTokenCost
                - outputTokenCount
                - timestamp
                - type
              title: llm_proxy_claim
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - rpc_claim
                  title: String
                timestamp:
                  type: string
                  title: UTC timestamp ISO-8601
                claimType:
                  $ref: '#/components/schemas/RegistryAgentClaimType'
                quantity:
                  type: integer
                  maximum: 4294967295
                  minimum: 0
                  title: UInt
                additionalDescription:
                  type: string
                  title: String
              required:
                - claimType
                - quantity
                - timestamp
                - type
              title: rpc_claim
          description: The claim that was made
          discriminator:
            propertyName: type
          title: SessionAgentClaim
        cost:
          type: integer
          description: The calculated cost of the claim
          title: AgentBudgetUnit
        id:
          type: integer
          format: int32
          description: A unique sequential ID assigned to this claim
          title: Int
      required:
        - claim
        - cost
        - id
      title: SessionAgentClaimReceipt
    RegistryAgentIdentifier:
      type: object
      properties:
        name:
          type: string
          description: The exact name of the agent in the registry
          title: String
        version:
          type: string
          description: The exact version of the agent in the registry
          title: String
        registrySourceId:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - linked
                  title: String
                linkedServerId:
                  type: string
                  title: String
              required:
                - linkedServerId
                - type
              title: linked
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - local
                  title: String
              required:
                - type
              title: local
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - marketplace
                  title: String
              required:
                - type
              title: marketplace
          description: The identifier for the registry source that contains this agent
          discriminator:
            propertyName: type
          title: AgentRegistrySourceIdentifier
      required:
        - name
        - registrySourceId
        - version
      title: RegistryAgentIdentifier
    GraphAgentBudgetSettings:
      type: object
      properties:
        budget:
          type: integer
          description: >-
            The budget for this specific agent.  The value is specified in micro
            cents. $1.00 is 100000000 and $0.01 is 1000000.
          title: AgentBudgetUnit
        claimTypeCosts:
          type: object
          additionalProperties:
            type: integer
            title: AgentBudgetUnit
          description: >-
            A map where each key is a claim type name and the value the cost for
            that claim. Claims that do not have default values set must have
            their values set in this map or else they will not contribute to the
            budget.
          title: LinkedHashMap<String,AgentBudgetUnit>
        exhaustionBehavior:
          anyOf:
            - type: object
              description: >-
                Once's the agent's budget is exhausted, it will consume the
                session's budget.  If the session's budget is also exhausted,
                the session's exhaustion behavior will be applied.  If a claim
                is made that cannot be fully fulfilled by the agent's budget,
                the remainder will be taken from the session's budget.
              properties:
                type:
                  type: string
                  enum:
                    - consume_session
                  title: String
              required:
                - type
              title: consume_session
            - type: object
              description: >-
                Once the agent's budget is less than the specified minimum
                amount, the agent will be killed.  The higher the minimum is the
                lower the chance of overclaiming. This behavior will stop the
                agent claiming from the session's budget
              properties:
                type:
                  type: string
                  enum:
                    - kill
                  title: String
                minimum:
                  type: integer
                  description: >-
                    The minimum value, specified in micro cents. $1.00 is
                    100000000 and $0.01 is 1000000.
                  title: AgentBudgetUnit
                force:
                  type: boolean
                  description: >-
                    If this is true, the agent will be killed immediately.  If
                    this is false, the agent will only be killed if the claim
                    requests for automatic closing.
                  title: Boolean
                forceDelay:
                  type: string
                  description: >-
                    If force killing is enabled, it will be delayed by this
                    amount before the agent is killed.  If this delay is too low
                    the agent may be killed before it handles to response to a
                    claim
                  title: Duration
              required:
                - force
                - minimum
                - type
              title: kill
          description: >-
            The behavior of agent budget exhaustion, defaults to consuming
            session budget.
          discriminator:
            propertyName: type
          title: AgentBudgetExhaustionBehavior
      title: GraphAgentBudgetSettings
    SessionThreadMessage:
      type: object
      properties:
        id:
          type: string
          title: String
        threadId:
          type: string
          title: String
        text:
          type: string
          title: String
        senderName:
          type: string
          title: String
        mentionNames:
          type: array
          items:
            type: string
            title: String
          title: LinkedHashSet<String>
          uniqueItems: true
        timestamp:
          type: string
          title: UTC timestamp ISO-8601
      required:
        - id
        - mentionNames
        - senderName
        - text
        - threadId
        - timestamp
      title: SessionThreadMessage
    RegistryAgentClaimType:
      type: object
      properties:
        name:
          type: string
          description: >-
            A unique name for this claim type. This name will be used to make
            claims of this type
          title: String
        description:
          type: string
          description: A human-readable description of this claim type
          title: String
        dependency:
          type: string
          title: String
        cost:
          type: integer
          description: >-
            The cost of this claim type. This value can be overridden by the
            application. Application developers are encouraged to specify values
            for all claim types. The value is specified in micro cents. $1.00 is
            100000000 and $0.01 is 1000000.
          title: AgentBudgetUnit
      required:
        - dependency
        - description
        - name
      title: RegistryAgentClaimType
  securitySchemes:
    token:
      type: http
      scheme: bearer
      bearerFormat: Configured token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.