I’d like to share Luthn, an open-source project for sharing project memory between AI agents.
Luthn connects to Codex and Claude Code through their hooks and MCP. After a turn, it collects a bounded capsule of the agent’s final response, classifies and redacts it, and makes permitted context available for later tasks. When a new task starts, the agent can retrieve a small context pack.
The project runs on infrastructure you manage, using Docker and PostgreSQL. It also includes a local operator console for reviewing sensitive-access requests. The goal is to let agents reuse project context while keeping private source material outside their default context.
@jakob0012 Your approach to classifying and redacting the ‘bounded capsule’ before storage targets the core risk of context leakage. Relying on an LLM for redaction introduces a recursive trust loop: the classifier might hallucinate sensitive tokens or strip valid context. A deterministic rule engine or a lightweight classifier trained on your specific schema offers higher reliability for the redaction layer. The shared memory layer only functions if the retrieval mechanism strictly enforces schema validation before injection, blocking prompt injection attacks that exploit the ‘context pack’. Self-hosting secures data sovereignty, but the architectural decision that truly dictates performance is how you manage classification latency against the agent’s turn time. Hardcoded schema constraints often outperform probabilistic redaction in safety-critical codebases.
The boundary I would inspect first is not capture but later retrieval: a capsule that was correctly redacted on day one can still be wrong to hand to a different agent on day thirty, after the task, scope, or permission has changed. Give every capsule a source task, an allowed scope, and an expiry, and make each context pack list which capsules it pulled and why each was still permitted; then test it with one planted secret that must be redacted and one capsule you revoke before a new task starts — the pack passes only if neither appears, and the revocation, not just the storage, is what the later agent sees.
On your three questions, we run multiple specialist agents across the same repos and ended up keeping shared memory as plain Markdown files on disk rather than a separate Postgres service. Each agent appends timestamped entries with explicit file and commit pointers to a daily log (YYYY-MM-DD.md), and an evening consolidation pass promotes verified facts into a bounded MEMORY.md while retiring superseded assumptions. Before adopting any shared memory layer, the two boundaries I check first are whether redaction happens deterministically before storage and whether every distilled note links back to a verifiable diff or trajectory.