Under the Hood
AI reads the paperwork. Plain rules make every decision,
and nothing leaves without a person saying yes.
What happens when you add a paper?
Every photo, letter or note becomes a document with text. For a typed note that text is yours. For a photo or a PDF, the Evidence Agent sends the file to Claude (Anthropic's Opus 5.5 model, effort set to low) and asks for four things back in a fixed shape: what kind of document it is, a short title, its language, and the lines that matter for disaster recovery copied exactly as written: names, addresses, dates, amounts, decisions, deadlines, claim and policy numbers. A photo of damage with no printed words gets two to five plain sentences describing what is visible.
Claude then lists facts from that text. Each fact has a type (date of loss, money, damage, need, deadline and ten others), a label, a value, a machine-friendly normalized value and the exact quote it came from. The answer is checked against a schema before BayouBridge uses it; anything that doesn't fit the schema is treated as a failed read.
The made-up example families are always read by a rules-based reader instead: a set of patterns that finds the same kinds of facts in English and Spanish. So the demo never waits on a model and works with no internet. With no API key on the server, the rules reader reads your own case too, but it can only read typed text, not photos or PDFs.
Your papers
Photos, PDFs, letters and what you type
AI Reader
Reads photos and PDFs with Claude
Paper Reader
Reads typed text with plain rules, in English and Spanish
Checked and repaired
Bad quotes and values fixed or dropped; anything the rules found is added back
Who’s who
Matches spellings of the same name
What the family needs
Medical power first
What doesn’t match
Dates and names that disagree
Help that fits
5 kinds of help checked, each with its documents and deadline
Next question
The one missing paper that unblocks the most
Your plan
Ordered by safety, then deadline
Drafts for your OK
Papers to attach, quotes, a cover note in English and Spanish
Practice outbox
Nothing is really sent
Rows read top to bottom. Nodes side by side happen at the same time. Only the top two rows use AI; everything after is ordinary code.
Why trust what the AI read?
Because BayouBridge doesn't take its word for it. Every fact must quote the document. Before comparing, both sides are normalized: case, spacing, curly quotes, dashes and the long dot leaders on estimates. If a quote can't be found, BayouBridge tries once to repair it with the line that actually contains the value, and lowers its confidence to 80 percent of what Claude claimed. Otherwise the fact is dropped and the drop is logged.
Normalized values are checked too. Dates must be real calendar dates in year-month-day form. Deadlines must say whether they come from a FEMA letter or an insurer. Money must be a plain number under one of the four labels the rules engine reads. Damage, needs, decisions and exclusions must be one of the keys the rules know. Where a value is wrong but fixable from the fact's own words, it is repaired; where it isn't, it is dropped.
Finally a backstop runs: the rules reader goes over the same text, and anything it finds that Claude missed is added back. The AI can add to what the offline path finds, but it can never take anything away. Tests prove that Claude output equal to the rules output produces an identical case, down to the plan.
What if the AI is slow, wrong or offline?
Each request to Claude has a limit, 12 seconds for text and 40 for a photo or PDF, and no automatic retries. On top of that, the coordinator gives each paper 45 seconds and the whole run 90 seconds of AI time. When a read times out, is refused, returns something that fails the checks, or errors, that one paper falls back to the rules reader and the activity log says why.
After three fallbacks in one run a circuit breaker trips: calls still in flight are cancelled and every remaining paper goes straight to rules. A bad key falls back in a fraction of a second; an unreachable server in about ten. And if a whole step of the pipeline ever throws, the run continues: steps with a safe default (no conflicts, an empty map, no drafts) carry on with a warning, steps without one skip what depends on them, and the run always finishes.
- One request, typed text
- 12 s
- One request, photo or PDF
- 40 s
- One paper
- 45 s
- Whole run
- 90 s
Papers are read in parallel, so the worst case is about one paper's limit, not the sum. Three failures send every remaining paper to the rules reader. The example families never call Claude.
Ask Claude to read one paper
12 seconds for text, 40 for a photo or PDF, no retries
In time, passes the checks
Keep Claude’s details
Add anything the rules found that Claude missed
Too slow, refused, fails the checks or errors
Rules reader takes over this paper
The activity log says why
Fewer than 3
Next paper asks Claude as usual
3 or more
Circuit breaker trips
In-flight requests are cancelled; every remaining paper goes to the rules reader
The run always finishes
A step that fails carries on with a safe default and a warning, or skips what depends on it
A bad key falls back in a fraction of a second; an unreachable server in about ten. Tests prove the offline path reaches the same plan as the AI path.
Who decides what help fits?
Not the AI. After reading, every step is plain code that gives the same answer every time. It works out who is in the household (matching spellings like Ana Reyes and Anna Reyes-Ortega), lists needs by urgency (power for medical equipment first), and flags details that disagree, such as FEMA saying the storm hit on October 9 and the insurer saying October 10.
It then checks five kinds of help, each written from an official source: a FEMA appeal, the homeowners insurance claim, an SBA disaster loan, the utility's critical-care list and a 2-1-1 food referral. Each has triggers, a list of documents it needs and, where there is one, a deadline rule: 60 days from the date on a FEMA letter, or the due date in the insurer's email. Readiness is simply the share of required documents on file. Everything is labeled a possible match; only the agency decides eligibility.
The one question BayouBridge asks next is scored, too: one point for each kind of help a missing document would unblock, more as a deadline gets close, five more if the household already said they have it, and two more if it helps someone who depends on medical power.
- Reading 6 papers
- 48 min
- Finding help that fits
- 25 min
- Preparing 2 drafts
- 24 min
- Writing the plan
- 15 min
- Checking mismatches
- 10 min
- Picking the next question
- 10 min
- Who's who, case map
- 10 min
Estimates of time a caseworker would spend by hand, 142 minutes in all. They are placeholders until navigator interviews replace them.
How does one electric bill unblock an appeal?
In the example, FEMA turned the family down because it couldn't verify they lived in the home. The appeal needs four documents and has three, so it sits at 75 percent. The voice note mentions that September's electric bill is in an email, so that becomes the one question to ask.
When the bill arrives only the bill is read; the other six papers are reused from the last run. A bill counts as proof of occupancy only if its service address matches the damaged home and its billing period ends before the earliest date of loss any document gives. September 30 comes before October 9, the address matches, and the appeal moves to 100 percent and becomes a draft waiting for approval. A bill for a different street, or one dated after the storm, is rejected with the reason shown.
A bill or bank statement is read
Same street address as the damaged home?
“Lane” and “Ln” count as the same
Yes
Does the billing period end before the earliest date of loss?
Any paper’s date counts; the earliest wins
No
Doesn’t count
“The service address doesn’t match”
Yes
Counts as proof of occupancy
FEMA appeal: 75% → 100%, drafted for your OK
No
Doesn’t count
“The billing period ends after the storm”
The reason is always shown. In the example, September 30 comes before October 9 and the address matches, so the appeal is unblocked.
How do the agents work together?
There is no manager model deciding who goes next. The coordinator is a small scheduler: a list of tasks, each naming the tasks it depends on. It starts everything that is ready at once, waits for that wave to settle, and looks again. Reading the papers is wave one, and because each paper is independent, all of them start in the same instant.
Between waves the only thing shared is one case record. Each task reads what earlier tasks wrote, fills in its own slice (readings, people, needs, matches, plan, drafts) and publishes just that slice, so the screen updates the moment a step finishes instead of at the end. Every step also writes a line to the activity log, and those same lines move the characters in the office.
A step that fails does not stop the run. Steps with a safe default carry on with it and add a warning. Steps with no safe guess are marked failed and everything that depends on them is skipped, with a log line that says why. A task that can never start, because something it needs is missing, is caught instead of waited on forever.
The browser follows along over server-sent events, so there is no polling and no WebSocket. Log lines are spaced at least a quarter of a second apart, so a run that finishes in milliseconds is still watchable; real Claude delays are never padded. A keep-alive goes out every ten seconds, and if the browser disconnects, an abort signal cancels any Claude call still in flight.
Every box is a task that names the tasks it waits for. The coordinator starts everything that is ready, all at once, then looks again. With six papers and a bill to check that is 16 tasks in 8 waves, and the six readings run side by side, so reading costs one paper’s time, not six.
A step throws an error
Has a safe default
Use the default and warn
A paper, the bill check, who’s who, mismatches, the next question, drafts, approval gates, the case map
No safe guess
Mark it failed
What the family needs, the matches and the plan can’t be guessed
Dependents carry on
They read the safe default; the app shows a warning
Dependents are skipped
One log line each says which step didn’t finish
The run still finishes
A step that can never start is caught, not waited on forever
Tests break steps on purpose and check that the run ends with a plan or a clear list of what was skipped.
POST /api/run/stream event: agentdata: {"seq":1,"agent":"Coordinator","action":"Started case run","detail":"6 documents queued. 16 tasks in the graph."} event: taskdata: {"id":"extract:h2-roof-photo","agent":"Evidence Agent","label":"Reading PXL_0311.jpg","status":"started","via":"claude"} event: taskdata: {"id":"extract:h2-fema-letter","agent":"Evidence Agent","label":"Reading FEMA_Letter_Oct30.pdf","status":"started","via":"claude"}: …the other papers start in the same instant event: taskdata: {"id":"extract:h2-fema-letter","agent":"Evidence Agent","label":"Reading FEMA_Letter_Oct30.pdf","status":"started","via":"rules"}: same task announced again, now read by rules: Claude was too slow event: statedata: {"extractions":[{"docId":"h2-roof-photo","method":"claude", …}]} : keep-alive event: donedata: {"state":{ … },"extraction":{"claude":5,"rules":1,"fellBack":1,"mode":"mixed"}}Five kinds of frame: task (a step started or finished), agent (one activity-log line), state (the slice a step just produced), done (the final state, the one to trust) and error. It is a POST, so the browser reads the stream itself instead of using EventSource. The numbers in the last frame are an example.
Who can send anything?
Only you, and only to a practice outbox. For each kind of help that has every document it needs, the Packet Agent prepares a draft: the papers to attach, the quotes that support it, and a cover note in English and Spanish. A safety step marks every outgoing task as needing approval, and the only way to approve it is a server request that checks the plan the server itself produced. Unknown cases and tasks are refused, a task still waiting on documents is refused, a task that sends nothing is refused, and approving twice does nothing new.
Task identities come from what they are about, not their position in a list, so an approval still points at the right task after a new document reshuffles the plan. Nothing in BayouBridge makes a network call except the request to read a document.
Where do my papers go?
Into the memory of one server, and nowhere else: no database and no files on disk. Each case has a random id that can’t be guessed, expires two hours after its last use, and can be deleted at once. At most 200 cases are kept, and each case can make at most 63 AI reads, so no one can rerun a case to run up the bill. Uploads are limited to 10 files of 8 MB each, as JPEG, PNG, WebP, GIF, PDF or plain text, and photos are shrunk to 1,600 pixels in your browser before they are sent, which also strips their location data. Document text is never written to the logs. With a key set, photos and PDFs are sent to Anthropic's API to be read; without one they are not read at all, and the case says so.
What are the little characters doing?
They are the agents. Each step of the pipeline reports when it starts and finishes over a live stream (server-sent events, with at least 250 milliseconds between messages so a fast run is still watchable, a keep-alive every 10 seconds, and a plain request as a fallback). A small director turns those reports into jobs: walk to a desk, work there for at least 0.65 seconds, move on. Desks sit on a ring around an open floor so no one walks through furniture, characters hurry up to 3.2 times their normal pace when work piles up, and the camera follows whoever has the most going on, without flicking between two close calls.
The office is drawn with React Three Fiber and loads only when you scroll near it. On the home page it runs the example case right in your browser, with the rules reader, so showing it costs nothing.
By the numbers
Everything below comes from running the example case, a made-up family with six papers, through the real pipeline. The first chart shows how much each paper gave up. The insurer’s email is the richest, with nine details: the policyholder’s name, the date of loss, the due date, the inspection appointment, the hurricane deductible, the policy number, the flood exclusion and the claim number, which appears twice, in the subject line and in the text. A damage photo gives only two or three, because a photo has few words to quote.
The second chart is the electric bill’s effect. Before it arrives the family has 63 percent of the documents their five kinds of help ask for. After, it is 75 percent, and the one help that was blocked, the FEMA appeal, is complete. Nothing else moves: the bill only counts toward the appeal, so the other four pieces of help stay where they were.
- Insurance email
- 9
- Voice note (Spanish)
- 8
- FEMA letter
- 7
- Repair estimate
- 6
- Roof photo
- 3
- Electric bill (arrives later)
- 3
- Living room photo
- 2
Names, addresses, dates, amounts, claim numbers, damage and needs. 35 details in all from six papers, plus 3 from the bill.
- Insurance claim
- 100%
- Food referral
- 100%
- FEMA appeal, before
- 75%
- FEMA appeal, after
- 100%
- SBA loan
- 67%
- Critical-care list
- 0%
The critical-care list still needs a doctor’s form, which is why the next question after the bill is “Who is Carmen’s doctor?”
How do we know it works?
Seventy-one automated tests run in about five seconds without any network. A golden snapshot pins every line of the example case's output, from facts to plan to cover notes, so wording can't drift by accident. Other tests feed the AI path fake answers: one that never replies, one that invents a quote, one with broken dates, one with nothing at all. They check the approval rules and the live stream, make a step fail on purpose, and run a second made-up family through the same code to prove nothing about the Reyes family is built in.
BayouBridge was built for Teen Hacks Houston. The example family, their papers and the storm are made up.
← Back to BayouBridge