add-agent-memory

add-agent-memory is a skill for Claude Code from redis/agent-skills. It costs 133 tokens per session (4,101 once invoked), scanned A, original, MIT.

A procedure for connecting Redis Agent Memory to an existing agent so it can remember users across sessions. It guides decisions about what to remember, share, exclude, retain, and allow users to delete.

In plain words
What is it for?
It is for finding an agent's model call and user or session identifiers, configuring memory rules, provisioning the service, and wiring memory reads and writes.
Why use it?
It replaces temporary or custom memory handling with a configured long-term memory service while keeping the agent's existing conversation flow.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the redis-development plugin — 14 skills, 1 MCP server shipped together

Good fit It is for finding an agent's model call and user or session identifiers, configuring memory rules, provisioning the service, and wiring memory reads and writes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/redis/agent-skills/add-agent-memory
About the project

Redis Agent Skills is Redis's collection of packaged instructions and resources that teach AI coding agents how to work with Redis data structures, connections, search, caching, clustering, security, observability, and agent memory. It is for developers using coding agents to build or troubleshoot Redis-backed applications. The catalogue entries are the project's own agent skills, instructions, and plugin packaging.

redis/agent-skills · 178 stars · on GitHub · redis.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add redis/agent-skills --skill add-agent-memory
Clone the repo
git clone --depth 1 https://github.com/redis/agent-skills

Made for: Claude Code.

Or install redis-development, the plugin that ships this one along with the rest of its 14 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-agent-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/redis/agent-skills/add-agent-memory/github.svg)](https://agentmods.dev/skills/redis/agent-skills/add-agent-memory)
Your own site
<a href="https://agentmods.dev/skills/redis/agent-skills/add-agent-memory"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/add-agent-memory/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-agent-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/redis/agent-skills/add-agent-memory"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/add-agent-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 133 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,101 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00133 $0.04101
Opus 5.5 $0.00053 $0.01640
Sonnet 5.5 $0.00027 $0.00820
Haiku 4.5 $0.00013 $0.00410

Measured 29d ago against content hash 0d8fe56e57ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-agent-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/redis-development/skills/add-agent-memory/SKILL.md · 213 lines

How it starts

The opening of the file, as written. The whole thing — 213 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add Agent Memory

Before the model: recall what is known about the user. After the turn: write the exchange back. The service extracts long-term memories from sessions. What it remembers, shares, excludes and retains is a service setting, not an SDK argument: ask first, provision, then wire.

1. Discover

Read the project:

  • Find the turn (where the model is called) and the user id and session or thread id in scope there.
  • Identify the framework from imports.
  • Find existing memory code (BaseStore, InMemoryStore, custom dict or DB). You will replace its reads and writes, not the graph.
  • Already on Redis Agent Memory through its own client? Inventory before changing anything: adapters over the generated redis_agent_memory client, an MCP client exposing memory tools to the model, a namespace string written on every record, and any second runtime or framework plugin writing the same store. See "Already on Redis Agent Memory" in step 4.
  • Async agent? Use the a-prefixed methods.

Then ask the developer these five questions, nothing more. A shrug takes the default.

Ask If the answer is Configure
What should the agent remember about a user across sessions? Free facts and preferences (default) Nothing: built-in semantic and episodic types cover it
Structured business data: trip requirements, order constraints, account preferences One memory_types entry with named fields and an extraction prompt
Is there knowledge every conversation should see? Incidents, temporary policies, team notes memory.shared_namespace("<name>"); an ops owner writes with remember(..., namespace_id=...); the agent reads with recall(shared=[...])
No (default) Skip the namespace
What must never be kept? Passwords, tokens, card numbers, confirmation codes, health data exclusions.prompt naming each one. Guidance, not a guarantee: session content still reaches the model provider, and direct remember() writes skip it
How long should memory live? Session TTL, long-term TTL (defaults 30d / 365d) short_term_ttl, long_term_ttl
Do users need to be forgotten on request? Yes memory.forget(owner) on the erasure path

Read the full file on GitHub · 213 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 29d ago First seen · 213 lines · 133 tokens per session scan A 0d8fe56e57ac

Subscribe to this mod's changes

add-agent-memory is a skill published in the GitHub repository redis/agent-skills (178 stars, last pushed 28d ago), licensed MIT. It adds 133 tokens to every session and 4,101 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-04.

Related

add-agent-memory compared with skills from other repositories

add-agent-memory next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-agent-memoryredis/agent-skillsSkill17828d agoMITA133Claude Code
knowledge-ingestopenclaw/openclawSkill396ktodayMITA80Claude Code, Codex
forgetasgeirtj/system_prompts_leaksSkill74ktodayCC0-1.0A0Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill70k6d agoApache-2.0A217Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill21k15d agoMITA184Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9ktodayMITA115Claude Code, Codex
memoryopensquilla/opensquillaSkill7.2k7d agoApache-2.0A44Claude Code, Codex