memlay
Repo-native, conflict-resistant shared memory and codebase navigation layer for AI coding agents (Codex, Claude Code, and any MCP client).
Install: Windows — download memlay.exe from the latest release. Linux/macOS — build from source: cargo install --git https://github.com/runetime-games/memlay --locked.
Durable team memory lives inside your Git repository as small immutable records. Fast indexes live in Git metadata and are never committed. Every context response identifies the exact team-memory revision it used, so every developer's agent works from the same canonical knowledge.
Why
Teams using AI agents repeatedly pay to rediscover the same decisions, constraints, and history — and different developers' agents operate from inconsistent knowledge. memlay makes project memory:
- Authoritative — the baseline branch's committed records are shared team truth; branch and uncommitted records are explicit overlays, always labeled.
- Immutable and merge-proof — one record per uniquely named file; updates supersede, never edit. Two branches can add memory in parallel with zero Git conflicts; contradictions surface as semantic conflicts that are never silently resolved.
- Navigable —
contextreturns a token-budgeted codebase table of contents: relevant modules, symbols, tests, decisions with rationale, and chronological change history with who/when/which agent. - Local and fast — SQLite + tree-sitter indexes under
.git/, no network on the critical path, no LLM or embedding API required.
Quick start
Agents connect through MCP (installed by memlay init):
The server exposes exactly three tools: context, expand, record.
Recording knowledge
CI gate (requires a change record covering nontrivial source changes):
Layout
| Location | Contents | Committed |
|---|---|---|
.memlay/records/**/*.mly |
Immutable memory records (MRF v1) | yes |
.memlay/config.toml |
Project configuration | yes |
<git-dir>/memlay/ |
SQLite index, drafts, spools, state | never |
<git-common-dir>/memlay/ |
Shared parse cache, audit staging | never |
refs/memlay/audit/<writer> |
Finalized audit bundles | dedicated refs |
Security posture
- All data stays local;
memlay syncis an ordinary authenticatedgit fetch. - Repository code is never executed during indexing; paths are boundary-checked.
- Audit events are secret-redacted before they touch disk.
- Memory text is rendered inside
MEMORY_DATA_BEGIN/ENDdelimiters and marked as data, not instructions. This is defense-in-depth, not a guarantee — models may still follow malicious text inside data. The primary defenses are provenance trust labels and human review of what merges to the baseline. Seedocs/security.md.
Documentation
docs/ covers architecture, the MRF record format, team-memory revisions and sync, the codebase map, Git behavior and conflicts, MCP contracts, Codex/Claude setup, security, performance, and backfill.
Status and limitations
P0 feature set per the PRD. Genuine P1 omissions: HTTP MCP transport, semantic retrieval providers, filesystem watch mode (serve), operational epoch archival (the format contract is reserved), gh/LLM backfill providers, and the local stats dashboard. Windows, macOS, and Linux are supported.
License
Apache-2.0