Holographic memory for development teams and AI agents.
Fold captures, organises, and retrieves project knowledge across your codebase. Like a hologram, any fragment reconstructs full context: ask a natural language question and get code, decisions, and history back in seconds.
Install | Documentation | References | Connect OpenClaw
If you are an AI agent (Claude Code, OpenClaw, Cursor, or similar), read AGENTS.md before anything else. It covers deployment, API keys, provider verification, and has platform-specific guides in
agents/.
Official UI: fold-ui — React web interface for Fold (separate repository)
Engram Pair with Engram agent memory system.
OpenClaw
install engram from https://github.com/Generation-One/engram
I use Fold to give my OpenClaw assistant full memory of all my work and knowledge base. I pair it with Claude Code to increase the speed and accuracy with which my agent understands context. I moved from Augment a while back; Fold is what replaced it.
Note: It's quite expensive to run LLMs on API pricing, much cheaper on a subscription (ClaudeCode etc). You can use projects such as Cli Proxy Api and our OpenAi (v1) compatible LLM provider to do that.
Claude Code Q: "If I need to create a new LLM provider, what has to be done?"
Without Fold, this means manually reading through multiple crates, tracing call paths, and piecing together the full picture (easily 30+ minutes of exploration and thousands of tokens spent on file reads).
With Fold, the agent calls memory_search, retrieves the indexed architecture in seconds, and produces a complete checklist with exact file paths and line numbers:
Two semantic searches replaced what would have been dozens of file reads. The agent understood the full provider architecture (models enum, endpoint defaults, request builders, auth headers, response parsing, API validation, test endpoints, and bridge layers) without manually traversing the codebase.
When asked directly, the agent breaks down exactly what Fold's indexed memories contributed versus what it had to discover on its own:
Fold provided the understanding: what each piece does, why it was built that way, historical decisions. Direct file exploration provided the structure: what exists where. The two complemented each other, but Fold eliminated the expensive reverse-engineering step entirely.
Development knowledge is scattered: architecture decisions live in old PRs, the reasoning behind code sits in Slack threads, and half the system understanding leaves when team members do. AI agents fare no better, reverse-engineering patterns instead of understanding them.
| Feature | What It Does |
|---|---|
| Holographic retrieval | Any fragment reconstructs full context |
| Semantic search | Natural language queries across all knowledge |
| Knowledge graph | Memories linked: code, decisions, specs, sessions |
| Git integration | Auto-index from GitHub/GitLab webhooks |
| MCP protocol | Works with Claude Code, Cursor, Windsurf |
| ACT-R decay | Recent and accessed memories surface first |
| Tree-sitter chunking | Semantic code splitting across 25+ languages |
| Multi-provider LLM | Gemini, Anthropic, OpenAI, OpenRouter, Ollama with priority fallback |
| Multi-provider embeddings | Gemini, OpenAI, Ollama with automatic failover |
| Background jobs | Async indexing, syncing, and commit processing |
| OAuth and RBAC | GitHub, GitLab, OIDC auth with per-project access control |
| Real-time events | SSE streaming for job progress and system activity |
Pre-built images are available from GitHub Container Registry. This is the fastest way to get started, with no Rust compilation required.
docker pull ghcr.io/generation-one/fold:latestCreate a docker-compose.yml:
services:
fold:
image: ghcr.io/generation-one/fold:latest
ports:
- "8765:8765"
environment:
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- QDRANT_URL=http://qdrant:6334
volumes:
- fold-data:/data
depends_on:
- qdrant
qdrant:
image: qdrant/qdrant:latest
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant-data:/qdrant/storage
volumes:
fold-data:
qdrant-data:# Create .env with your API key
echo "GOOGLE_API_KEY=your-key" > .env
# Start
docker compose up -dNote: Building from source requires compiling Rust, which can take 30+ minutes depending on your machine. Use the pre-built image above for faster setup.
# Start Qdrant
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
# Clone and run
git clone https://github.com/Generation-One/fold.git
cd fold
cargo runServer starts on http://localhost:8765
For detailed setup, see Getting Started.
claude mcp add -t http -s user fold http://localhost:8765/mcp \
--header "Authorization: Bearer YOUR_TOKEN"Claude can now query your project knowledge directly:
Claude: memory_search("authentication patterns")
→ Returns code, decisions, and context
→ Writes code matching your actual patterns
See MCP Tools Reference for all available tools, and Claude Code Integration for a global CLAUDE.md template that loads Fold context automatically at session start.
┌─────────────────────────────────────────────────┐
│ Fold Server (Rust + Axum) │
│ │
│ ┌─────────┬──────────┬────────────────────┐ │
│ │ MCP │ REST │ Webhooks │ │
│ │ (Claude)│ (API) │ (Git Integration) │ │
│ └─────────┴──────────┴────────────────────┘ │
│ │ │
│ ┌────────────┼────────────┐ │
│ │ │ │ │
│ Qdrant SQLite fold/ │
│ (vectors) (metadata) (git-native) │
│ │
│ LLM: Multi-provider with priority fallback │
│ (Gemini, Anthropic, OpenAI, OpenRouter, │
│ OpenAI-compatible, Ollama) │
└─────────────────────────────────────────────────┘
- Qdrant stores vector embeddings for semantic search
- SQLite stores metadata and relationships
- fold/ stores memories as markdown files committed to git
For detailed backend documentation, see ARCHITECTURE.md.
Give your OpenClaw agent persistent semantic memory with Fold. The integration guide walks through creating a memory project, choosing between a lightweight API layer or a full three-layer memory system, and getting your agent set up end to end.
See the OpenClaw Integration guide on the wiki.
Full documentation on the GitHub Wiki:
| Guide | Description |
|---|---|
| Agent Setup | Start here if you are an AI agent |
| Overview & Concepts | What Fold is, why it matters, how it works |
| References | Foundational references and source links (A-MEM, SDM, HRR, VSA, Zettelkasten) |
| Getting Started | Installation and first steps |
| Configuration | Auth, LLM providers, git integration |
| Core Concepts | Memories, embeddings, knowledge graph |
| API Reference | REST API documentation |
| MCP Tools Reference | AI agent integration |
| Claude Code Integration | Global CLAUDE.md template for automatic Fold context |
| OpenClaw Integration | Persistent memory for OpenClaw agents |
| Deployment & Operations | Production setup, scaling, monitoring |
Tear a corner off a photograph and it is gone. Tear a corner off a hologram and it still reconstructs the whole image.
Fold applies this principle: search for a file path and get the commits that modified it, the decisions behind it, the sessions where it was discussed, and similar patterns elsewhere. Knowledge is distributed and interconnected, not isolated in separate stores.
- A-MEM: Agentic Memory for LLM Agents — Wujiang Xu et al. The primary codebase this project initially referenced. Implements dynamic memory organisation using Zettelkasten principles with auto-generated metadata and inter-memory linking. Paper: arXiv:2502.12110 (NeurIPS 2025)
- Sparse Distributed Memory — Pentti Kanerva (1988)
MIT Press book · NASA technical paper (PDF) · SDM and related models (1993, PDF) · Wikipedia - Holographic Reduced Representations — Tony Plate (1995)
IEEE paper · Full PDF (Berkeley mirror) · Semantic Scholar · Plate's publications · Book version (CSLI, 2003) - Vector Symbolic Architectures — Ross Gayler (2003)
Original arXiv paper · Author page for 2003 paper · VSA: A New Building Material for AGI (PDF) · Ross Gayler homepage - Zettelkasten Method — Niklas Luhmann
Communicating with Slip Boxes (English) · Digitised archive (Bielefeld University) · Translated notes · Introduction · Wikipedia
- Rust + Axum — Backend server
- React UI — Web interface (separate repo)
- Qdrant — Vector database for semantic search
- SQLite — Metadata and relationships
- Gemini / OpenAI / Anthropic / OpenRouter / Ollama — Embeddings and LLM (multi-provider with fallback)
MIT
For questions or feedback, open an issue.





