Inspiration

Most of us know the habit we want — walk more, sleep earlier, cut sugar — but motivation fades within a week. Two things reliably help: having something to lose, and having someone who notices. Kept combines both, and uses AI to do the daily checking so your friend doesn't have to.

What it does

  • Make a pact: pick a habit, a length (7–30 days), a stake and a buddy. Choose a payout model: Buddy bonus (your buddy adds 50% if you succeed), Mutual pot (both stake; the one who slips pays the one who keeps it), or Charity if I slip.
  • Stake with PayPal: the stake is paid through PayPal Checkout (Orders v2, sandbox) and held until the pact ends.
  • Daily proof: upload a photo. Claude's vision model checks it against the habit's rule and returns a verdict, confidence and a short note. Your buddy then approves or rejects the day.
  • AI settlement: when the pact ends, a Claude agent reads the record, decides the outcome and sends money with PayPal Payouts. Every payout is checked on the server against the pact rules, so the agent can't pay the wrong person or the wrong amount.
  • Under the hood panel: shows every PayPal and Claude call live.

How we built it

  • Next.js 16 + TypeScript for UI and API in one service, PostgreSQL for data, hosted on Render (free web service + database via a Blueprint).
  • PayPal sandbox: JS SDK buttons, Orders v2 create/capture, and the Payouts API.
  • Claude API: vision for proof checks, and a tool-use agent (get_pact_record, send_payout, finalize_pact) for settlement.
  • GitHub Actions runs a daily job that settles pacts whose end date has passed.
  • If PayPal or Claude is unavailable, the app falls back to clearly labelled simulated mode instead of breaking.

Challenges we ran into

  • Letting an AI move money safely. The agent proposes payouts; the server computes what the rules allow and rejects anything else, and the agent sees the rejection and corrects itself.
  • Getting structured answers from the vision model. We moved from forcing a tool call to requesting one, with a plain-JSON fallback, so a verdict always comes back.
  • Sandbox logins: PayPal won't let a merchant pay itself, so testing needs the separate sandbox personal account.

Accomplishments that we're proud of

A full money loop — stake in, daily AI-checked proof, buddy review, AI-decided payout out — working end to end on free hosting, with guardrails on every payout.

What we learned

AI is great at judging messy evidence like photos, but money movement needs hard rules. Pairing an AI agent with a strict server-side policy gave us both flexibility and safety.

What's next for Kept

Automatic proof from fitness and sleep APIs, group pacts, recurring challenges, and charity partners for the "slip" payouts. Note: my voice was not working with screen recording and ran out of time!!!

Built With

Share this project:

Updates

Submission history