The arrow that wasn’t there
In 2025, an MRI appeal won because the patient had a specialist referral. Four cases won that way. In 2026 the policy dropped the rule: no referral exception any more.
So when a new 2026 MRI claim came in, our system had a near-identical 2025 winner sitting right there, and it refused to use it. The reason wasn’t “the text looks different”. The old win had links to the 2024 and 2025 policies and no link to 2026. One missing edge in a graph.
That’s ClaimBridge: a review workspace for denied health-insurance claims, where five agents share nothing but a FalkorDB graph database. Everything in it is fictional, and it’s a research prototype, not a coverage decision service. We built it for Graph Hacks (WeMakeDevs and FalkorDB, 15 to 18 October 2026), as a team of four: Abdul Basith, Syed Atheequr Rahaman, Shaik Rayyan Ahmad and Abdul Aashim. Demo video and code are linked below.

Why this is hard
Insurers change their policies every year, and an appeal usually leans on past cases that won. A win from last year might rest on a clause that no longer exists.
The usual way to find “similar past cases” is text similarity: turn texts into numbers and pick the closest. That gives you the most similar old case, not the one that is still valid. Last year’s MRI win is extremely similar to this year’s MRI denial, and wrong to rely on.
In ClaimBridge a person approves every recommendation and later records what really happened. That outcome becomes memory for the next claim, but only while the policy version, the clause and the conditions still apply.
A graph, quickly
I’ll define each term the first time it shows up. A graph database stores things and the connections between them. A node is a thing (a claim, a clause, a past finding). A relationship is a labelled arrow between two nodes. FalkorDB is the graph database we used, and Cypher is its query language: you describe a pattern and it finds matches. This one is behind a screenshot below.
MATCH (c:Claim {claim_id:'EV-T1-01'})-[r]-(x) RETURN c,r,x LIMIT 50The core of our model:
Claim -GOVERNED_BY-> PolicyVersion -CONTAINS-> Clause -SUPERSEDES-> earlier ClauseClaim -CONSIDERED-> FindingFinding -VALID_IN-> PolicyVersionFinding -ON_LINEAGE-> ClauseFinding -NEEDS_EVIDENCE-> EvidenceTypeA Finding is a lesson learned from a past outcome. After seeding, the graph has 509 nodes, 1,328 relationships, 16 node labels and 30 relationship types. During a demo it grows to about 586 nodes and 1,497 relationships, because every event, checkpoint and recommendation is stored too.

Memory with an expiry date
Every clause gets a fingerprint: a SHA-256 hash (a short code that changes completely if the input changes at all) of the clause’s text, parameters, required evidence, type, services and routing. A Finding gets a VALID_IN edge to a policy version only if that version’s clause has the same fingerprint as the one the Finding was learned on.
The MRI clause has the same fingerprint in 2024 and 2025 (1752c495c902…) and a different one in 2026 (a4528ab02929…). So the Finding F-MRI-REFERRAL is valid in 2024 and 2025, and the verifier, following claim to policy version to clause to Finding, hits the gap and stops with the verdict VERSION_DRIFT. In the console, “Show the path through the graph” marks the exact hop where it breaks: the “valid in” one, out of ten.
Here is that check as a toy. The clause texts and fingerprints are the real ones, and the fingerprint function is the project’s recipe rewritten in the browser.
referral_exception: true
referral_exception: false
- (F-MRI-REFERRAL)no edge(PolicyVersion 2024)
- (F-MRI-REFERRAL)no edge(PolicyVersion 2025)
- (F-MRI-REFERRAL)no edge(PolicyVersion 2026)GOVERNS THIS CLAIM
- 1Same denial reasonPREAUTH_MISSING on both
- 2Learned on the same clause lineageL-MRI-PREAUTH on both
- 3VALID_IN edge to the governing versionedge found
- 4Not contradicted by a later outcomeno contradiction
- 5Conditions metconditions met
The reverse test: rewind the demo to 2025, then publish 2026. Of 13 findings, 4 go stale (F-MRI-REFERRAL, F-OON-ER, F-PHYSIO-NOTES, F-TIMELY-180) and 9 carry forward. A test that changes only the wording of a clause also invalidates its memory. The text counts, not the section number.
Learning from an outcome
When a person approves a recommendation and later records the outcome, say OVERTURNED with the documents that were actually used, a worker called the Curator writes a Finding.
We tried it with two claims. After the first was overturned using an emergency attestation and an itemized bill, a second, similar claim showed a checklist item: “A similar resolved case used the itemized bill; ask a caseworker whether to include it.” Next to it, a support score of 67%.
That number is a smoothed count after one win, (wins + 1) / (wins + losses + 2). The page calls it “not an approval probability”, and it gates no decision.

Five workers, one graph
ClaimBridge has five worker roles: intake, retrieval, verifier, planner and curator. Each runs as its own process and none of them talk to each other. A claim’s status says which role may work on it. A lease (a temporary hold on a job, like a library book with a due date) says which worker has it right now.
Each time a lease is taken, a fencing token (a number that only goes up) increases. Every write checks the owner, the token and the expiry in the same query that does the write, against the database’s own clock:
MATCH (c:Claim {claim_id: $cid})WHERE c.lease_owner = $me AND ($gen IS NULL OR c.lease_gen = $gen) AND c.lease_until >= timestamp() AND c.status = $fromSET c.status = $to, c.lease_owner = null, c.lease_until = null// the audit event and checkpoint are appended in this same queryThis matters for a worker that stalls but is still alive. Its lease expires, a replacement takes over, then the stalled one wakes up and tries to finish. Its token is stale, so its write is refused and logged as FENCED_WRITE_REJECTED.
We tested two things. Killing workers at random: 12 claims, 10 kills, 4-second leases, and all 12 ended correct, all 10 resumed, 0 duplicates, mean 7.12 seconds. (The live demo uses 20-second leases, so a kill takes about 20 to 28 seconds to recover from.) Random kills can’t show fencing, because a killed process never wakes up, so a separate paused-worker test checks that the stale write, checkpoint and commit are all rejected.
Two limits to know about. Delivery is at-least-once with fenced commits, not exactly-once. And workers don’t come back after a kill, except that the verifier has a second copy.
Track 01: the graph as something an agent can ask
We entered two tracks. Track 02, Agent Memory and Coordination, is everything above. Track 01, Agents That Act on Connected Data, is this part.
There is one read-only catalogue of 8 tools (get_claim, check_applicability, explain_path, policy_blast_radius and so on), served over MCP, the Model Context Protocol, a standard way for an AI client to find and call tools. The server is locked to one tenant and has no write tool.
On top sits an investigator: a model chooses which tools to call, and it can’t write Cypher or change anything. Its brief is checked against the tool results. Every id and number in it must appear in a result from the same run, or the brief is replaced with a template and labelled as one. That checks membership, not meaning, and we have a recorded brief that says a precedent “supports the denial” (wrong) and passes because every id in it is real. The investigator demo you can watch is a recorded run of the real model, replayed. For EV-T1-01 it used 5 rounds and about 7,900 tokens live, and the replay takes 0.3 seconds.
The last tool is blast radius: if a clause changes, what rests on it? FalkorDB’s algo.BFS (breadth-first search, walking outwards one hop at a time) only follows outgoing edges, so the tool copies the dependency edges both ways into a throwaway scratch graph, runs BFS and PageRank there, and deletes it. For the 2026 physiotherapy limit clause, the top-ranked one on the Memory page, it reaches 2 earlier clause versions, 2 precedents, 5 verified outcomes behind them and 2 claims, up to 3 hops away, and that lineage ranks first of 14.

Worth saying clearly: the investigator and the MCP server only read. And on our small demo data the ranking mostly follows plain counts, while BFS reaches the same claims an ordinary variable-length Cypher query would. The algorithms add hop distance and a rank that counts indirect dependence, nothing more.
What broke when we ran it for real
Scripted tests passed long before the real thing worked.
The first surprise was a hyphen. The real model sometimes wrote ids with a non-breaking hyphen (U+2011) instead of a normal one. Our id pattern only matched the normal kind, so an invented id spelled that way would have slipped past the guard. The scripted test model never did it. We now normalise dash lookalikes, and there’s a regression test.
Then the free-tier model, which fails its last round about one run in three. We retry, then fall back to a template brief that’s labelled as one. We also record model answers so the demo replays the same way every time, with one catch: a replay only matches if the claim is in the same state as when it was recorded.
And a Docker one: Compose names a project after its folder, so a second copy of the repo in a same-named folder replaced our running containers.
A few smaller integration bugs (a mount missing from one container, an endpoint returning a 500) fell out the same way.
What the numbers honestly show
We evaluated on 34 synthetic claims against a no-memory version of our own system and a plain RAG baseline (search for similar text, then hand it to a model).
| ClaimBridge | No memory | Plain RAG | |
|---|---|---|---|
| Decision correct | 100% | 100% | 76% |
| Fully correct | 100% | 38% | 24% |
| Right precedent found | 100% | 0% | 10% |
| Wrong precedent used | 0% | 0% | 3% |
| LLM tokens per claim | 332 | 332 | 2,892 |
Look at the first row: decision correctness is the same with and without memory. What memory adds is precedents and a changed checklist. We didn’t measure any gain in decisions. The RAG comparison is whole-system (different rules, inputs and prompts), so it doesn’t show a graph alone causing an accuracy gain. The expected answers come from a rule engine written inside the project, so this isn’t independent validation, and the fairer baseline (RAG plus the findings) didn’t run because we hit the free token limit.
When we say FalkorDB is essential here, we mean the architecture: one live store that coordinates the agents, holds the memory and answers over MCP. We’re not claiming it’s faster or more accurate, and a relational database could hold this data.
Limits and what’s next
One fictional plan, fixed lists of denial reasons and evidence, no PDFs or OCR, documents “declared” and never verified, local Docker only with no live deployment, no load test. Next: the fairer baseline, a test set written by someone outside the project, worker respawn, and more policies.
Timings on a desktop: filing a claim to review took 10.7 seconds, approving and recording an outcome to CURATED 3.7 seconds.
Try it
You need Docker. No API key is needed for the demo: the bundled claims and the investigator replay recorded model answers. A key (GROQ_API_KEY in a .env file) is only for classifying a brand-new notice that cites no policy section.
git clone https://github.com/Atheeq1821/claimbridgecd claimbridgedocker compose --profile app up -d --build# console: http://localhost:3100# FalkorDB Browser: http://localhost:3000File the MRI claim EV-T1-01 from the Docket and click “Show the path through the graph”.
Code: github.com/Atheeq1821/claimbridge. Demo video: youtu.be/dky01tNoJX0.