"Experience is the architect of the mind."
Gemini-Mem V3 is not a search index; it is a self-evolving cognitive substrate for the Gemini CLI. Inspired by the Evolver architecture and high-frequency agent workflows, V3 bridges the gap between ephemeral interactions and permanent engineering wisdom.
V3 implements a four-stage evolutionary cycle that operates silently in the background:
- Ingestion: Capture raw dialogue via zero-latency asynchronous hooks.
- Extraction: Gemini 3 series models distill the "What" (Facts), the "Who" (Entities), and the "How" (SOPs).
- Recognition: The engine detects recurring technical patterns (Concepts) across multiple sessions.
- Distillation: Upon reaching a "Success Threshold," raw memories are crystallized into formal
.mdskills.
Traditional memory systems fail because they recall facts when you need processes. V3 extracts Standard Operating Procedures (SOPs) from your successes.
- Micro-Workflow Capture: Automatically identifies the exact shell commands, file patches, and config tweaks that solved a bug.
- Example Output:
"sop": ["1. Bypass build isolation using --no-build-isolation", "2. Patch setup.py to hardcode sm_86", "3. Rebuild native modules"]
The SkillDistiller is the heart of the engine's "Self-Learning" capability.
- Pattern Matching: Monitors the
concepts_jsonfield in the SQLite backend. - The 2-Hit Rule: Once a complex technical concept (e.g., "Docker Optimization") is successfully validated twice, the Distiller triggers a synthesis event.
- Auto-Skill Creation: Generates a professional-grade
SKILL.mdin.gemini/skills/, creating a project-specific library of "Best Practices."
To prevent AI "brain fog" (UI lag), V3 decouples cognition from conversation.
- Task Offloading: The
AfterAgenthook merely appends to apending_tasksqueue (WAL-mode SQLite). - Background Worker: A dedicated process handles the heavy LLM lifting, ensuring your CLI remains responsive regardless of memory complexity.
V3 uses a tiered approach to memory recall, ensuring that the most relevant "wisdom" is always injected:
- Tier 1: Entities: Matches specific symbols (functions, class names) currently in scope.
- Tier 2: Concepts: Injects architectural patterns relevant to the current task.
- Tier 3: SOPs: Provides actionable steps for the current problem based on historical wins.
- Kernel: Optimized for Gemini 3 Series (leveraging high-token reasoning).
- Storage Layer:
- SQLite FTS5: High-speed full-text indexing for titles, summaries, and SOPs.
- JSON-Relation Mapping: Hierarchical storage of concepts and entities.
- Environment: Native Node.js / Bun compatibility with minimal dependency footprint.
gemini extension install .- Work: Solve a complex problem with the Gemini CLI.
- Evolve: V3 background worker extracts the SOP and stores the concept.
- Crystallize: Repeat a similar task. The
SkillDistillerautomatically creates a Skill file. - Recall: Next time you start a session, the relevant Skill is automatically injected into the context.
- Local-First: Zero telemetry for your data. Your wisdom stays in your project.
- Anti-Leakage: Advanced regex redaction to ensure credentials never enter the long-term memory pool.
GPL-3.0
Built to protect open-source innovation and prevent architectural plagiarism.
Designed for engineers who build things that last. Driven by an engine that never stops learning.