Inspiration

When a married couple splits up, they get courts, lawyers and mediators. When an unmarried couple or two roommates who share a lease split up, they get nothing. Just a fight over the couch.

That's a lot of people. 26 million Americans live in an unmarried-couple home (U.S. Census, 2020), and about half of couples who move in before marriage split up within five years (CDC). When it ends, someone has to sort out the lease, the security deposit, the furniture, the streaming accounts and the dog. Often the two people aren't on speaking terms.

The hardest part isn't the math. It's that nobody wants to say their real number first. If you admit you'd pay $1,600 to keep the apartment, you've just lost $1,600 worth of bargaining. We wanted a mediator you could tell the truth to, one that is built so it can't repeat what you said to your ex.

What it does

gudtrms ("good terms") is a breakup mediator that lives in iMessage. There's no app and no group chat.

  1. Start: Alex texts START and gives Sam's name and number.
  2. Invite: gudtrms sends Sam one fixed invite. Sam replies JOIN, or STOP to never hear from us again. There are no reminders, and Alex can't add text, so it can't be used to harass anyone.
  3. Private intake: each person chats with their own AI agent in their own thread. The agent learns what each thing is worth to them in dollars (the apartment, the couch, the dog living with them full-time or every other weekend), their deposit share, when they can move out, the most they could pay, and their dealbreakers.
  4. Negotiation: a neutral mediator proposes deals. Each person's advocate agent can only answer ACCEPT or REJECT, with no reasons.
  5. Stuck? Each person is privately asked if they'd relax something. Both are asked at the same time, so neither looks like the one holding things up.
  6. Agreement: both get the same written agreement and reply YES.
  • Alex keeps the apartment and the lease. Sam moves out by Nov 30.
  • Alex pays Sam $1,390: a $640 buyout plus Sam's $750 deposit share.
  • Sam keeps the couch and the TV.
  • Biscuit lives with Alex. Sam has Biscuit every other weekend.

How we built it

Six agents per case, and a connection between the sides that can only carry a yes or a no.

Agent One per What it is What it can do
Chat agent person Claude with tools Talks to its own person; writes only that person's rows
Advocate agent person Claude, plus code that can veto it Judges each proposal for its person: ACCEPT or REJECT
Mediator case Plain TypeScript Proposes deals; never sees payment caps or dealbreakers
Leak checker case Claude, yes/no Blocks any outgoing message that reveals the other side

Every AI call is built from one person's data only. No prompt ever holds both people's private numbers. That's also why the mediator is code and not an AI: an AI mediator would need both sides in one prompt.

The math: Knaster's procedure, extended to outcomes

Each item has a set of outcomes (Alex keeps it, Sam keeps it, both move out, the dog splits time with weekend visits...), and each person puts a private dollar value on each outcome. For every item, the mediator picks the outcome with the highest combined value:

$$o^*i = \arg\max{o} \big( v_A(i,o) + v_B(i,o) \big)$$

Each person's fair share is half of what they'd get if they kept everything. Their excess is what they actually got, by their own values, minus that share:

$$F_A = \tfrac{1}{2}\sum_i v_A^{\text{keep}}(i), \qquad E_A = W_A - F_A$$

A cash buyout evens it out, so both people end up the same amount above their fair share:

$$\text{buyout}_{A \to B} = \frac{E_A - E_B}{2}, \qquad \text{each ends } \frac{E_A + E_B}{2} \text{ above fair share}$$

In our demo, Alex's fair share is \$1,425 and Sam's is \$1,155. In round 2, \(E_A = 875\) and \(E_B = -405\), so Alex pays Sam a \$640 buyout and both end up exactly \$235 above their fair share. The security deposit is a separate line, because returning someone's own money isn't part of the fair-share math. The mediator ranks the possible deals by total value and proposes them in order, for at most 5 rounds.

Advocates: the AI decides, code has a veto

Each advocate makes one Claude call per proposal, and the two run in parallel. Code checks run first and overrule any accept unless:

  • the total payment is under the person's cap,
  • every dealbreaker is met,
  • the move-out date is inside their window,
  • they get at least their fair share.

The AI can still reject a deal that passes all four, but only by naming one of its person's own soft preferences (like "no handoffs with them"). If the call fails or times out, the code decides, so a negotiation never stalls.

The connection between the two sides

Only ACCEPT and REJECT can cross between the sides. To prove it, we built a rogue mode: one advocate is told to ask the other side for Alex's limit. It writes its own question, and the code blocks it and logs that it happened, without storing the content.

On top of that, every outgoing message passes a leak filter:

  1. any dollar amount or date that matches the other person's private values is blocked, except numbers that already crossed in a proposal;
  2. every AI-written reply also gets a Claude yes/no check. A blocked reply is rewritten once without specifics, then replaced with a safe line.

Stack

  • Messaging: Photon Spectrum (spectrum-ts) on iMessage, the only channel where gudtrms could text the ex first without days of carrier approval.
  • AI: Claude Sonnet 5.5 at low effort, behind a small provider interface.
  • Database: Neon Postgres, with a separate branch for each teammate.
  • Judge view: React, Vite and Framer Motion. It reads Neon live and shows three lanes: Alex's advocate, what crosses, and Sam's advocate. An X-ray toggle reveals what each agent knew.
  • Hosting: everything in Docker Compose, behind Caddy for HTTPS, on AWS Lightsail.

Cost: a full simulated case (25 messages, two negotiations) used about \$0.58 of Claude. A mediator bills \$3,000 to \$9,000.

Challenges we ran into

  • The leak filter blocked the agreement itself. The buyout and the move-out date come straight from both people's private numbers, so the filter blocked them. We added an exception for numbers that had already crossed in a proposal.
  • Letting an AI judge without letting it be wrong. An AI advocate could talk itself into a deal over its person's budget. The code veto and the fallback to code made it both smart and safe.
  • iMessage in practice. Our shared Photon line can only text numbers that are registered on the project and have texted in once (Target not allowed for this project). The invite now falls back to giving Alex a case code to pass on.
  • Speed. The extra AI leak check adds 1.5 to 2.5 seconds per reply, so we kept the check that matters most and made the slower one switchable.
  • Fair-division edge cases. Pets have five possible arrangements. A lease-break fee only exists if both people move out. A subscription can be worth a negative amount ("I'd pay to not be stuck with the internet contract").
  • "Yes" doesn't always mean yes. Someone answering their agent during intake isn't confirming the agreement. The router only treats a keyword as a command in the right state of the case.

Accomplishments that we're proud of

  • It works end to end on two real iPhones.
  • The demo is reproducible: round 1 is rejected because it's over Alex's private cap, and round 2 is accepted, with both people \$235 above their fair share.
  • The leak filter caught 4 out of 4 planted leaks and let 8 out of 8 normal messages through, and had 0 false blocks across two full simulated cases.
  • A judge view that proves what crossed, instead of asking you to trust us.
  • A full case costs under \$1.

What we learned

  • Put AI where judgment is needed and code where guarantees are needed. The agents are smart; the connection between the sides is deliberately simple.
  • Privacy is a design decision, not a promise. Building every AI call from one person's data made "your ex never sees this" true by design.
  • A 1940s fair-division method maps well onto modern breakups, once you treat outcomes ("the dog every other weekend") as the things being divided, not just objects.
  • The messaging channel shapes the product. We picked iMessage because it was the only channel that let gudtrms invite the ex directly.

What's next for gudtrms

  • A dedicated Photon line, so gudtrms can invite anyone directly.
  • Android support over SMS/RCS.
  • Households of three or more roommates.

gudtrms isn't legal advice, and it doesn't handle marriages, children or property you own together.

Built With

Share this project:

Updates

Submission history