> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uselim.com/llms.txt
> Use this file to discover all available pages before exploring further.

# What is lim?

> Real-time accounting infrastructure for AI agents. Accounting = fn(events).

# lim — Accounting as a Function

lim is a real-time accounting engine where **AI agents — not humans — process business events into journal entries automatically**.

Bank transactions, invoices, and expenses flow in continuously. A judgment engine decides how to categorize each one. The system learns from human corrections. **Within 6 months, 95% of transactions need zero human input.**

## How It Works

<Steps>
  <Step title="Events flow in continuously">
    Bank transactions via API, invoices via webhook, expenses via MCP tool calls from AI agents.
    Each event is normalized to a common format.
  </Step>

  <Step title="The Judgment Engine decides">
    Three steps, in order: - **Rule Match** — deterministic rules match patterns (e.g., "AWS monthly
    bill → Server Costs"). Zero AI cost. - **History Match** — SQL lookup of past similar
    transactions. - **AI Inference** — only called when rules and history can't resolve. -
    **Escalate** — low-confidence items go to a human for confirmation.
  </Step>

  <Step title="The system learns">
    When a human confirms an AI suggestion, it becomes a rule. After 3 confirmations, the rule
    auto-posts. AI costs approach zero over time.
  </Step>

  <Step title="Financial data is always live">
    Trial balance, P\&L, cash runway — all computed from the journal in real-time. Every change is
    audit-logged.
  </Step>
</Steps>

## Architecture

```
┌─────────────────────────────────────────────────────┐
│  Layer 1: INGESTION                                  │
│  Bank APIs │ Webhooks │ MCP Tools │ Manual Entry     │
├─────────────────────────────────────────────────────┤
│  Layer 2: JUDGMENT                                   │
│  Rules (95%) → History (3%) → AI (1%) → Escalate    │
├─────────────────────────────────────────────────────┤
│  Layer 3: LEDGER (Audit-Logged)                      │
│  Journal Entries │ Debit=Credit │ Full Change History │
├─────────────────────────────────────────────────────┤
│  Layer 4: QUERY                                      │
│  Trial Balance │ P&L │ Cash Runway │ Scenario Diff   │
├─────────────────────────────────────────────────────┤
│  Layer 5: OUTPUT                                     │
│  MCP Server │ REST API │ Webhooks │ Dashboard        │
└─────────────────────────────────────────────────────┘
```

## Key Features

<CardGroup cols={2}>
  <Card title="Natural Language Input" icon="message">
    Describe transactions in plain language. lim handles the accounting.
  </Card>

  <Card title="AI Agent Protocol" icon="robot">
    Native MCP server. Any AI agent that speaks MCP can do accounting through lim.
  </Card>

  <Card title="Learning Engine" icon="brain">
    Rules → History → AI → Escalate. The system learns your patterns over time.
  </Card>

  <Card title="Full Financial Reports" icon="chart-line">
    Trial Balance, P\&L, Balance Sheet, Cash Flow, Shareholders' Equity — all real-time.
  </Card>

  <Card title="Japanese Compliance" icon="file-check">
    Consumption tax, e-Tax XML export, Invoice System (インボイス制度), Electronic Bookkeeping Act
    (電帳法).
  </Card>

  <Card title="Scenario Analysis" icon="code-branch">
    "What if we hire 2 engineers?" — virtual journal entries show the impact on runway instantly.
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Your first journal entry in 5 minutes.
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/cli/overview">
    Full command reference for the lim CLI.
  </Card>

  <Card title="API Reference" icon="code" href="/api/overview">
    REST API documentation with interactive playground.
  </Card>

  <Card title="AI Agents" icon="robot" href="/agents/overview">
    Set up MCP server and Claude Code integration.
  </Card>
</CardGroup>
