Inspiration

A car factory with no spare parts runs "just in time". When one truck is late, a plant stops building, customers wait, and dealers have to call them. One late truck becomes hundreds of broken promises. The warning never arrives as clean data. It arrives as an email, a chat, or a rumour. Sometimes one message hides two problems, and sometimes it is just noise.

We wanted a control tower that reads that mess, works out exactly who is affected, fixes it, and can prove what it did.

What it does

  • Reads 15 operational messages: plant outages, late shipments, quality holds, rumours and plain chatter.
  • Finds exactly who is affected by walking a knowledge graph of the whole company (16,979 records, 28,190 links).
  • Fixes it through the company's tools, following the policy handbook. It reschedules or transfers builds, notifies each dealer once, gives loaner cars by priority, holds faulty lots, stops sale of unsold cars and contacts owners.
  • Does nothing for noise and hands rumours to a human.
  • Explains every decision: a plain-English summary, what it did, what it deliberately did not do, and why, with the handbook rule next to each line.
  • Seals every decision on Solana.

Results on the 15 provided messages: 879 calls on the real enterprise server and 0 failed. 10 messages acted on, 3 ignored as noise, 2 handed to a human. 50 production orders moved, 192 dealer notices, 103 loaners, 236 unsold cars stopped, 320 owners contacted.

How we built it

The model reads. Code decides. A second reader checks. Solana remembers.

  1. Read. Every message is read twice, independently: by Gemini and by hand-written rules. If they agree, we act. If they disagree, a different Gemini model casts a tie-breaking vote. Two of three wins, otherwise a human decides.
  2. Resolve. Plain code turns "next Friday" into a real date and matches the message to exactly one shipment or lot.
  3. Trace. The knowledge graph (networkx) finds every affected build, customer order, dealer and car, and records the exact path and which branches it left out.
  4. Act. A coordinator and four specialists (Maggie, Pip, Cora, Dev and Quincy, each with a face in the app) build a plan. The plan is rehearsed on a copy of the company first and must have zero failures. Then it makes one call at a time, stops at the first failure, and reads every change back to check it.
  5. Prove. Each decision is fingerprinted, chained to the one before it, and written to Solana.

The web app has a live run, a state map, a ripple funnel, before-and-after production slots, an interactive Graph tab that replays each walk, a decision card for every message, and Wren, a chat guide that explains any screen.

Gemini:

  • Structured output: Gemini returns strict JSON: the kind of problem, the ids, the exact words it used, and date phrases copied word for word. It never calculates a date and never chooses an action.
  • Nothing is trusted blindly: the quote must be in the message, the ids must exist and match our alias table, the weekday must match the date, and code resolves the dates. A model-only outage is escalated.
  • A relay of three Gemini models (3.5 Flash, 3.1 Flash-Lite, Flash-Lite Latest) with automatic failover when a free-tier quota runs out, plus the tie-breaker vote between different Gemini models.
  • Cached for exact replay: the graded run needs no key or quota and is identical with Gemini on or off.
  • Efficient: 15 Gemini calls for the whole day, about 25.8k tokens in and 3.9k out.
  • Wren is a Gemini-powered, explain-only agent grounded in the live screen. It falls back to a local Qwen 2.5 7B model and then to a built-in lookup.

Solana:

  • A black box for the factory: every decision is hashed, chained to the previous one like a convoy, and written to Solana devnet as a Memo transaction.
  • We built the transaction by hand with PyNaCl, with no Solana SDK. Each seal costs 5,000 lamports, so sealing every decision is cheap.
  • 15 of 15 decisions are sealed on-chain, and every memo was read back from the network and matches our chain.
  • The app can verify any seal live and has a "Tamper, then check" button that secretly edits one action and shows the check turn red. Solana still holds the original.
  • Anyone can verify a decision on the Solana Explorer without trusting our logs.

Challenges

  • Free-tier limits (about 20 requests per model per day) led us to the model chain and the replay cache. We are under this limit!!! This makes our solution too cost effective.
  • Gemini 3 degrades at temperature 0, so we left it at default and got determinism from the cache instead.
  • A rule we got wrong. We first placed transferred orders after the disruption ended. After a professor's review we re-read the handbook (the "not before the disruption ends" condition only applies to the same plant), changed it to the earliest free slot at the receiving plant, re-ran everything and re-sealed it.
  • Solana without an SDK, and a devnet airdrop endpoint that refused us, so we funded the wallet from the public faucet.
  • A first UI with too much text. We redesigned it with flip cards, icons and five named characters.

What we learned

  1. Let the model read and let code decide. The moment Gemini stopped doing arithmetic and started quoting, it became reliable.
  2. When actions are expensive, precision beats recall. Asking a human is cheap, and moving the wrong production order is not.
  3. Make the system explain itself: a summary, a reason and a receipt on Solana.

What's next

Test on bigger, nastier message sets. Add a Pro model as a third voter. Build a screen where humans answer escalations and the tower then acts. Read live schedules before every transfer, and take live feeds, other languages, and voice and photo reports through Gemini multimodal.

Built With

Share this project:

Updates

Submission history