CBCharlie Barmore
← All projects
LedgerBug logo

LedgerBug

An accounting control plane built for agents. One continuous set of double-entry books per client that people and AI agents operate through the same guarded engine, by API or MCP. Self-host or hosted.

Private beta For owner-operators and finance teams adopting AI agents, and the accountants who review their books

These screens are from the first LedgerBug, before the August 2026 rebuild, and show demo data only, never real client or user information. New screens are coming.

LedgerBug welcome screen: the simple way to keep clean books for everything you run

About

LedgerBug is open-source bookkeeping for humans and AI agents. It is a continuous double-entry ledger where software can read the books, propose entries, and act within explicit, human-defined policy. It keeps your books balanced while you and your agents do the work.

The first user is a business running one set of books with help from one or more agents, plus the accountants who review those books. Agents are a first-class actor, not a feature.

  • A continuous ledger. One chart and one journal per business, forever. Fiscal periods are lock windows, not containers. Retained earnings are computed, never posted.
  • Bank feeds and imports. Plaid sync is live with signed webhooks and encrypted tokens. CSV and OFX import is the portable default.
  • An agent control plane. Book-scoped credentials with four authority profiles: read only, prepare for review, trusted bookkeeper, and custom with amount caps, account allowlists, and date windows.
  • REST and MCP over one contract. Twenty-three versioned REST paths and a stdio MCP adapter that calls the same API, so both surfaces inherit identical authorization.
  • Human approval that fails closed. Approval re-reads the immutable snapshot, refuses if the facts changed, then writes entry, decision, receipt, and audit record in one transaction.

Status: rebuilt from scratch and cut over on 2026-08-25. The new app runs at app.ledgerbug.app in private beta behind a waitlist, self-hosted or hosted. The code is AGPL-3.0 and being prepared for a public repository, but it is not ready for public production use yet. The old waitlist page still stands at ledgerbug.app. There is no pricing.

Where it fits. LedgerClaw is the firm OS for accountants keeping many clients’ books. LedgerTB is the local desktop ledger. LedgerBug is the hosted, self-hostable book of record built for agents to operate. It shares no code with either.

How I built it

The first LedgerBug was a fork of LedgerClaw’s FastAPI engine. Rather than iterate, I rebuilt on a continuous-ledger model the old engine could not represent, and banned merging the legacy backend outright. The new repo starts from a single sanitized root commit on 2026-08-26, then eighty commits in a week.

  • Next.js 16, tRPC, Prisma, Postgres on Railway, with dual auth: Clerk for LedgerBug Cloud and NextAuth credentials for self-hosting, switched by one environment variable.
  • Credentials shown once, stored hashed. Only the SHA-256 digest is kept. Revocation takes effect on the next request.
  • No external agent can post. There is no approve or post scope. An execute grant only lets a credential run its own versioned proposal, with an audit reason. Opening balances, close approval, and period locks stay human-only.
  • Append-only at the database. Posted entries and lines cannot be updated or deleted at the Postgres boundary.
  • Guardrails written for agents. The repo’s CLAUDE.md and AGENTS.md encode the accounting invariants as an operating contract for Claude Code and other coding agents.

Stack

Next.js 16React 19TypeScripttRPC v11Prisma 7 + PostgresClerk / NextAuthPlaidClaude SonnetMCP SDKRailwayAGPL-3.0