Inspiration
We are two Turkish students who moved to Berkeley for university. Even before landing in the US, our lives were consumed by F-1 paperwork, IRS forms, and official letters, all written with the assumption that we already understood the rules. Once someone finally explained them, the regulations made sense; most of the time, that "someone" was Claude. For us, the hardest part wasn't the compliance itself, but the language it was written in.
Then we realized this isn't just an immigrant challenge. Anyone running a small business owner (SBO), from a taqueria or nail salon to a neighborhood corner store, has to navigate an extraordinarily complex maze of compliance regulations. They face countless permits, licenses, and an overwhelming volume of IRS forms and notices. These administrative burdens don't just consume precious time; they often lead to unintentional fines that can shut down dreams before they even have a chance to take off.
Most business owners want to follow the rules, but the system makes it needlessly hard. That’s why we built Ledger: an AI agent that executes US compliance end-to-end. Ledger reads every notice, tracks every deadline, and manages all necessary follow-ups, so entrepreneurs can stop worrying about paperwork and focus on building their dreams.
What Ledger does
Ledger is an AI compliance agent for small business owners. It reads what agencies send you, works out what it means for your business, and does the follow-up work with your approval, in the language you think in.
Understands your compliance paperwork. Send a photo or PDF through the web app or Telegram. Ledger pulls out who sent it, what it asks of you, the amount, the deadline and the key identifiers, then explains it in plain language in your language. Documents it can't help with are flagged honestly, with a recommendation to see a professional. Sensitive numbers (SSNs, EINs, account numbers) are masked to the last four digits, and your uploads are visible only to your account.
Verifies before anything else happens. Every document is checked against trusted sources before Ledger recommends an action, so scams get stopped early. Suspicious documents get a red badge, the reasons, and the agency's real contact details, and Ledger never offers to pay them.
Connects to your financial accounts. Ledger reads your balance and transaction history and compares them with what a notice claims. You aren't told to pay something you've already paid, and its recommendations fit what you can afford.
Acts for you, with your approval. Ledger proposes concrete next steps and carries them out only after you approve. Anything that moves money needs your tap and a confirmation. Steps only you can do, like a phone call or a signature, become tasks with a ready-made script. The server enforces what needs approval, never the AI.
Remembers every case. Related documents join one case over time, so each new letter is read in context, not in isolation.
Tracks every deadline and follows up. Deadlines come from your letters, from the tax calendar, and from your Google Calendar (compliance-related events only, filtered on our side and never sent to the AI). Ledger keeps nudging until you act, then stops.
Works where you already are, in your language. Use the web app or a Telegram bot. The app, Ledger's replies, notifications and the bot all follow your language setting.
How we built it
- Frontend: Next.js 16, Tailwind and shadcn/ui. Hosted on Vercel.
- Backend: Convex for the database, file storage, scheduled jobs, crons, rate limits and authentication
- Agent: Claude Sonnet 5.5 through the Vercel AI SDK and the Convex Agent component. It runs with six tools:
read_document,verify_sender,load_playbook,check_bank_history,propose_actionandget_case_history. Its instructions say to investigate before speaking: verify the sender, load the official playbook, check the bank, then explain and propose. It never pays or messages anyone without the owner's approval. - Extraction: Claude reads photos and PDFs and returns structured output that matches a typed Zod schema
- Integrations:
- the Telegram Bot API
- Google Calendar (read-only)
- the Capital One Nessie API for simulated bank account (payments, transaction history)
- Two people, one backend: we split into a backend/agent track and a UI/actions track. Each step started with a written contract table of function names and shapes, and stubs merged first, so we could build in parallel without stepping on each other.
Challenges we ran into
- Structured-output limits. Our extraction schema hit the Claude API's complexity limits twice. The first time, optional fields nested inside an optional object returned "Schema is too complex". Later, five nullable case-key fields returned "The compiled grammar is too large", and every extraction failed. We flattened the schema: those fields became plain strings, left empty when the letter doesn't print them. A small converter turns empty or null values back into missing fields before they're stored.
- The agent failed on every second message. Extended-thinking blocks from earlier turns were sent back to the API, which rejected them because their signatures were "bound to a different conversation". We now strip reasoning from the chat history, and each turn keeps only its own.
- Time travel. Deadlines are the whole product, so we built a demo clock that skips ahead to show reminders and overdue notices. That broke dates everywhere else: case history mixed real timestamps with demo-clock ones. Every action and event now records the clock offset in effect when it was written. The agent is also told today's date, so it never relies on its own sense of what day it is.
- A rulebook that adapts across letter types. Ledger's rules are declarative and separate from the agent loop. Each document family is a schema-validated playbook: what the notice means, response options mapped to approval-gated action types, escalation triggers, a bilingual glossary and source links. Extraction uses a typed schema with per-field confidence, so supporting a new letter type means adding a playbook, not rewriting the agent. Letters that match no known type fall back to
UNKNOWNand are escalated to a professional, never forced into the closest category. Sender verification returns a three-state verdict (verified, suspicious, unverified) from normalized phones, domains and payment-method red flags, so agencies outside the official contact list are marked unverified and never guessed at. - Six languages, legal content. Explaining IRS notices in Spanish, Chinese, Vietnamese, Korean and Turkish meant writing glossaries for each playbook, spelling out dates in words in each language, and making sure the agent switches language without apologizing.
- Duplicate data from concurrent syncs. Two overlapping syncs could both treat the same items as new and save them twice. We moved the "already seen?" check inside the same database transaction as the write.
- Speed. Reading a full-page photo of a letter takes 10–20 seconds, and replies arrive whole rather than streaming. The agent's step-by-step activity feed makes the wait feel shorter, but streaming is still on our list.
- Two people, one production. Early on, every merge to
maindeployed automatically to the production site we both shared. We switched to deploying by hand, so a half-finished merge never reaches the demo.
Accomplishments that we're proud of
- Case memory: the second letter knows about the first, so Ledger can tell you what's already been paid and said.
- Nothing moves money without a tap: every step the agent proposes has an autonomy level: automatic, one-tap approval, or owner-only. Payments and outside contact always wait for the owner's approval, and a double tap can never pay twice.
- Reminders that escalate on their own: if a letter is waiting on the owner, Ledger follows up on Telegram in three levels (a friendly note, a direct reminder, then a last call the day before the deadline), with at most one message a day.
- One agent, end to end: Claude runs the whole investigation through six tools, Capital One's Nessie API powers the "already paid" check, and Convex keeps every case, reminder and audit step in sync.
- It's live: real accounts, a working Telegram bot and push notifications, in six languages. Not a mockup.
- Every channel shares one brain: a photo uploaded in the app and a letter sent to the Telegram bot go through the same intake and the same agent. Several photos sent together are read as pages of one letter.
- One deadline list from three sources: open cases, real IRS due dates (Form 941 and 1099-NEC, moved to the next business day around weekends and holidays) and compliance events from the owner's Google Calendar all show up in one place.
- Built to be safe with money and data: the agent never asks for a full SSN, EIN or bank account number. It sends audits and lawsuits to a licensed professional instead of guessing, and rate limits plus a daily cap on agent runs keep API costs bounded.
- Tested against real-looking letters: a fixture harness checks extraction against sample notices (CP14, CP504, 972CG, health inspections), and all 41 checks pass.
What we learned
- Put the guardrails in code. Prompts describe behavior; server-side checks guarantee it. Every time we moved a rule out of the prompt and into code, the product got safer and the replies got simpler.
- Make the agent check before it talks. A letter's own phone numbers and websites can't be trusted. Ledger compares the sender with official contacts, loads the playbook for that notice, and looks at the bank before it says anything. That order makes scam warnings and next steps far more reliable than asking the model to "be careful."
- Knowing when to stop is a feature. If a letter is unknown or extraction confidence is under 0.6, Ledger asks for a clearer photo and doesn't open a case. Saying "I can't help with this yet, ask a professional" earns more trust than a confident guess about someone's taxes.
- Dates are harder than they look. Deadlines, reinspection dates, nudges and a demo clock all have to agree. A letter that joins an existing case has to restart its reminder schedule, and overdue cases shouldn't get nudges at all. Most of our late bug fixes involved dates rather than the model.
- Shipping to real users is mostly everything around the AI: authentication, permissions, deployment, and making sure one person can never see another person's letters.
- Structured outputs are powerful but have limits. Schema shape matters, because optional and nullable fields add up fast. A nested schema with many optional fields hit the API's complexity limit, so we made those fields nullable and dropped the nulls before storing.
What's next for Ledger
Today Ledger answers what the government sends you. Next, we want it to help you stay legal before the letters arrive, and to protect you from everyone else who wants your money or your signature.
- Open: get legal, and stay legal. Ledger will ask a few questions about your business (city, whether you sell food, whether you have employees) and build a permit and license checklist with an official source link for each item. It will then agentically walk you through each application step by step.
- Shield: check anything you're asked to sign or pay. Ledger will summarize loans, merchant cash advances, leases and vendor contracts in your language. It will flag risky terms like daily withdrawals, personal guarantees, auto-renewals and large exit fees, and calculate the real cost of a loan (what you get versus what you pay back). It will also suggest questions to ask and draft the message in English. For ADA demand letters, it will explain your rights and push you to call a lawyer quickly. For invoices, it will block a changed bank account or a duplicate payment and ask you first.
- Responses, drafted for you. For letters that need a reply, Ledger will write the response to the agency as a PDF or Word document, with proof attached (such as a matching bank payment), so you review and sign instead of starting from a blank page.
- Guided help on agency websites. Ledger will be able to see your computer’s screen and walk you through an agency's website in real time, telling you what to click and what to type on the pages that only you can complete.
- Delegation across your team. Ledger will split a long list of violations, like a health inspection report, into tasks, assign each to the right employee in their own language, and follow up with gentle nudges until each one is done. We started on Telegram and plan to add WhatsApp, where many owners already are.
- More agencies and notice types: state tax boards (starting with California's CDTFA and EDD), more city permit and licensing notices, and more IRS notice types.
- Community partners: work with immigrant business associations, Small Business Development Centers and community organizations, which already have the trust of the owners who need this most.
Built With
- anthropic-claude-api
- base-ui
- capital-one-nessie-api
- convex
- convex-agent
- convex-auth
- css
- github
- google-calendar-api
- google-oauth
- javascript
- libphonenumber-js
- next.js
- react
- shadcn/ui
- tailwind-css
- telegram-bot-api
- typescript
- vercel
- vercel-ai-sdk
- web-push
- zod

Log in or sign up for Devpost to join the conversation.