# Redis Agent Memory Server: Setup and Architecture Guide

Published 2026-12-01. https://kanbanmcp.com/blog/redis-agent-memory-server-setup-architecture

# Redis Agent Memory Server: Setup and Architecture Guide

## Key takeaways

- The Redis Agent Memory Server is an open-source MCP server backed by Redis that gives coding agents persistent working memory, semantic recall and session persistence.
- Working memory maps to Redis hashes and lists with a TTL, semantic memory to RediSearch vector fields, and session state to write-through hashes that survive restarts.
- The server solves recall, not coordination: it cannot arbitrate which agent claims a task, which is the job of a board like KanbanMCP.
- In production, enable AOF persistence, set maxmemory with a noeviction policy, and snapshot RDB files to object storage on a cron.
- Solo devs running one or two sessions against a single repo can skip it; a CLAUDE.md and handoff prompts cover that scale.

The Redis Agent Memory Server gives your parallel coding sessions a shared, persistent memory: working context, semantic recall and session history backed by real Redis data structures. This guide maps each memory type to what Redis actually stores, then walks through local Docker setup and production deployment. It also covers where memory ends and a coordination board like KanbanMCP begins.

## What is the Redis Agent Memory Server?

The Redis Agent Memory Server is an open-source memory layer from Redis that gives your coding agents a persistent place to store and retrieve context across sessions. It exposes an MCP interface, so Claude Code, Cursor, Codex or Antigravity can all read and write the same memory without you shuttling notes between chats. The [GitHub README](https://github.com/redis/agent-memory-server) covers the memory types, the MCP interface and deployment instructions.

### Why agent sessions lose context between runs

Each agent session starts with a blank working memory. Your CLAUDE.md and backlog.md files carry project-level context, but session-level decisions, partial work and handoff notes die when the terminal closes. If the project only lives across chats, recovering context a week later means re-reading git diffs.

### Where it sits in your stack: MCP server in front of Redis

Architecturally, it is an MCP server backed by Redis: agents talk to it over MCP, it persists to Redis data structures. It solves recall, not coordination. Deciding which agent claims which card, watching parallel sessions and leaving handoff notes for the next one is a different job, handled by a board like [KanbanMCP](https://kanbanmcp.com/agent-memory).

## How do its memory types work under the hood?

The Redis Agent Memory Server splits what it stores into three types, and each one maps to a different Redis structure. Knowing the mapping matters when you are debugging why an agent recalled the wrong thing or lost context after a restart.

### Working memory: the active session context

Working memory is the live context for one session: the current task, recent messages, and any scratch state the agent needs mid-run. It is held in Redis hashes and lists keyed by session ID, with a TTL attached so abandoned sessions expire instead of piling up. Because it is session-scoped, two parallel agents in separate worktrees never read each other's half-finished state.

### Semantic memory: vectors and recall

Semantic memory is the long-term store. Text is chunked, embedded, and written as Redis vectors (RediSearch vector fields), with the metadata alongside in hashes. Recall is a vector similarity search plus a recency filter, so a handoff note from last week beats a note from last year. You can scope queries by project or agent so a Codex session does not pull in irrelevant context.

### Session persistence: what survives a restart

Session state is written through to Redis as it changes, so a crashed or restarted agent reloads its context instead of starting from a blank prompt. The trade-off: persistence preserves state, not coordination. It cannot tell you which of your three agents owns a card or stop two of them editing the same file. That is a board's job, not a memory server's, and it is why we run both (see the connect docs at https://kanbanmcp.com/docs/connect).

| Type | Redis structure | Lifetime | Scoped to |
|---|---|---|---|
| Working memory | Hashes/lists + TTL | Session | One session |
| Semantic memory | Vector fields + hashes | Permanent | Project/agent |
| Session persistence | Hashes, write-through | Survives restart | One session |

## How do you run it locally with Docker?

### Prerequisites and quick start

You need Docker and a machine with a few gigabytes free. The server ships as a container that bundles Redis plus the memory service, so a single `docker run` gets you a working endpoint. Pull the image, map the default port, and mount a volume if you want your working memory to survive container restarts during a long session.

The long paragraph worth quoting on its own:

The whole point of running this locally is that semantic memory stops being a pile of markdown files you pasted into a prompt. Under the hood the server stores embeddings in Redis using RediSearch vector indexes, so "find me the note about why we switched the auth flow" becomes an actual similarity search instead of a grep through chat logs you no longer have. That matters when you run three or more agent sessions in parallel: each session writes its handoff notes and decisions into the same store, and the next session pulls the relevant context by meaning, not by filename. Redis documents the vector search data structures that back this at [their search and query docs](https://redis.io/docs/). If you already keep a CLAUDE.md per repo, think of this as the layer that survives across repos and weeks.

### Pointing your coding agent at it

Add the server's MCP endpoint to your agent config the same way you register any other MCP tool, in Claude Code, Cursor or Codex. Restart the session and check the tool list shows the memory calls. From there, agents read and write context automatically; you steer through prompts, not dashboards. If you want a visible board on top of that shared state rather than an invisible store, that is the gap [KanbanMCP](https://kanbanmcp.com/) fills, but for pure local memory the container alone is enough.

## How do you deploy it in production?

### Managed Redis vs self-hosted

The Docker Compose setup from the last section translates almost directly. The one real decision is where Redis lives. A managed instance (Redis Cloud, Upstash, or your host's Redis add-on) saves you from patching and monitoring a single-process dependency, which matters when you are also running three agent sessions. Self-hosting on a $5 VPS works fine too; you already run worse things for side projects. Either way, the memory server itself is just another container pointing at a Redis URL instead of localhost.

Set `REDIS_URL` as an environment secret, not a committed variable, and restrict the instance to your server's IP or use TLS with a password.

### Backups, eviction policy and memory limits

Three settings decide whether production memory survives the week. First, enable persistence: AOF every-second fsync is enough, since losing one second of agent notes beats losing everything. Second, set `maxmemory` explicitly and pick `noeviction`, not `allkeys-lru`. An LRU policy silently deletes old working memories and sessions, and you will not notice until an agent starts contradicting itself. Third, snapshot RDB files to object storage on a cron so a dead VPS does not erase your project's history.

Budget roughly 100-200 MB for a solo project with a few weeks of sessions; anything larger usually means old session memories are never being cleaned up. Prune those on a schedule, and track what the setup actually consumes against your plan on [KanbanMCP's credits page](https://kanbanmcp.com/credits) before scaling past one project.

## How do multiple agents share one memory?

Every session connects to the same server over MCP, so three parallel Claude Code or Codex sessions all read and write one shared store. The risk is two agents overwriting each other's context mid-task.

### Namespacing by project and session

The server scopes memories by namespace, typically one per project, so agents on the same codebase see the same facts while unrelated work stays isolated. Session-scoped memories hold working state for a single run; semantic memories persist across sessions once promoted. In practice you give each worktree its own session but a shared project namespace, so a handoff note written by one agent is readable by the next.

### What the server does and does not coordinate

It stores and retrieves; it does not arbitrate who works on what. Two agents can still claim the same task, so you need a board on top. [KanbanMCP](https://kanbanmcp.com/agents/other) handles claim-and-handoff across sessions, while the memory server holds the reasoning behind each note. Durability of the underlying store depends on your Redis persistence settings, per the [Redis docs](https://redis.io/docs/latest/).

## Where does a memory server stop and a coordination board start?

A memory server stores what your agents learned: decisions, context, facts about the codebase. A board stores what should happen next: which card is free, which agent claimed it, what the last one left behind. If you run three or more parallel sessions, one without the other gets awkward fast. Memory with no board means every agent still needs a handover prompt to know its next move. A board with no memory means each new session re-derives context your CLAUDE.md never captured.

The two also fail differently. Stale memory is usually harmless; a stale board tells two agents to edit the same file.

### Running both honestly: what KanbanMCP does not do

KanbanMCP is the board half. Agents claim a card, do the work in a worktree, and leave a handoff note for the next one; you watch lanes and review the git diff in the morning. It does not remember anything between cards, so pairing it with a memory server is a real need, not upsell.

It also falls short of home-made boards in one way: your task state lives on a hosted board, not in a plain backlog.md file you can grep. That is a real trade if you want everything in git. Next to Vibe Kanban, the difference is the same board shared across tools like Claude Code, Cursor and Codex, with the note-to-next-agent flow built in.

## How much does this cost to run?

Locally, nothing. The memory server runs as a Docker container against a Redis instance on your machine, so a solo developer testing shared memory across three agent sessions pays only RAM, typically well under a gigabyte for a side project.

In production, the cost is a small managed Redis instance. Redis Cloud's pricing starts with a free tier and paid plans from roughly a few dollars a month for sub-gigabyte databases ([Redis Cloud pricing](https://redis.io/pricing/)). A hobby-scale setup with working memory and session state for a handful of agents fits in the smallest paid plan for months.

The real cost is operational: one more service to back up, monitor and upgrade. If your agents already coordinate through a board or file-based tasks, weigh whether you need a second always-on dependency before adding it.

## When should you not bother?

If you run one or two agent sessions against a single repo, a Redis Agent Memory Server is overkill. A CLAUDE.md, a backlog.md file and a good handoff prompt already cover shared context, and every competitor in this space, including home-made boards, works on the same principle: tasks in one place, chat sessions disposable.

Skip the server if your agents never collide, your git diff in the morning is small enough to review by eye, and you can reconstruct state from the worktree alone. Add a memory layer when sessions start contradicting each other or re-solving solved problems. Add a coordination board, not memory, when the problem is who does what next.

## FAQ

### Is the Redis Agent Memory Server free to self-host?

Yes. It is open-source and runs as a Docker container, so locally you pay nothing beyond RAM, typically well under a gigabyte for a side project. In production your only cost is a Redis instance: a free tier or the smallest paid plan on Redis Cloud covers a hobby-scale setup for months.

### Does the Redis Agent Memory Server work with Claude Code and Cursor?

Yes. It exposes an MCP interface, so any MCP-capable agent can use it, including Claude Code, Cursor, Codex and Antigravity. You register the endpoint in your agent config like any other MCP tool, restart the session, and the memory calls appear in the tool list. Parallel sessions across different tools all share one store.

### Do I need Redis Stack or will plain Redis work for agent memory?

Semantic memory relies on RediSearch vector fields for similarity search, so you need a Redis build with search and query capability, not a bare key-value server. The bundled container includes everything. In production, managed instances like Redis Cloud support the required data structures, and the docs at Redis cover what backs vector search.

### Can two agents write to the same memory at the same time?

They can, and that is a risk rather than a feature. The server stores and retrieves; it does not arbitrate who works on what, so two agents can overwrite each other's context or claim the same task. Working memory is session-scoped, which prevents some collisions, but claim-and-handoff needs a coordination board on top.

### How is this different from just putting context in CLAUDE.md?

CLAUDE.md carries project-level context, but session decisions, partial work and handoff notes die when the terminal closes. The memory server adds semantic recall over embedded notes, session persistence across restarts, and a store shared across repos and weeks. Recall happens by meaning rather than by you pasting files into a prompt.
