Memgw

•
3
•

Provides shared long-term memory for AI coding agents, enabling them to retain context across sessions and tools.

Memgw acts as a unified, local store for AI coding agents, allowing them to overcome the common problem of forgetting context between sessions or across different tools like Claude Code, Codex CLI, and opencode. It centralizes project context, conventions, previous attempts (especially failures), and user preferences into a persistent memory. This system is designed with a layered architecture—events, facts, and git-audited notes—to efficiently distill and retrieve information, ensuring agents learn from past interactions and stop repeating mistakes, ultimately enhancing productivity and reducing the need for constant re-explanation.

Key Features

01Hybrid search combining FTS5/BM25 with optional semantic embeddings and automatic fallback
022 GitHub stars
03Local-first architecture with a single SQLite file, deployable to a VPS for shared access
04Dedicated 'dead-end' memory to prevent agents from retrying previously failed approaches
05Supports all Model Context Protocol (MCP) agents and generic CLIs via transcript watching
06Git-audited Markdown notes for transparent, inspectable, and reversible model-generated memory

Use Cases

01Preventing AI agents from repeating mistakes or re-explaining project details in software development workflows
02Retaining context and learning from past interactions for AI coding agents across multiple sessions
03Enabling different AI agents (e.g., Claude Code, Codex CLI) to share a common, persistent memory store