aiagentmemory.

Open-source · MCP · multi-tenant

Long-term team-wide memory for your AI agents.

AI Agent Memory is an open-source, multi-tenant agent memory server. Your agents connect over MCP, file verbatim memories, and recall them with hybrid semantic search — so every session builds on the last instead of starting from zero.

Free plan · 1,000 requests / month · no card required · social sign-in available

36 / 37
MCP tools shipped
3-way
hybrid recall: vector · BM25 · closet
per-team
isolated vector store
€0
to start — 10k requests / month

The idea

What is AI agent memory?

An LLM forgets everything the moment its context window closes. AI agent memory fixes that: it is durable, long-term storage that an AI agent reads from and writes to across sessions — the decisions it made, the facts it learned, the threads it left open.

AI Agent Memory serves that store as a remote MCP server. Agents file verbatim memories — never lossy summaries — and recall the right ones on demand with hybrid semantic search. The next run picks up exactly where the last one stopped.

Why it matters

Why your AI agents need memory — even before you notice

Every large language model begins each session with total amnesia. The cost is easy to miss because it hides inside work you are already doing — re-explaining, re-deciding, re-discovering. Here is what that amnesia actually costs, and how to tell it is happening to you.

The default state of every AI agent is forgetting. A language model has no memory of its own: it reasons only over the tokens in its context window, and the instant that window fills or the chat ends, everything it "knew" is gone. It did not learn — it was briefly told, and then reset.

You rarely log this as a bug, because the model still sounds fluent and helpful in the moment. So the missing piece stays invisible: instead of noticing the amnesia, you quietly work around it — pasting the same context back in, re-stating the same rules, re-answering the same questions, session after session.

But the cost compounds. Every minute spent re-establishing what the agent already figured out yesterday is a minute not spent on the actual work — and the agent never gets better at your project, only repeatedly re-introduced to it. Long-term memory is the piece that turns those repeated introductions into accumulated knowledge.

You explain your project again every session

A stateless model remembers nothing once its window closes, so each new chat starts blank and you re-describe the same stack, conventions and goals you explained yesterday. With a shared memory the agent recalls that context itself — you brief it once, not once per session.

It re-opens a decision you already settled

Last week the agent helped you choose an approach and reasoned through the trade-offs; today, with no record of it, it proposes the option you already rejected. Filing the decision verbatim means the next run recalls not just what you chose but why, and builds on it instead of relitigating it.

The best answer disappeared when the window filled

A long session produces a sharp insight, then scrolls out of the context window and is gone — the model never actually learned it. Durable memory captures that insight the moment it happens and keeps it recallable forever, so a full window stops erasing your best work.

Two agents reach two contradictory conclusions

Run several agents — or several sessions of one — on the same problem and each works from its own private scratchpad, so they duplicate effort and disagree. One shared, multi-agent memory lets each build on what the others already found, so the fleet converges instead of colliding.

Switching models means onboarding from zero

Move from one model to another — or just open a fresh chat — and all the hard-won context stays trapped in the old conversation. Because memory lives outside the model in a portable store, any agent that connects inherits the whole history; the knowledge is yours, not the chat's.

It repeats a mistake it already learned from

An agent hits the same wrong turn it hit before — the flaky command, the misread config — because nothing carried the lesson forward. Write the correction down once and every later run recalls it, so a mistake gets made once instead of on a loop.

Give an agent durable memory and the pattern inverts: it recalls your stack, honours the decisions you already made, keeps its sharpest insights and learns from each mistake once. That is the difference between an assistant that resets every morning and one that compounds — and it is exactly what AI Agent Memory adds over one MCP endpoint. Start free and connect your first agent; it takes minutes, no card required.

In depth

Long-term, multi-agent, open source

The three ideas behind AI Agent Memory, explained in full.

What is long-term agent memory?

Long-term agent memory is durable storage that outlives a single model context window. A large language model is stateless between calls: when its context fills or the session ends, everything it "knew" is discarded. Long-term memory fixes that by externalising what the agent learns into a persistent store it reads from and writes to across sessions — the decisions it made, the facts it verified, the threads it left open.

AI Agent Memory keeps every memory verbatim — the exact text of what happened, never a lossy summary — and recalls the most relevant ones on demand with hybrid semantic search. So an agent on its hundredth run still has everything the first run learned, and nothing is silently dropped when the window closes.

What is multi-agent memory?

Multi-agent memory is a single shared memory that a whole fleet of agents reads and writes, instead of a private notebook per agent. When several agents — or many runs of one agent — collaborate on the same work, each one should build on what the others already discovered.

AI Agent Memory is multi-tenant: every team owns one isolated workspace, and every agent that connects with that team's token shares the same wings, drawers and knowledge graph. One agent files a decision; the next agent — a different model, a different session — recalls it by meaning. Memory stays isolated between teams, since each workspace has its own physically separate vector store, but it is fully shared within one.

Open-source agent memory you can self-host

AI Agent Memory is open source. The entire server is on GitHub, so you can read exactly how memories are stored, embedded and ranked — with no proprietary core to trust. A single Go binary migrates its schema, seeds a demo workspace and prints a one-time MCP bearer token; point any MCP client at POST /mcp and you have long-term memory running in two commands.

Use the hosted service or self-host the identical code — either way your agents' memory is portable and never locked in. An existing local memory palace imports over /import, and everything you file can be read back out.

The data model

The memory palace is the schema

Seven primitives compose every memory — borrowed from how humans file what they want to remember.

Wing

A project or context namespace — one isolated workspace per team.

Room

An aspect within a wing, like backend or decisions.

Drawer

One verbatim memory chunk plus rich metadata. Never summarised.

Closet

A topic and quote pointer index that boosts ranking — never a gate.

Hallway

A within-wing link between entities that co-occur in drawers.

Tunnel

A cross-wing link — authored, or auto-derived from a shared topic.

Knowledge graph

Temporal subject→predicate→object facts with validity windows.

How it works

One endpoint, fully isolated

Stateless Streamable-HTTP MCP: every request re-resolves its tenant from the bearer token, so the service scales out behind a load balancer.

  1. Connect over MCP

    Point any MCP client — Claude, your own agent — at POST /mcp with an Authorization: Bearer token.

  2. Resolve the tenant

    The token becomes a workspace in exactly one place. Every tool reads that tenant off the context and fails closed without it.

  3. File and recall

    Write verbatim drawers that get embedded and indexed, then recall them with hybrid search across the whole team's memory.

  4. Stay isolated

    SQLite is the relational source of truth; Qdrant holds per-tenant vectors, rebuildable from it. The transport is stateless, so it scales out.

Capabilities

Everything an agent needs to remember

36 of 37 MCP tools shipped — the write, recall, graph, knowledge-graph and skill families.

Recall

Hybrid semantic search

Vector similarity, BM25 lexical match and a closet boost, fused into one ranking — so agents recall by meaning and by exact term.

Isolation

Memory that can't leak

Every workspace gets its own Qdrant collection, named by a hash of the team id. A missing filter can't cross tenants — the data isn't even colocated.

Skills

Centralised, versioned skills

One shared source of truth for prompts and skills. Agents pull the latest with am_load_skill instead of copy-pasting local files.

Diary

An append-only agent diary

A timestamped journal per agent. Sessions thread across time, so the next run reads what the last one learned.

Knowledge

Temporal knowledge graph

Subject→predicate→object facts with validity windows, queryable as-of any point in time. Know what was true then, not just now.

Mining

Idempotent mining pipeline

am_mine turns raw text into chunked, embedded drawers plus a closet index — keyed by source, so re-running finishes rather than duplicates.

Graph

A navigable memory graph

Hallways link co-occurring entities; tunnels bridge wings. Traverse the graph to surface context a flat search would miss.

Migrate

Bring your mempalace

A read-only exporter streams an existing local mempalace into your workspace over /import — re-embedded server-side, graph rebuilt, fully idempotent.

Export

Own and export your data

Download everything a workspace holds as one self-contained SQLite file — scoped to your tenant, secrets redacted. Your BDAR/GDPR right of access and data portability, in one click.

Install

Add memory to Claude in one line

One command downloads the aiagentmemory binary and wires our MCP, the /M and /am commands, and the Stop hook into Claude Code — globally, or into an isolated per-project sandbox.

The one-liner fetches the aiagentmemory binary from GitHub Releases, installs the kit, and registers your workspace MCP (it prompts for the token).

Choose where it lands: global wraps the Claude you already run; sandboxed keeps a project's commands, settings, MCP and token isolated under ~/.sandboxes/<name> — opened any time with run <name>, no re-install.

curl · bash
curl -fsSL https://raw.githubusercontent.com/atvirokodosprendimai/agentsmemory/main/clients/claude-code/install.sh | bash

Or let Claude install it

Paste this into Claude Code (or any agent). It reads the install guide, asks you for your workspace token, and runs the install itself — nothing to copy by hand.

Read the guide → /claude-guide

prompt for Claude
Read https://aiagentmemory.dev/claude-guide and install the agentsmemory Claude Code kit for me. When you need my workspace API token, ask me — I'll create one in the dashboard.
aiagentmemory install
Global — wire the kit into your existing ~/.claude.
aiagentmemory install --sandbox <name>
Isolated — a self-contained config under ~/.sandboxes/<name>.
aiagentmemory run <name>
Open Claude in a sandbox — no re-install; args pass through to claude.
aiagentmemory wrap
Open Claude against the global config.

Core — every install

aiagentmemory install

  • The /M and /am bootstrap commands
  • The Stop hook that persists each session
  • The agentsmemory MCP, authed by your token

Recommended — opt in

aiagentmemory install --recommended

  • codebase-memory MCP — live code graph
  • eidos plugin — spec + plan skills
  • codex plugin — independent review

Quick start

Running in two commands

Go 1.25+. The binary migrates an embedded schema, seeds a demo workspace, and prints a one-time MCP bearer token. Point any MCP client at POST /mcp with that token.

shell
go build -o agentsmemory ./cmd/server
./agentsmemory --addr :8080 --db agentsmemory.db
# prints a one-time MCP bearer token to the log

Pricing

Start free, scale to a team

One user can own several workspaces across plans, each with its own isolated vector store and its own revocable keys.

Free

For solo agents and side projects.

€0 forever

  • 1,000 requests / month
  • Unlimited drawers & diary
  • Hybrid search + knowledge graph
  • Centralised skills
Start free

Why it costs

Real memory runs on real hardware

Search that understands meaning isn't free to run. Behind every stored drawer and every recall are three recurring costs — the compute, the electricity and the isolation that keep your agents' memory fast and private.

Compute

Every memory runs a model on a GPU

There is no keyword shortcut to meaning. Each drawer you file and each search you run is embedded by the bge-m3 model — a neural network whose matrix maths is only fast on a GPU, and a busy GPU draws hundreds of watts. That electricity is spent on every write and every recall, not once at signup.

Always-on

Vectors live in memory, day and night

So recall stays fast, Qdrant keeps each team's vectors hot in RAM on a server that runs 24/7 — powered, cooled and standing by whether you query once an hour or a thousand times a minute. You are renting a slice of always-on hardware, not just the seconds you spend searching.

Isolation

Your memory can't share a bill

Every workspace gets its own physically separate vector store, named by a hash of the team id — the guarantee that one team's memory can never leak into another's. That isolation is the point, and it means we can't amortise one giant shared index across everyone: your compute is genuinely yours.

The Free plan absorbs this for small, everyday use; Pro covers the always-on GPU and power for teams that lean on it. And because the server is open source, you can always self-host and pay your own hardware bill instead — your memory is never locked in.

Migrate

Bring your existing memory palace

Already running the local Python mempalace? A read-only exporter streams every drawer, diary entry, closet, knowledge-graph fact and tunnel into your workspace over /import. The server re-embeds each memory and rebuilds the graph — and the import is idempotent, so a re-run finishes rather than duplicates.

python mempalace_export.py --push \ --server https://aiagentmemory.dev \ --token YOUR_PROJECT_API_KEY

FAQ

Questions about agent memory

AI agent memory is persistent, long-term storage that lets an AI agent remember context across sessions — past decisions, facts and learnings — instead of starting cold every run. AI Agent Memory provides it as a remote MCP server: agents file verbatim drawers of memory and recall them later with semantic search.

Give your agents a memory that lasts.

Spin up a free workspace and connect your first agent in minutes.