Open sourceApache 2.0Self-hosted

Books your agents can write to, and can't break.

OpenLedger is an open-source double-entry ledger with an MCP server. Every entry must balance, corrections are reversals instead of edits, and each write is audited in the same database transaction.

Explore the demoSample books, no sign-up

The explorer is part of a deployment Attri runs for you. The MCP server and the SQLite ledger are the open-source repo.

Ask your books what your agents did.

Nobody reviews every entry an agent posts. With OpenLedger, the books themselves answer these three questions.

Are the books balanced?

Always. The server refuses any entry whose debits and credits differ, so the totals can't drift apart.

What happens when an agent gets it wrong?

The server refuses the entry and returns the reason. Nothing is written until the entry balances.

What was corrected, and why?

Mistakes are reversed, not edited. The original stays on the record beside a reversal that gives the reason.

How it works

Your agent decides what to post. OpenLedger decides whether it balances.

Agent requests

  • Post a $250 cash sale post_transaction · 2 lines
  • Pay the April rent post_transaction · 2 lines
  • Move $500 to savings transfer_funds
  • Reverse the duplicate reverse_transaction · reason required
  • Bank feeds Not built yet · Tell us you need it

OpenLedger

Checks every write

  • Two or more lines
  • Debits equal credits
  • Whole cents
  • Audit row, same transaction

Debits − credits = $0.00

post_transaction · Cash sale · $250.00

Read back as

  • Trial balance Debits and credits per account
  • Profit and loss For any date range
  • Balance sheet Assets = liabilities + equity
  • Audit log Every change, append-only

Claude reads them through the same 15 MCP tools it writes with. Read-only SQL covers anything else.

  1. 01

    Post

    Your agent sends a journal entry: a date, a description and at least two lines, with amounts in whole cents.

  2. 02

    Check

    The server checks that the entry balances and every account exists and is open. If a rule fails, it returns the reason and writes nothing.

  3. 03

    Record

    The entry and its audit row commit in one database transaction. A mistake is fixed later with a reversal, never an edit.

Compared with a spreadsheet

A spreadsheet takes any number. OpenLedger checks it first.

Bookkeeping tools were built for people clicking through forms. When an agent writes the books, the rules have to hold at the moment of the write.

A spreadsheet or plain table

Rows your agent can edit

Accepts any rowNothing checks that the money came from somewhere.
Stores decimalsFloating-point amounts pick up fractions of a cent that never add back up.
Edits overwriteFixing a number erases the wrong one, and the reason it was wrong.
Changes go unrecordedWho changed a figure, and when, isn't part of the row.
OpenLedgerDouble-entry, checked on write
Refuses an unbalanced entryDebits must equal credits across two or more lines, or nothing is written.
Stores whole centsEvery amount is an integer number of cents.
Corrections are reversalsThe original stays. A reversal flips every line and points back to it.
Every change is auditedAn audit row commits in the same database transaction as the change.

Read the four rules in the OpenLedger README

Use cases

For any team letting agents touch the books. Wherever a number might be questioned later.

Sample: a brand studio's books

Agents post the entries. A person reviews the record.

Bills, invoices and payroll posted by agents, each one balanced on write and audited, with mistakes corrected as reversals your controller can trace.

  • Every agent entry balanced before it's saved
  • Corrections kept beside the original
  • Trial balance, profit and loss and balance sheet on request

Enterprise

Run it yourself, or let Attri run it. Either way, the books stay in your environment.

Self-hosted

Free and open source

Run OpenLedger on your own machine and connect your agents to it today.

Hosted by you

  • Full source code under Apache 2.0
  • One SQLite file and one Python process
  • Community support on GitHub
View on GitHub

Managed by Attri

Built into your environment

The ledger rules are open source. Attri runs OpenLedger inside your infrastructure and builds what your finance team needs around it.

In your environment, run by Attri

  • Access control and approval rules for agent writes
  • Bank reconciliation and connectors to your systems
  • Support from the team that builds OpenLedger
Talk to AttriSOC 2 Type II, stated by AttriHIPAA BAA available
  • Balanced on write

    An entry is saved only if it has two or more lines and its debits equal its credits.

  • Whole cents

    Every amount is an integer number of cents. There is no floating-point money.

  • Reversals, not edits

    Posted entries never change. A reversal flips every line and points back to the original.

  • Audited in the same transaction

    Each change and its audit row commit together, so the log can't fall behind.

Open source

Read the code. Run it today. Apache 2.0, running in minutes.

$ git clone https://github.com/Attri-Inc/open-ledger.git
$ cd open-ledger
$ python3 -m venv .venv && source .venv/bin/activate
$ pip install -r requirements.txt
$ python scripts/seed.py
$ python run_mcp.py
# MCP server over stdio, sample books in data/openledger.db
  • 15MCP tools for Claude
  • SQLiteOne file, one Python process
  • Apache 2.0License

Seeds sample books with one command. Access control, approval rules and bank reconciliation come with an Attri deployment.

Read the README on GitHub

Open source by Attri

Part of Open Tooling. Standalone projects, all Apache 2.0.

See every tool at opentooling.ai
  • AccountingPython

    OpenLedger

    Books your agents can write to, and can't break. Every posting balances; corrections are reversals.

    MCP tools
    15
    local-first
    SQLite
    You're hereGitHub
  • AI observabilityPython

    OpenWatch

    Traces every AI session, tool call and dollar to the person behind it.

    MCP tools
    14
    REST endpoints
    23
  • CRM memoryTypeScript

    OpenCRM

    CRM memory for AI agents where every fact links to the email or transcript behind it.

    MCP tools
    27
    self-hosted
    SQLite
  • PeoplePython

    OpenHR

    HR records your agents can update, and can't bend. Leave can't be overdrawn, and every asset has one holder.

    MCP tools
    31
    local-first
    SQLite
  • OperationsPython

    OpenERP

    Purchasing, stock and sales on a double-entry ledger. A bill that doesn't match its order and receipt is blocked.

    MCP tools
    47
    local-first
    SQLite

Let your agents keep the books. Keep the rules on the server.

Run OpenLedger on sample books in minutes, or have Attri deploy it inside your environment with access control and approval rules.