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

# Sessions and Runtime Diagnostics

Sessions provide runtime observability for all agentic projects, including deployed and draft versions. They help teams monitor conversations, inspect execution behavior, troubleshoot failures, analyze traces, and optimize runtime performance across agents, workflows, tools, and channels.

Use Sessions to debug agent behavior, validate orchestration flows, investigate runtime issues, and analyze production usage patterns. Sessions capture the complete runtime lifecycle of a conversation, including:

* User and agent messages.
* Tool executions.
* Multi-agent orchestration.
* Routing decisions.
* Guardrail evaluations.
* Runtime state changes.
* Performance and token metrics.

## Monitor Sessions

The Sessions view provides visibility into active and completed conversations across environments and channels. Click any session row to open the session detail page:

* **Conversations**: Capture full conversation transcript, agent conversation tree visualization showing branching across agents in multi-agent projects, and session summary panel with metadata.
* **Traces**: Show the execution timeline of every action the agent took, including LLM calls, tool invocations, handoffs, state changes, and errors. Each event shows timing information and expandable request/response payloads.

Developers can:

* Search for specific sessions
* Filter sessions by agent, environment, channel, status, or time range
* Monitor runtime activity across deployments
* Investigate failed or long-running conversations
* Analyze conversation volume and execution trends

Each session includes runtime metadata such as:

* Session duration
* Message count
* Trace count
* Runtime cost
* Environment
* Channel
* Agent

## Session Lifecycle

Each conversation is represented as a session with its own runtime state and execution history, including workflow state, variables, tool activity, and orchestration history.

**Session States**

| Status    | Description                                                          |
| --------- | -------------------------------------------------------------------- |
| Active    | Session is actively processing requests                              |
| Idle      | Session is waiting for additional user input                         |
| Completed | Conversation completed successfully                                  |
| Failed    | Session terminated due to runtime failure                            |
| Abandoned | Session ended before completion due to user inactivity or disconnect |
| Escalated | Session was transferred to a human agent or escalation workflow      |
| Archived  | Session is retained for historical reference and no longer active    |

## Inspect Runtime Execution

Opening a session provides a complete execution view of the conversation. This includes:

* Conversation timeline
* Agent responses
* Tool activity
* Multi-agent handoffs
* Runtime state
* Performance metrics
* Errors and traces

For multi-agent systems, session inspection helps developers understand:

* Participating agents
* Agent handoffs
* Context propagation between agents
* Tool invocations during execution
* Analyze Execution Traces

Each session generates structured execution traces that capture internal runtime behavior. Traces are essential for understanding how the platform executed a request internally.

* Traces provide visibility into:
* LLM calls
* Tool execution
* Routing decisions
* State changes
* Guardrail evaluations
* Handoffs
* Errors
* Runtime latency

## Common Trace Events

| Event Type      | Description                            |
| --------------- | -------------------------------------- |
| llm\_call       | LLM invocation and response generation |
| tool\_call      | Tool execution request                 |
| tool\_result    | Tool execution result                  |
| decision        | Workflow or routing decision           |
| handoff         | Transfer between agents                |
| state\_change   | Session variable updates               |
| guardrail\_eval | Guardrail validation result            |
| error           | Runtime or execution failure           |

## Monitor Runtime Performance and Analyze Model Usage

Sessions also provide runtime performance insights across conversations and agents. It also captures the models used during execution. This is useful to:

* Understand model routing behavior
* Compare runtime costs
* Analyze latency differences
* Validate environment configurations

Metrics include:

* Token consumption
* Session cost
* Response latency
* Execution duration
* Trace counts
* Tool latency
* Model usage
