Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Agent Memory Architecture

ASecurity

Design tiered agent memory — core / recall / archival — with backend selection (mem0, Letta, Zep/Graphiti, LangMem) and temporal vs snapshot tradeoffs. Use when an agent needs persistent context across sessions, personalization, or temporal knowledge graphs.

47 stars
0 votes
0 copies
0 views
Added 9/23/2026
ai-agentspythonnodebackend

Security Analysis

A100/100

Scanned 9/23/2026

Install to Claude Code

$npx -y skills add akillness/jeo-skills --skill agent-memory-architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Memory Architecture?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Agent Memory Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/akillness-agent-memory-architecture/badge)](https://www.skillsdirectory.com/skills/akillness-agent-memory-architecture)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: agent-memory-architecture
description: Design tiered agent memory — core / recall / archival — with backend selection (mem0, Letta, Zep/Graphiti, LangMem) and temporal vs snapshot tradeoffs. Use when an agent needs persistent context across sessions, personalization, or temporal knowledge graphs.
---

# Agent Memory Architecture

## Overview

Conversation history ≠ memory. Production agents need tiered stores: hot in-context, warm vector recall, cold archival, plus temporal knowledge graphs for facts that change over time. This skill picks the backend and tier layout.

## When to use

- Agent needs to remember user preferences across sessions
- Multi-session task continuity (Ralph, long-running research)
- Personalization that survives restarts
- Multi-tenant agents with strict isolation
- Facts change over time (price, status, relationships) → temporal KG needed

## Backend selection

| Backend | Strength | Pick when |
|---------|----------|-----------|
| **mem0** | Self-improving, fact extraction, OSS | Personalization, conversational memory |
| **Letta** (MemGPT) | OS-style tiered memory, persistence | Agent-as-process, long-lived agents |
| **Zep / Graphiti** | Temporal knowledge graph, bi-temporal | Facts change over time, need history |
| **LangMem** | LangGraph-native, simple | Already on LangGraph, no extra service |
| **Postgres + pgvector** | Roll your own, full control | Compliance / on-prem requirements |

## Tier design

```
┌─────────────────────────────────────────────┐
│  Core (in context)      — identity, rules   │  <2k tokens
├─────────────────────────────────────────────┤
│  Recall (vector search) — last N sessions   │  100k+ items
├─────────────────────────────────────────────┤
│  Archival (cold store)  — full history      │  unbounded
└─────────────────────────────────────────────┘
```

**Promotion rule**: archival → recall on retrieval; recall → core on repeated use.
**Eviction rule**: core → recall on token pressure; recall → archival on staleness.

## Temporal vs snapshot

- **Snapshot**: latest value wins (mem0 default). Simple, loses history.
- **Temporal (bi-temporal)**: every fact has `valid_from`, `valid_to`, `recorded_at`. Required when "what did the agent believe yesterday?" matters.

Graphiti / Zep give you bi-temporal out of the box. Hand-rolled needs `(entity, relation, value, t_valid_start, t_valid_end, t_recorded)` tuples.

## Privacy patterns

- Per-tenant memory namespace, never share embeddings across users
- PII detection (Presidio) before embedding
- TTL on recall tier (e.g. 90 days), explicit retention for archival
- User-initiated forget: hard-delete from all tiers + reindex

## Quick start — mem0

```python
from mem0 import Memory
m = Memory()
m.add("User prefers concise answers in Korean.", user_id="jeo")
results = m.search("language preference", user_id="jeo")
```

## Quick start — Graphiti (temporal)

```python
from graphiti_core import Graphiti
g = Graphiti(neo4j_uri, neo4j_user, neo4j_pwd)
await g.add_episode(name="session_1", episode_body="User joined Acme Corp 2026-03-01", reference_time=datetime.now())
nodes = await g.search("where does the user work?")
```

## Further reading

- mem0 — fact extraction, semantic search
- Letta (MemGPT) — OS-style memory blocks
- Graphiti / Zep — bi-temporal knowledge graph
- LangMem — LangGraph-native memory primitives

Attribution

akillnessakillness
View sourceMore from akillness →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1066601 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

686011 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

651 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →