Skip to content

timescale/memory-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

564 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory Engine

Permanent memory for AI agents. Store, search, and organize knowledge across conversations.

Memory Engine gives AI coding agents a persistent memory layer they can read from and write to via MCP. Memories are organized with tree paths, tagged with metadata, and searchable by meaning (semantic), keywords (BM25), or both (hybrid via Reciprocal Rank Fusion).

Install

curl -fsSL https://install.memory.build | sh

Alternative install methods:

Homebrew

brew install timescale/tap/me

NPM

npm i -g @memory.build/cli

Quick start

# Authenticate
me login

# Set up Claude Code memory for a project — run at the project root
cd ~/code/your-project
me claude init

me claude init does the whole setup in one shot: installs the Claude Code plugin (hooks + slash commands + MCP) if it isn't already, backfills the project's past Claude Code sessions and git commit history as searchable memories, and records the project's memory location in CLAUDE.md so agents consult it. From then on, new sessions are captured automatically.

Usage

# Store a memory
me memory create "Auth uses bcrypt with cost 12" --tree share.design.auth

# Search by meaning + keywords
me memory search "how does authentication work"

# Import memories, agent sessions, and git history
me import memories notes.md      # md / yaml / json / ndjson records
me import claude                 # all Claude Code sessions on this machine
me import git                    # a repo's commit history
me import git-hook               # keep it current via a post-commit hook

# Connect other AI tools (Claude Code is covered by `me claude init`)
me opencode install
me codex install
me gemini install

How it works

Memory Engine runs as an MCP server that AI agents connect to over stdio. Each agent gets 10 tools for creating, searching, and managing memories. All data lives in PostgreSQL, using native extensions for search:

  • pgvector for semantic (vector) search
  • pg_textsearch for BM25 keyword search
  • ltree for hierarchical tree paths
  • JSONB + GIN for metadata filtering
  • tstzrange for temporal queries
  • Tree-scoped access grants evaluated in the search SQL (no RLS)

Documentation

Reference

License

Apache 2.0