Open-source agent memory

Your AI agent forgets everything.
GrepRAG fixes that.

A 2-round retrieval pipeline that gives any AI agent persistent, structured memory. Full-text search finds candidates. A nano LLM reranks for relevance. Sub-second recall, zero hallucination.

npm i -g greprag && greprag init
1

Full-text search

PostgreSQL tsvector finds candidate chunks in milliseconds. No vector DB, no embeddings, no cold starts.

2

Nano reranking

GPT-4.1 nano scores candidates for semantic relevance. Fast, cheap, accurate. Two rounds beat one.

3

Enriched memory

Raw chunks crystallize into nano summaries. Facts graduate, cluster, and synthesize over time. Memory that improves with use.

How it works

Hook

Claude Code session hooks capture conversation context automatically

Store

Text chunks indexed with tsvector in Postgres — your data, your database

Recall

2-round retrieval returns the most relevant context in under a second

Enrich

Facts graduate into clusters and synthesize into durable knowledge