Lemon Ledger
by t0m-a
README.md
# Lemon Ledger
**Model-agnostic persistent memory and context ledger for AI coding agents, built for Cloudflare Edge.**
*Website:* [lemonledger.dev](https://lemonledger.dev) | *Plan:* [Architecture & 4-Milestone Roadmap](./docs/ROADMAP.md) | *License:* Dual-licensed under Apache-2.0 or MIT
> **Status: Clean-Room Public Release in Progress (`v0.1` Scaffolding Next)**
>
> Lemon Ledger is currently being built as a clean-room, modular, model-agnostic public release. Core modules, declarative tenant configuration, multi-client setup guides, and evaluation suites are rolling out across four structured milestones (`v0.1` to `v0.4`). Watch or star this repository to follow the initial `v0.1` launch.
## High-Level Capabilities
Lemon Ledger provides a self-hosted **Model Context Protocol (MCP)** memory ledger running on **Cloudflare Workers** and **Durable Objects**, engineered for single-tenant data sovereignty, zero LLM vendor lock-in, and minimal operational overhead.
* **Model-Agnostic Multi-Agent Continuity:** Speaks standard Streamable HTTP MCP so coding assistants, IDE agents, and CLI tools (such as Claude, Cursor, Windsurf, Gemini, Codex, and OpenCode) share one persistent context layer. Includes a pluggable server-side LLM adapter (Cloudflare Workers AI by default, plus OpenAI-compatible and Anthropic providers).
* **Single-Tenant Edge Retrieval Engine:** Co-locates Durable Object SQLite + FTS5 (BM25), Cloudflare Vectorize (`bge-m3`), 1 to 2-hop Knowledge Graph traversal, Reciprocal Rank Fusion (RRF), Stage-2 cross-encoder reranking, and a token-budgeted U-shaped `<ledger_context>` compiler in one isolated tenant footprint.
* **Active Memory Governance & Auditability:** Combines 12 MCP tools, immutable Architectural Decision Records (ADRs), nocturnal sleep-cycle consolidation, semantic contradiction triage, outcome and evidence validation, before/after mutation diffs with rollback, and a 4-tab Cognitive Dashboard.
* **Modular Opt-In Extensions:** Keeps the default deployment fast and minimal while supporting opt-in Cloudflare Queues (with automatic synchronous fallback for heavy reindexing), an OAuth 2.1 / OIDC connector module for web clients, and a hybrid cloud-to-LAN federation module.
## 4-Milestone Rollout
See [docs/ROADMAP.md](./docs/ROADMAP.md) for the full module layout and detailed specification.
- [x] **Bootstrap:** Brand (`Lemon Ledger`), domain (`lemonledger.dev`), dual `Apache-2.0 / MIT` license, and clean-room repository initialization
- [ ] **`v0.1` Core Cognitive Engine:** `LemonLedgerDO` (SQLite FTS5 + Vectorize `bge-m3` + 1 to 2-hop KG + RRF + Cross-Encoder Reranker + `<ledger_context>`), all 12 MCP tools, contradiction triage, outcomes/validations, mutation diffs with rollback, nocturnal consolidation, pluggable LLM adapter, opt-in Queues (with sync fallback), synthetic evals, and multi-LLM setup guides
- [ ] **`v0.2` Cognitive Dashboard Module:** Modular 4-tab Cognitive Dashboard with dynamic client discovery and interactive triage, validation, and rollback views
- [ ] **`v0.3` OAuth 2.1 / OIDC Connector Module:** Opt-in OAuth 2.1 + PKCE and generic OIDC authentication module with multi-client redirect presets
- [ ] **`v0.4` Hybrid Cloud-to-LAN Federation Module:** Opt-in Tier-2 archive federation and generic local Markdown / vector sync template
## License
Lemon Ledger is dual-licensed under either of the following, at your option:
* [Apache License, Version 2.0](./LICENSE-APACHE)
* [MIT License](./LICENSE-MIT)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues