Your agent forgets users between sessions. That's the bug.
MemexAI gives your agent a persistent memory layer backed by Postgres. Memories are human-readable Markdown files with revision history, access logs, and scoped permissions. You can inspect every fact, fix mistakes, and trace what the agent remembered and why.
Paste the prompt into Cursor, Claude, or Antigravity to automate setup.
Two ways agent memory fails in production
Stateless agents lose users
Without persistent memory, your agent starts fresh every session. Users repeat their preferences, re-explain their goals, and eventually stop coming back. The AI feels like it has amnesia.
Vector stores hide the wrong facts
Dumping conversations into a vector database retrieves similar-looking fragments — including outdated or conflicting ones. When the agent says something wrong, you can't see why. You can't fix it.
Memory as Markdown files in your Postgres
MemexAI stores what your agent knows about each user as structured Markdown files — not opaque embeddings. Files live in your own Postgres database. Agents read and write them with simple tools. You read them with your eyes.
user/**Private per tenantEach user gets their own memory directory. Agents read and write freely. Other users can't see it.
shared/**Global read-onlyProject-wide policies, style guides, and workflows. Agents read but can't write by default.
Give all your agents a shared brain
The shared/ namespace holds global policies, product schemas, and behavioral rules. Update a schema or rule once, and it instantly propagates to every agent session. No code deployments required.
Behavioral Rules
Store shared/playbook.md to define how agents should handle specific situations (e.g., support escalations). The agent reads it before every session.
Memory Schemas
Define what a "good" user profile looks like. If you add a new required field to the schema, agents will automatically start asking users for it.
Auto-Injection
shared/index.mdis automatically injected into every prompt block. It acts as a routing catalog for your agent's collective knowledge.
Collective Memory
Optionally configure shared/ as read-write. Trusted agents can update project canon, backed by full audit trails and the ability to revert any change.
Background Dreaming keeps memory clean
Memory files can get messy over time with duplicate facts or scattered notes. MemexAI's Dreaming is a background optimization loop that runs when a user session goes quiet.
Merges repeated preferences, removes outdated or corrected facts, and consolidates fragmented notes into a stable record without blocking the main user request.
Dream runs that find nothing to change complete silently. When they do make updates, they create normal revisions authored by the dream-agent.
When the AI gets a fact wrong, open the file and fix it.
No re-indexing. No opaque embedding adjustments. Edit the Markdown line, and the next prompt block updates instantly. Revisions track every write. Access logs track every read. You can trace exactly which tool call wrote the wrong fact.
Add memory to your agent in 4 lines
Start with Docker. Connect with the TypeScript SDK or MCP. Or paste a setup prompt into your coding agent and let it wire everything automatically.
How MemexAI compares
Give your agent memory your team can trust.
Start with Docker, MCP, or the TypeScript SDK. Store memory, inject context, verify the next answer changes.