AI Agents: Reliable

2026-10-12

About

This post is an overview of a small team of AI agents. They do office work for a fictional insurance company. They read the mail. They check claims against business rules. They pay money and write letters. They also send work to the agent of another company. A person watches the agents live and approves the important steps. The agents run on a laptop. You start it with three commands.

The question behind it

Many agent demos look good. But you cannot trust them with money or with decisions about people. Each business with real rules needs more than a good demo, for example in insurance, banking, public offices or travel:

So the question is: How can an agent be reliable enough for real business rules?

This project uses insurance as the example. The approach is not specific to insurance.

The answer is one sentence:

The LLM reads and writes. Code decides. A person approves.

The picture

Architecture: 7 agents, three protocols, eight patterns

Read the picture from left to right. A person gives a task. The agents give the work to the next agent. The label on each arrow shows the protocol. The numbers on each agent show the patterns that the agent uses.

The seven agents

AgentJobInput → outputType
Olivecoordinates the other agentsa task → a plan, then a summaryloop
Pennysorts the maila document → its type and where it goesgraph
Clarachecks health insurance claimsa claim → decision, letter, paymentgraph
Hugochecks home insurance claims for another companya claim → case ID, status, decisionspec
Jettybooks flightsa travel task → a bookingloop
Doodlekeeps notesa note → a saved noteloop
Pebblecalculates locallya calculation → the resultloop (local model)

Jetty, Doodle and Pebble were the first agents. They show how an agent loop works. The other four agents work as a team in the final demo.

Each agent has a name, a role, a model and a version. The console always labels them "AI agent". So nobody thinks that a human did the work.

Three rules that make it reliable

1. The LLM reads and writes. It does not decide. The LLM gets the data from the claim and copies the exact words as proof. Business rules in Python check the claim. A decision table decides.

2. A person approves the important steps. The plan, each rejection and each unclear case wait for a person. A prompt injection like "ignore the rules and pay" also goes to a person.

3. Only one step can pay. Only the last step changes data. Each payment has a unique key, so the same step never pays twice.

Built for more than one domain

The business logic is in three parts. You can replace each part:

The flow does not change. Hugo is the proof. He checks a different type of claim for a different company. But Hugo has no flow code of his own. He is only a configuration file, his rules, a decision table, data and test cases.

Three protocols for three borders

This is the key idea:

One real run

A person gave Olive one task: "Process today's inbox." The inbox had five documents. Each document takes a different path through the system.

DocumentWhat happenedShows
Invoice for glassesClara paid 140.00 EUR and sent a letterrules in code, payment through MCP
Claim with "ignore the rules"a rule stopped it, and a person rejected itprompt injection, human-in-the-loop
Water damagewent through A2A to Hugo; Hugo asked for the IBANA2A, a second company
Objectionwent to the queue of the claims teamrouting by a table
Address changewent to the queue of the service teamrouting by a table

The console after the run: one lane for each agent, with the handoffs between them

All LLM calls of the four agents cost $0.0118 together. The run took 144 seconds. The person needed 26 of these seconds to read and approve.

Patterns

Patterns and approaches in this project:

* Code means a normal program. It can be an exact rule (for example "365 days") or a heuristic (for example a list of attack phrases). Both always give the same result for the same input. Classic machine learning (ML), for example a small scikit-learn model, is a third option. This project does not use it.

How it is built

All companies, people and cases are fictional.