Local-first memory gateway for Pi

Stop paying the repo rediscovery tax.

pi-memctx gives Pi a durable Markdown memory layer: it recalls runbooks, architecture decisions, project context, and prior discoveries before the model starts burning tools and tokens.

66.9%faster in real-world stress run
95.0%fewer tool calls
80.8%fewer provider tokens
+25scored quality facts

Benchmark: same prompts, less rediscovery.

Real-world stress benchmark: 5 anonymized memory packs, 5 repeats per task, plain Pi baseline vs Pi with pi-memctx gateway. Names are anonymized as Pack 1–5; raw private pack data is not published.


ProfileRunsAvg latencyProvider tokens/taskTool calls/taskQualityTimeouts
Baseline25196.6s34,38527.2206/2551
Gateway2565.0s6,6141.36231/2550

Public synthetic release checkBaselineGatewayDelta
Average latency22.0s10.5s52.2% faster
Tool calls/task6.20.395.2% fewer
Visible tokens/task57132942.4% fewer
Quality63/11076/110+13 facts

How it works

1. Markdown memory

Your workspace knowledge lives as local Markdown: context, observations, runbooks, decisions, actions, and session snapshots.

2. Gateway retrieval

Before Pi answers, the extension detects the active pack, searches relevant notes with qmd or grep fallback, and injects a compact brief.

3. Bounded fallback

If memory is partial, Pi can still inspect source files, but with a budget to avoid runaway rediscovery.

Local. Inspectable. Open source.

No hosted memory vendor. No hidden database. No domain-specific hardcode. pi-memctx is designed for many languages, countries, teams, and stacks.

View on GitHub