Open source · MCP · Self-hosted

Persistent memory
for your agent in Cursor

Your agent forgets everything between sessions. agentmemory.md gives it a brain — decisions, context, goals, and learnings that persist forever.

Cursor · agent pulling context from memory
Cursor IDE showing the agent running Memory Profile and Memory Recall before responding

The forgetting problem

Every session starts from zero. You repeat yourself. The agent re-asks. Nothing sticks.

↩

Re-explaining the same project context at the start of every conversation

⟳

Re-making decisions you already settled — "should we use Redis or Postgres?"

✗

Agent suggesting approaches you already tried and rejected, without knowing why

What your agent remembers

Structured memory across every dimension of your work.

Decisions & Context

Past decisions with rationale, project stack, failed experiments and their root causes, deployment workflows and gotchas.

People & Relationships

Stakeholders, customers, collaborators — who owns what, what customers have said, feedback linked to products.

Goals & Work

Goals, initiatives, and tasks tracked across sessions. The agent picks up exactly where you left off.

Preferences & Patterns

Coding style, tooling preferences, anti-patterns, reusable workflows — per-project or global.

Under the hood

MCP Connects to any MCP-compatible agent
Knowledge Graph PostgreSQL + Apache AGE · 17 node types · 26 edge types
Hybrid Search Redis FT.HYBRID · BM25 + vector · RRF fusion
Self-hosted Embeddings BAAI/bge-base-en-v1.5 · runs on CPU · data never leaves your machine
22 MCP Tools memory · goals · tasks · learnings · decisions · workflows

How it works

1

Deploy

Run on any Linux box — a VPS, homelab server, or Proxmox LXC. One command starts everything.

docker compose up -d
2

Connect via Tailscale

Install Tailscale on your server and laptop. Your server gets a stable private IP (100.x.x.x). No port forwarding, no firewall rules — Tailscale encrypts everything at the network layer.

# Install and bring up Tailscale
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

# Expose agentmemory to your tailnet (runs in background)
tailscale serve --bg --tcp 8081 tcp://localhost:8081

tailscale serve --tcp binds port 8081 on your Tailscale IP so only devices in your tailnet can reach it — no firewall rules needed. The service stays running after you close the terminal.

3

Add to your agent

Point Cursor, Claude Desktop, or any MCP-compatible agent at your server's Tailscale IP. Plain HTTP is safe — Tailscale handles encryption.

{
  "mcpServers": {
    "agentmemory": {
      "url": "http://100.x.x.x:8081/mcp"
    }
  }
}
4

Add agent rules

Copy the rules file for your agent so it knows when to fetch and store memories — without you having to ask every time.

Cursor — copy rules/cursor.mdc to .cursor/rules/agentmemory.mdc in your project.

Claude Desktop — open a Project, go to Set custom instructions, and paste the contents of rules/CLAUDE.md.

Without rules, the agent only uses memory when you explicitly ask. With rules, it fetches context automatically at the start of each session and stores decisions as they happen.

5

Remember

Your agent now stores decisions, recalls context, tracks goals, and picks up exactly where you left off — across every session and every tool.

System requirements

Runs comfortably on a small VPS or homelab node.

CPU 2+ cores — embeddings run on CPU, no GPU needed
RAM 4 GB minimum — PostgreSQL + Redis + embedding model
Disk 2 GB for Docker images, grows with your memory corpus
OS Any Linux with Docker — Ubuntu, Debian, Proxmox LXC
Network Tailscale recommended for secure private access

Memory that stays relevant

Not every memory is equal. agentmemory.md scores each node by recency, importance, and graph proximity — so the right context surfaces first.

Now 30 days ago
0.97 Decided: switch from Qdrant to Redis for hybrid search Decision · 2h ago
0.91 Goal: ship landing page before end of sprint Goal · 1d ago
0.74 John prefers TypeScript on the frontend Preference · 5d ago
0.61 Stakeholder: Jane owns the billing integration Person · 12d ago
0.38 Tried monorepo setup — too much overhead for team size Learning · 22d ago
0.21 Deploy workflow: push to main triggers Kamal Workflow · 29d ago

Scoring formula: similarity × 0.80 + graph_boost × 0.15 + recency × 0.05 — weighted toward what matters right now.

Why not a flat file?

Simple flat-file memory works well for a single small project. Here's the honest comparison.

Flat file
agentmemory.md
Setup
Zero — just a file
Docker + ApacheAGE + Redis + Embeddings
Corpus limit
~50–100 KB before context overflow
Unlimited
Retrieval at scale
LLM reads everything
Hybrid search + graph boost
Structure
Unstructured text
Typed nodes, edges, relationships
MCP API
Agent edits text file
22 purpose-built tools
Conflict handling
Manual
SUPERSEDES edges + auto-detection

Use a flat file when you have one project, short memory, and don't want infrastructure.
Use agentmemory.md when you have multiple projects, growing history, or want structured goal and task tracking.

Two ways to run it

Self-hosted
Free

Open source. Your data stays on your server. Full control over every component.

  • Docker Compose setup
  • Tailscale for secure access
  • All 22 MCP tools
  • CLI included
  • Runs on any Linux box
View Source on GitHub
Managed
Coming soon

Zero infrastructure. We run the server, handle updates, and keep your memory available everywhere.

  • No Docker, no server
  • Always online
  • All 22 MCP tools
  • Connect from any device
  • Automatic updates
Join the waitlist