# lim — Real-time Accounting Infrastructure for AI Agents > Accounting = fn(events) lim is a real-time accounting engine where AI agents process business events into journal entries automatically. Bank transactions, invoices, and expenses flow in continuously. A judgment engine (rules → history → AI → escalate) decides how to categorize each one. The system learns from corrections — within 6 months, 95% of transactions need zero human input. ## Documentation - [Introduction](https://docs.uselim.com/introduction): What lim is and how it works - [Quickstart](https://docs.uselim.com/quickstart): First journal entry in 5 minutes - [CLI Reference](https://docs.uselim.com/cli/overview): Command-line tool documentation - [API Reference](https://docs.uselim.com/api/overview): REST API documentation - [MCP Server](https://docs.uselim.com/agents/mcp-server): AI agent integration via MCP - [Judgment Engine](https://docs.uselim.com/agents/judgment-engine): How the learning engine works - [Japanese Accounting Glossary](https://docs.uselim.com/concepts/japanese-accounting): Terms and translations ## Quick Reference ### Install CLI ```bash npm install -g @lim-labs/lim ``` ### Add MCP Server (for AI agents) ```bash npx @lim-labs/lim mcp add ``` ### Key CLI Commands - `lim add "description"` — Natural language journal entry - `lim reports tb` — Trial balance - `lim reports pl` — Profit & loss - `lim reports bs` — Balance sheet - `lim journals list` — List journal entries - `lim accounts list --tree` — Chart of accounts ### MCP Resources (read) - `lim://company/{id}/trial-balance` — Trial balance - `lim://company/{id}/accounts` — Chart of accounts - `lim://company/{id}/journal-entries` — Journal entries - `lim://company/{id}/bank-transactions` — Bank transactions - `lim://company/{id}/alerts` — Active alerts ### MCP Tools (write) - `create_journal_entry` — Create a journal entry with debit/credit lines - `match_bank_transaction` — Match bank transaction to journal entry via judgment engine - `generate_scenario` — Generate scenario virtual entries - `apply_scenario` — Apply scenario to live ledger ### API Base URL ``` https://api.uselim.com/v1 ``` Authentication: OAuth 2.1 via WorkOS. All endpoints require Bearer token. ## Architecture ``` INGESTION → JUDGMENT → LEDGER → QUERY → OUTPUT Bank APIs Rules 95% Audit- Trial MCP Server Webhooks History 3% logged Balance REST API MCP Tools AI 1% Double- P&L Webhooks Manual Escalate entry Runway Dashboard ``` ## Japanese Accounting Support - Consumption tax (消費税): 10% standard, 8% reduced rate - Invoice System (インボイス制度): Qualified invoice compliance - e-Tax XML export - Electronic Bookkeeping Act (電子帳簿保存法) compliance - Withholding tax (源泉徴収税) calculation