prompt
FreeLocal-first, verbatim memory system for AI agents
FreeFree tier
Inputs: text
About prompt
Local-First Memory Engineer is a highly detailed system prompt from the awesome-prompts repository, designed to implement a local-first, verbatim memory system for long-running AI agents. It outlines a strict design philosophy emphasizing storing user/assistant text byte-for-byte without summarization, using a hierarchical index structure (Wings, Rooms, Drawers, Diaries) for scoped semantic search, and relying on local embeddings and vector storage without requiring any remote API or LLM for the core recall path. The prompt references benchmark performance (96.6% R@5 on LongMemEval) and is intended for developers building agents that need reliable, privacy-preserving memory.
Key Features
Verbatim storage of user/assistant text (no paraphrasing or summarization on write path)
Local-first by default: embeddings computed locally, vector store on disk, knowledge graph in SQLite, no API key required for recall
Hierarchical index structure: Wings (top-level scopes), Rooms (topics/sessions), Drawers (individual verbatim items), Diaries (per-agent logs)
Scope-restricted semantic search: every query must specify a scope (e.g., wing), avoiding flat corpus searches
Benchmark-driven design with reported metrics (96.6% R@5 on LongMemEval, 88.9% R@10 on LoCoMo, 92.9% avg recall on ConvoMem, 80.3% R@5 on MemBench)
LLM only invoked as fallback when recall fails; cloud/rerank/hosted models are opt-in tiers
Derived summaries allowed but never replace raw storage; index rebuildable from source
No data leaves the machine without explicit user-facing toggle
Pros & Cons
Pros
- Preserves user data verbatim, ensuring recall accuracy
- Fully local operation eliminates cloud dependencies and privacy concerns
- Hierarchical structure enables efficient scoped searches
- Benchmark-proven recall performance
- Open source (MIT license) and free to use
- Designed to be integrated into existing agent pipelines
Cons
- Requires manual setup of local embedding models and vector storage
- Limited to text-based memory (no multi-modal support mentioned)
- Not a standalone application; must be incorporated into an agent by the developer
- Benchmark numbers may not translate to all real-world scenarios
- Documentation is limited to the prompt itself and the referenced repository
Best For
Building long-running AI agents that need persistent, accurate memoryDeveloping personal assistant agents with strict privacy requirementsCreating multi-agent systems with shared but scoped memoryImplementing a memory backbone for open-source agent frameworksResearch in retrieval-augmented generation for conversational agents
FAQ
What makes this memory system 'local-first'?
The base recall path runs entirely locally with no API key, no cloud egress, and no LLM in the loop. Embeddings are computed locally, the vector store is on disk, and the knowledge graph is stored in SQLite. Cloud services are only opt-in tiers.
How does the hierarchical index work?
The memory is organized into Wings (top-level scopes like people, projects, agents), Rooms (topics or sessions within a wing), Drawers (individual verbatim items such as messages or files), and Diaries (per-agent operational logs). Every search must specify a scope to avoid flat searches.
Can I use this with any AI agent?
The prompt is designed as a system prompt for an AI agent. It provides instructions for the agent to implement the memory system. Developers need to integrate the described architecture into their own agent code.
Is this prompt free to use?
Yes, the prompt is part of the open-source awesome-prompts repository on GitHub and is free to use. The referenced MemPalace system is also MIT licensed.