Why
Someone owes you something: a friend with your $64, a gym that won't cancel, a landlord who ghosts, a teammate who hasn't done their slides. Chasing them is awkward, so you don't, and you lose the money or the time. Badger does the awkward part. It researches your position, writes each message for your approval, sends it from its own inbox, reads the reply, and escalates.
How it works
- Takes the case by chat (assistant-ui and a Mastra agent) or one click. It finds a company's contact email if you don't have it.
- Researches the company's policy and your rights with Exa, keeping only facts that come with an exact quote and a source URL.
- Plans a short ladder of well-spaced nudges that get firmer, never rude.
- Drafts each message and waits for your approval. You can edit it. Badger sends from its own AgentMail inbox and CCs you.
- Waits, durably. The approval gate is a Mastra workflow that suspends and is snapshotted to Postgres, so it survives restarts and deploys.
- Reads replies.
- A promise pushes the clock out.
- A refusal makes the next nudge firmer.
- A question for you becomes a task.
- A "use our web form" reply becomes a step where Badger fills in the form in a cloud browser (Kernel) and keeps a screenshot.
- A "resolved" claim asks you to confirm before the case closes.
- Nags you, too. Leave a draft unapproved and Badger reminds you.
Where it lives in the code:
src/workflows.ts and src/steps.ts: the prepare -> gate -> deliver workflow and the next wake-up.
src/engine.ts: case lifecycle, scheduler tick, approvals, reply handling.
src/brain.ts: agents, prompts and the plan sanitizer.
src/mail.ts: AgentMail client. Replies arrive by signed webhook, with a reconcile poll as backup so none is missed.
Try the demo
Open the live demo (no sign-up) and press Watch a 60-second demo, or pick a story and approve each draft yourself.
- Pick a story: a flaky roommate, or a gym that won't let you cancel. The emails are real AgentMail traffic. The other side is a fictional character who replies in seconds.
- You stay in charge. Badger writes every message and stops for your OK. Edit, send, or skip.
- Or press Fast-forward. It skips the waiting and approves for you, so the whole timeline plays out in about a minute.
The sandbox clock is 1 day = 20 s. Real cases run on a real clock, with days between nudges.
Rosters
Teachers, coaches, landlords and club treasurers have twenty small debts, not one. A group is a roster: you log what each person owes (Sam, lesson, $45) and Badger runs the rest.
- One running balance per person. Log lessons from the web or by text.
- Badger opens a collection case automatically when something is overdue, after the grace period you choose, and sends gentle reminders on your schedule. More lessons logged? The open case updates instead of duplicating.
- Mark someone paid and it stops. Part payments are applied oldest-first.
- Standing approval is opt-in. By default every reminder waits for your tap. Turn on "send gentle reminders without asking me" per group for hands-off sending. Anything firmer, or any change of channel, still asks.
- Built for real relationships: use a parent's email for under-18s, you confirm your contacts expect reminders before a group can send anything, no recipient gets more than 2 emails a day, and a STOP reply ends it for good.
The home page has a Try the teacher demo button.
Chat apps
Telegram, Slack and WhatsApp work the same way. Say Sam had a lesson today, $45, Lee paid, or who owes me? and Badger answers from your ledger. It also messages you when it needs a decision, and Telegram gets Approve and Skip buttons. Each app switches on when you add its credentials. Setup guides are in docs/CHANNELS.md.
Safety is enforced in code
An agent that emails strangers is also what a spam or harassment tool looks like, so every limit lives in src/safety.ts and src/brain.ts, not in a prompt.
- The first email, every escalation, every form, and any formal final notice need your approval. Autopilot can only relax routine follow-ups.
- Every message discloses that it comes from an AI assistant acting for you, with a case reference and a STOP instruction. A STOP reply ends the case and suppresses that address for every user.
- Caps: at most 3 emails to a person (3 or more days apart, never above "firm") and 8 to an organization per case, 12 per user per day (40 for roster groups), 2 per recipient per day, and a global kill switch (
SENDING_ENABLED).
- Recipients: no system addresses, no other AgentMail inboxes, no sandbox characters outside the demo, and the suppression list is honored.
- Every outbound draft is checked for threats, claims of legal authority and secrets, with a repair pass and a plain template as the last resort.
- The plan is clamped in code. The model proposes steps.
sanitizePlan enforces step counts, spacing, and that escalation goes only to an address Exa found.
- Forms are filled only on the counterparty's own domain, over https, and only plain text fields.
- Text from replies is classified and never obeyed.
- Badger is not legal advice and says so. It cites only what it can quote.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗