gitmyhub

memory-engine

TypeScript ★ 26 updated 8h ago

Agentic memory built on Postgres

Memory Engine Explanation

Memory Engine solves a fundamental problem with AI agents: they forget. Every conversation starts fresh. This tool gives AI coding agents a permanent memory layer — a place to store and retrieve knowledge across multiple sessions and projects. Instead of re-explaining the same design decisions or code patterns over and over, an agent can write down what it learns and pull that knowledge back up when it's relevant again.

The way it works is relatively straightforward. You run Memory Engine as a service (powered by PostgreSQL), and AI agents connect to it and use 10 built-in tools to create, search, and organize memories. When you store a memory, you can tag it with labels — like "design.auth" for authentication-related knowledge — so memories stay organized in a tree structure. When you search, you can ask in plain English ("how does authentication work?") and it finds the right memory by meaning, by keywords, or by both together. All the data stays in PostgreSQL, which handles the heavy lifting of semantic and keyword search using built-in database extensions.

The typical user is someone building or using AI coding agents — tools like OpenCode, Codex, Claude, or Gemini. Instead of the agent being stateless, Memory Engine lets it build institutional knowledge. A developer working with an AI assistant on a codebase could have the agent remember architectural decisions, common patterns, or security practices specific to that project. Over time, the agent becomes smarter and faster because it's not starting from scratch each time.

The project makes a deliberate choice to store everything in PostgreSQL rather than a custom vector database. That means you get durability, access control, and the ability to query memories in multiple ways — semantic, keyword-based, time-based, or filtered by metadata — without leaving the database. It's built as an MCP server, which is a standard protocol that lets modern AI tools plug in extensions without tight coupling.