Step 1: Preflight — Triage and Refine
First, we triage the user’s request to see if it’s actionable. This agent refines the query and produces a structuredPreflightOut
model.
ambiguous
flag and decides whether to STOP
(returning PreflightOut
to the user) or CONTINUE
with the refined_requirements
.
Step 2: Retrieve & Augment
This step uses a handler to perform the core RAG logic: retrieve business knowledge from a vector DB (Pinecone) and then augment a prompt with that context for the final analysis. We use a simplepassthrough
agent to trigger this handler.
- Input: The
refined_requirements
string from thepreflight_handler
. - Output: The
augmented_prompt
string, which is passed to the final analyzer.
Step 3: Analyze — Classify and Report
The final agent takes the augmented prompt and performs the fraud analysis, returning a structured report.- Input: The
augmented_prompt
from the retrieval handler. - Output: An
AnalysisReport
Pydantic object.