Documentation Index
Fetch the complete documentation index at: https://reagent-ai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
When an assertion fails, reagent-flow attaches an Agent Stack Trace — a readable dump of every turn, tool call, and result. This gives you the full context of what the agent did, making it easy to diagnose why the assertion failed.Example output
What’s included
Each turn in the stack trace shows:- Turn index — positional ordering
- Tool call — function name and arguments
- Tool result — the return value or error
- Text responses — LLM text-only responses (marked as
[text response])
When they appear
Agent Stack Traces are attached to every assertion failure — handoff contracts, tool output contracts, flow assertions, golden baseline diffs, and more. They’re part of theAssertionError message, so they appear directly in pytest output.
Reading a stack trace for handoff failures
For multi-agent handoff failures, the stack trace shows the child session’s full history plus the handoff context:Handoff context line shows exactly what the child received, making it easy to spot the drift (here: handles_personal_data instead of contains_customer_pii).