Inspiration

All around us, we watched people quietly lose money they were legally owed — a four-hour flight delay worth hundreds in compensation, a faulty appliance the shop refused to replace, a subscription that kept charging after it was cancelled. The striking thing was that the law was almost always on their side. What beat them wasn't the law; it was the process: one email, one polite "no," and they gave up — not knowing that the reply was a fob-off, that the company was often legally obliged to pay the moment they sent it, or what the next step even was.

We realized the gap isn't legal knowledge. It's persistence, and knowing the ladder. So we asked: what if an agent handled the part humans quit — the calm, unbothered escalation — while never once guessing your rights?

What it does

Redress turns a grievance into a persistent, human-controlled escalation campaign across seven verifiable legal regimes: EU261 and UK261 flight delays and cancellations, Singapore's Lemon Law for faulty goods, card-scheme chargebacks, and UK late-delivery refunds.

You describe what went wrong in plain English. Redress:

  1. Extracts the facts and lets you confirm them (you're the checkpoint).
  2. Rules on eligibility deterministically, injecting the exact statutory citation.
  3. Drafts the correspondence and walks it up a four-rung ladder, escalating in tone(flight delays):
    • R1 — customer-service request (warm)
    • R2 — formal complaint naming the statute (firm)
    • R3 — letter before action, 14-day deadline (cold)
    • R4 — external filing to an ombudsman/regulator (procedural)
  4. Reads the company's reply, recognizes a fob-off or a sneaky "extraordinary circumstances" excuse, and rebuts it specifically before advancing.
  5. Keeps a timestamped, immutable, downloadable case file that is the evidence package.

Nothing is ever sent without your approval, and every citation traces to a versioned rule — not a model output.

How we built it

Built with codex, The architectural thesis is an inversion: a language model never decides whether you have a case.

  • Deterministic rights engines — each regime is a versioned YAML rule table (rules/*.yaml) evaluated by pure Python with a full test suite. For EU261, distance is a real great-circle computation between airports(codex calculated it for me) and compensation is a pure lookup, not a judgement.
  • The LLM (GPT-5.6), tightly boxed — it only does two language jobs behind strict structured-output schemas: extracting facts from unstructured text, and classifying a company's reply. It cannot infer a right, invent a citation, or assert an entitlement.
  • An event-sourced state machine in SQLite drives R1→R4 with an immutable, timestamped event log.
  • Citation-safe drafting assembles letters from templates, injecting the statute from the rule table and a deterministic rebuttal keyed on the reply's category.
  • Stack: FastAPI + server-rendered HTML (aurora/3D landing, no build step), SQLite, Pydantic, PyYAML, OpenAI Responses API, deployed on Vercel with a live model. 179 tests, run hermetically.

Challenges we ran into

  • Structured outputs hate Decimal. Money is Decimal everywhere, but OpenAI's structured outputs rejected our schemas — Pydantic renders Decimal as a regex with lookaround, which isn't supported. We built float-based boundary schemas that convert back to Decimal the instant they cross into the domain.
  • The model can't do geometry. GPT-5.6 reads "Frankfurt to Athens" but can't compute 1,816 km, so we built a hybrid: the LLM reads language, then geo backfills distance and EU-membership from known airports.
  • SQLite on serverless. Vercel's filesystem is read-only except /tmp, so persistence is per-container — we scoped the hosted build honestly as a live demo.
  • Honesty as a feature. We made model failures visible, then made "no case" genuinely useful — naming the exclusion and pointing to the route that might fit — instead of a dead end.
  • Rebutting without inventing law. Making R2/R3 answer a company's specific excuse deterministically (an inherent technical fault is not an "extraordinary circumstance") took care to stay citation-safe.

Accomplishments that we're proud of

  • Six regimes where correctness is verifiable, each with a tested rule engine — and a load-bearing refusal (unsupported claim type) for everything else.
  • A working R1→R4 ladder that reads replies, rebuts the actual excuse, and reaches a filable letter before action.
  • We never invent a contact address — the email drafter only points to verified official channels.
  • The credibility inversion actually holds: turning the LLM off changes nothing about eligibility, amounts, or citations.
  • Built completely with codex, it is shipped it live with real AI and a full test suite. ## What we learned

We learned about different rule sources, their availbility in regions and how to use them in the project. We also learnt - The right shape for agentic AI in high-stakes domains is deterministic where correctness matters, model-driven where language matters, human-approved at every irreversible step.

  • Trust is a UX problem as much as an engineering one: showing why you're ineligible, and what the rules said, matters as much as the ruling. Finally, we learnt to better comunicate with gpt 5.6, and to better use it more efficiently. ## What's next for Redress A dedicated cancelled-subscription / unwanted recurring-charge flow, kept separate from fraud chargebacks.
  • Real transmission: outbound email + inbound reply capture, preserving the human-approval gate.
  • Durable persistence (managed Postgres/Turso) so cases and 14-day deadline sweeps survive across sessions and auto-escalate.
  • More verifiable regimes and jurisdictions (US/EU subscription law, more countries' air-passenger rules), AND MORE!!.

Built With

  • ai
  • codex
  • consumer
  • css3
  • engine
  • fastapi
  • genai
  • gpt
  • html5
  • legaltech
  • pydantic
  • python
  • restapi
  • right
  • rule
  • sqlite
  • uvicorn
  • validation
  • vercel
  • webapp
Share this project:

Updates