{"repo":"codexstar69/pi-lcm","free":true,"listed":false,"github":"https://github.com/codexstar69/pi-lcm","clone":"git clone https://github.com/codexstar69/pi-lcm.git","description":"Lossless Context Management for Pi. DAG-based summarization with full history recovery.","language":"TypeScript","stars":16,"topics":["ai-agent","compaction","context-management","conversation-memory","dag","developer-tools","fts5","llm","lossless","pi"],"license":"MIT","category":"ai-agents","readme_excerpt":"pi-lcm Lossless context management for Pi. Never lose a message again. Install · Quick Start · How It Works · Features · Configuration · Contributing --- Pi's default compaction throws away old messages when the context window fills up. A single flat summary replaces everything, and the original messages are gone forever. pi-lcm fixes this. Every message is stored permanently in SQLite. When compaction triggers, messages are summarized into a hierarchical DAG (directed acyclic graph) instead of a flat blob. The agent can search and drill back into any compressed node to recover the original detail. Install Quick Start Install the extension and start Pi. That's it. pi-lcm works automatically: 1. Every message is persisted to SQLite as it happens 2. When Pi triggers compaction, pi-lcm creates hierarchical DAG summaries instead of flat text 3. The agent gets three tools to recover detail from compressed history No configuration needed. Default settings work well for most sessions. How It Works The DAG grows logarithmically. With a condensation threshold of 6, you need 7 compaction cycles to get a D1 summary, 43 to get D2, 259 to get D3. A conversation can run for thousands of turns and the DAG stays compact. Prompt caching is preserved. The system prompt preamble is a static const string, identical every turn. Dynamic stats go in the compaction summary message (which only changes on compaction). Zero extra cache misses. Features Message Persistence - Every AgentMessage stored in","default_branch":null,"files":null,"tree":[],"storefront":"/r/codexstar69","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/codexstar69/pi-lcm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}