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

# Test Agents

Test and debug Agentic projects before deploying them to production. The platform provides interactive test sessions, execution traces, session inspection, and automated evaluation workflows to help validate agent behavior, tool execution, routing, and response quality.

The platform supports the following testing capabilities:

| Capability                | Purpose                                                    |
| ------------------------- | ---------------------------------------------------------- |
| Studio Test Chat          | Interactively test agents and workflows                    |
| Execution Traces          | Inspect decisions, tool calls, handoffs, and state changes |
| Session Inspection        | Analyze runtime behavior for a session                     |
| Trace Analysis            | Detect slow spans, failures, and anomalies                 |
| Test Personas & Scenarios | Create repeatable conversation flows                       |
| Evaluations (Evals)       | Measure quality and performance using automated evaluators |

## Test in Studio Chat

Use the Studio test chat to validate agent behavior interactively before deploying to production. The agent responds using the same execution pipeline as production, including:

* Tool calls and their results.
* Flow step transitions.
* Handoffs between agents.
* Guardrail checks on inputs and outputs.

### Start a Test Session

1. Open your project in Studio.
2. To test the full project, go to the **Overview** page and click **Test your agents**. For multi-agent projects, Studio defaults to the project's entry agent (usually the supervisor).
3. To test an individual agent in isolation, go to the **Agent** page and click **Chat with Agent**. <img src="https://mintcdn.com/koreai/pdyel7KzGgeDz37v/agent-platform/images/test.png?fit=max&auto=format&n=pdyel7KzGgeDz37v&q=85&s=1cfad6d8045807bae35aa2aca6eced67" alt="Test Agent" width="1591" height="800" data-path="agent-platform/images/test.png" />
4. Or use the **Chat** option next to any agent on the **Overview** page. <img src="https://mintcdn.com/koreai/pdyel7KzGgeDz37v/agent-platform/images/test-agent.png?fit=max&auto=format&n=pdyel7KzGgeDz37v&q=85&s=48351872b7d23767e025d86ef870709a" alt="Test Agent" width="1857" height="816" data-path="agent-platform/images/test-agent.png" />
5. Studio creates a test session. Type a message in the chat input and press Enter.
6. Each agent response message includes metadata such as:
   * Executed flow step
   * Tool invocations
   * Response time

## Debug View

The Session Debug view provides real-time visibility into agent execution during a conversation. Use it to inspect responses, trace execution flow, monitor token usage, and diagnose runtime issues.

The left panel displays active and historical chat sessions. The center panel shows the live conversation between the user and the agent, including routed responses and workflow progression. The right-side diagnostics panel provides detailed runtime insights such as trace events, model usage, token consumption, session identifiers, and timeout diagnostics in real-time.

| Signal                               | What it means                                               | What to do                                                                          |
| ------------------------------------ | ----------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| High response latency on a turn      | A tool call is slow or the LLM loop ran multiple iterations | Check the trace for slow `tool_call` spans; consider adding `ON_ERROR` retry limits |
| Unexpected handoff                   | Supervisor routed to wrong agent                            | Review the `handoff_match` trace event and refine `WHEN` conditions                 |
| Tool called with wrong parameters    | `GATHER` field mismatch or type error                       | Check `gather_extraction` trace events and validate field types in ABL              |
| Guardrail triggered unexpectedly     | Output hit a content or format boundary                     | Review `guardrail_eval` trace events and adjust guardrail thresholds                |
| Agent asks for data already provided | Session state not passed during handoff                     | Check `PASS` declarations in `HANDOFF` blocks                                       |

## Using Traces to Debug

Use traces to inspect every decision, tool call, state update, and handoff during execution.

1. Open your project in Studio.
2. Navigate to Sessions and select a session.
3. Click the Traces tab to view the full execution trace.
4. Use filters to narrow results by event type, agent, or time range.

### Trace Structure

Each session produces a hierarchical execution trace organized into spans.

```
Session
+-- Turn 1
|   +-- LLM Call
|   +-- Tool Call
|   |   +-- Tool Result
|   +-- Response
+-- Turn 2
|   +-- Decision
|   +-- Handoff
|   +-- Response
```

For repeatable, automated testing beyond manual chat, the platform supports Personas, Scenarios, and Evals. [Learn More](/agent-platform/evals).
