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.
Installation
Framework adapters
Install only the adapters you need:Your first contract test
Contract-test a two-agent handoff: the intake agent builds a vendor packet, and the security review agent consumes it. reagent-flow validates the shape of what flows between them.If an upstream change renames
contains_customer_pii to handles_personal_data, assert_handoff_matches fails with the exact path: handoff field 'data_access.contains_customer_pii': missing from data — attached to an Agent Stack Trace.Run the test
What just happened?
Recorded the intake agent's work
The
session context manager captured every tool call and result into a structured trace.Validated the tool output
assert_tool_output_matches checked that extract_vendor_packet returned data matching the declared schema.Linked the sessions
The security-review session declared
parent_trace_id and handoff_context, creating a typed boundary between the two agents.Trace privacy
reagent-flow stores traces locally in the configuredtrace_dir. Traces can include tool arguments, tool outputs, handoff payloads, and model responses.
Use a temporary trace_dir in tests, keep .reagent/ out of git, and avoid logging raw secrets or full customer payloads. For fields that should never be written to trace files, pass redact_fields:
.trace.json file. In-memory assertions still validate the original values.
Next steps
Core Concepts
Understand sessions, traces, and the recording model.
Contract Testing
Learn how reagent-flow treats handoffs as contracts.
Framework Adapters
Auto-capture traces from OpenAI, Anthropic, LangChain, and more.
Vendor Onboarding Example
See a full multi-agent approval workflow with contract testing end-to-end.
Run in CI
Add reagent-flow contract tests to GitHub Actions.
Why Contract Testing?
Understand how reagent-flow differs from guardrails, structured outputs, and evals.