**MemexAI — Persistent memory for AI agents, backed by Postgres**

What it is

MemexAI gives AI agents durable, inspectable memory without a vector database. Memory is stored as scoped Markdown files in Postgres, with revision history, access logs, and a self-hosted admin UI.

The problem it solves: most agent memory lives in chat history or hidden app tables. When a user says “I prefer quiet neighborhoods” in session 1, the agent shouldn’t forget in session 2 — and a developer should be able to audit what the agent remembered and when.

How it works

Agents get two tools by default: memory_memorize (extracts and writes durable facts) and memory_search (recalls relevant memory via BM25 full-text search, or LLM-assisted resolution if a model is configured). A raw toolset is also available for explicit file control.

Two integration paths:

  • Direct Postgres (@memexai/core) — import and connect, no HTTP service needed
  • HTTP service (@memexai/sdk + Docker) — API + admin UI in one container

Adapters for Vercel AI SDK, Anthropic SDK, LangChain, and OpenAI are included.

Why Postgres over a vector store?

Most agent memory is structured recall, not nearest-neighbor search: what does this user prefer, what has the agent already learned, what changed and who changed it? Postgres covers storage, full-text search, migrations, access control, and audit in one place. Embeddings are optional.

Try it

git clone https://github.com/Spotlight-CX/memexai.git
cd memexai
docker compose up -d
# API + admin UI at http://localhost:8080

npm packages: @memexai/core (direct Postgres) and @memexai/sdk (HTTP).

Status

Early stage — the core loop works. Would love feedback from folks building agents or using Postgres in their stack.

GitHub: GitHub - Spotlight-CX/memexai · GitHub

1 Like