Skip to main content
TL;DR
  • Build two architectures side by side from a coding assistant: one monolithic claims-assessor and one multi-agent orchestrator with document extraction, FAQ, and claim calculation sub-agents
  • Score them with two evaluators, an LLM-as-a-judge for claim accuracy and a Python evaluator for format compliance
  • Run one experiment over 15 test cases covering covered / not-covered / edge / incomplete scenarios, and compare accuracy, cost, and latency in a single pass
  • Pick a winner and ship it via AI Chat, Python, TypeScript, or curl once the experiment identifies which architecture earns its complexity

What you’ll build

A working auto insurance claims system, built twice: once as a single end-to-end agent and once as a multi-agent orchestrator. Both are scored with the same evaluators against the same 15-case dataset to identify the winner. The insurance domain is just the vehicle; the focus is the architecture comparison loop for deciding whether a multi-agent system earns its orchestration overhead.

What you’ll learn

This guide covers how to:
  • Create and configure agents and sub-agents in orq.ai via MCP, directly from a coding assistant
  • Wire sub-agents into an orchestrator and give it the tools it needs to route messages
  • Build evaluators (LLM-as-a-judge and Python) that score agent outputs against an expected answer
  • Create a dataset and run one experiment that scores both architectures with both evaluators in a single run
  • Invoke the winning agent from AI Chat or programmatically via the Python, TypeScript, or REST API
Core takeaway: don’t default to multi-agent. Build both, score both, and let the experiment reveal whether the orchestration complexity pays off. Simpler architectures ship faster and fail less often; reach for the orchestrator when the evaluator shows it earns more accuracy.

Pre-requisites

  • An orq.ai workspace and API key
  • A project named 00-insurance-claims in the orq.ai dashboard (Projects, New Project). Every agent, evaluator, and dataset in this cookbook lives under this project.
  • A coding assistant with the orq.ai MCP server connected (Claude Code, Cursor, or any MCP-compatible assistant)
Need to set up MCP? See the MCP integration guide first.
Time: ~20 minutes setup plus 2-5 minutes experiment execution. Region: Netherlands auto insurance rules (€ currency, WA / WA+ / allrisk tiers). Cost: Roughly $0.50 to $2.00 per full experiment run.

Architecture overview

With this guide, build two architectures and compare them head to head. Architecture A: single agent Architecture B: multi-agent system Testing and measurement
When to use a workflow insteadThis cookbook uses an orchestrator agent that dynamically decides which sub-agent to call. That’s ideal when the conversation is open-ended, the policyholder might ask questions, provide info in any order, or need follow-ups.If the execution order is already known (e.g. a UI collects all claim data upfront in a form), skip the orchestrator entirely and chain deployments and agents in code:
In that pattern, invoke each deployment or agent sequentially via the SDK, passing the output of one as input to the next. This gives deterministic execution order, full control over the flow, and easier error handling at each step.When to choose which:See the Chaining Deployments tutorial for a step-by-step example of the workflow approach.
Create folders in the UI first. MCP can create agents, evaluators, and datasets, but it can’t create the folders they live in. To land them in specific folders like 00-insurance-claims/single-agent, 00-insurance-claims/multi-agent, 00-insurance-claims/evaluators, and 00-insurance-claims/datasets, create those folders in the orq.ai dashboard before running Step 1. Otherwise, drop the path from the prompts and the assistant will create them under Default or whichever folder is preferred.

Step 1: Create the single agent

The single agent handles the entire claims workflow end to end: incident intake, document processing, coverage verification, payout calculation, and decision communication. It runs on GPT-5.2 with conservative sampling settings (low temperature, top_p: 0) so the financial calculations stay consistent. Paste the following prompt into a coding assistant:
Claude Code
Expected outcome The MCP tool returns a confirmation with the agent’s unique ID (a long string like 01KJQ8...). Reference this agent by its key (claims-assessor) in later steps. Key terms used in the instructions:
  • WA (Wettelijke Aansprakelijkheid): liability-only, the mandatory minimum coverage in the Netherlands
  • WA+ / Collision: adds own-vehicle collision damage to liability coverage
  • Allrisk / Comprehensive: full coverage including theft, fire, storm, and vandalism
  • Total loss: when repair cost exceeds 75% of the vehicle’s market value
  • Temperature / top_p: sampling knobs that control randomness. Lower means more predictable, which matters for financial calculations.

Step 2: Create the sub-agents

The multi-agent architecture splits work across three specialized agents. These three calls are independent and can be fired in parallel if the assistant supports it.

2a: Document extractor

Parses policyholder messages and extracts structured claim data.
Claude Code

2b: FAQ assistant

Handles policyholder questions about the claims process and coverage.
Claude Code

2c: Claim calculator

The calculation engine. Performs all payout math on structured data.
Claude Code
Expected outcome Each call returns a confirmation with the sub-agent’s ID. Save the key values; they are needed in Step 3. Why different models? The document extractor and FAQ assistant use GPT-5 Mini because they’re cheaper and fast enough for focused tasks. The claim calculator uses GPT-5.2 because financial calculations are where precision buys its keep.

Step 3: Create the multi-agent system

The orchestrator coordinates the three sub-agents, deciding which one to call based on the policyholder’s message.
Claude Code
Expected outcome The orchestrator is created with the three sub-agents wired to it. It will automatically route messages to the appropriate sub-agent based on conversation context. Both complete systems are now ready to test.

Step 4: Create the evaluators

Evaluators automatically score agent responses. Create two: one LLM-as-a-judge and one deterministic Python check.

4a: LLM evaluator, claim accuracy

Claude Code
Template variables are filled in automatically with the policyholder’s message, the agent’s response, and the expected answer from the dataset.

4b: Python evaluator, format compliance

Claude Code
Expected outcome Each evaluator returns a confirmation with its unique ID. Save these IDs; they are needed in Step 6.

Step 5: Create the dataset and add test cases

The test dataset covers 15 claims across four scenarios:

5a: Create the dataset

Claude Code
Expected outcome: returns the dataset’s unique ID. Copy this ID; it is needed in the next step and in Step 6.

5b: Add test cases

Claude Code

Step 6: Create and run the experiment

Claude Code
The experiment runs each of the 15 test cases through both agents and scores the outputs with both evaluators, producing a side-by-side comparison in a single pass. Expected outcome: returns the experiment ID and a run ID. Typical runtime is 2-5 minutes.
Want to compare models directly instead of agents? Create experiments with task.type: "prompt" and a models array to test different models against the same instructions.

Step 7: Get the experiment results

Claude Code
Expected outcome: a download URL (valid for 1 hour) pointing to a JSON/JSONL file with each agent’s response, evaluator scores, cost, and latency for every test case. Compare the architectures on:
  • Accuracy rate (% of correct claim decisions)
  • Format compliance (% with all required elements)
  • Average cost per call
  • Average response time

Step 8: Invoke the winner in production

After identifying the best-performing agent, test it conversationally in AI Chat or integrate it programmatically via the Python SDK, TypeScript SDK, or REST API.
Find the API key in orq.ai dashboard → Settings → API Keys.

The architecture comparison loop

This is a repeatable pattern for any “should this be multi-agent?” decision: build simple first → build the orchestrated version → score both with the same evaluators on the same dataset → compare accuracy, cost, and latency in one experiment → ship the winner. The orchestration overhead of a multi-agent system is real (more prompts to tune, more places to fail, more latency per turn), so pay it only when the evaluator shows a meaningful accuracy gain in return.

Next steps