ai-agent-memory-systems

ai-agent-memory-systems is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 128 tokens per session (1,797 once invoked), scanned A, original, MIT.

A guide to three kinds of memory for AI agents: working memory for the current task, semantic memory for stored facts, and episodic memory for past events. Together, these describe how an agent can retain information over time.

In plain words
What is it for?
Use it to plan memory systems for agents, including current context, knowledge bases, and records of previous interactions or experiences.
Why use it?
An agent that only sees the current conversation can lose important context during long tasks. Separating memory types helps explain what information should remain temporary or be stored.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to plan memory systems for agents, including current context, knowledge bases, and records of previous interactions or experiences.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-skills/memory-systems
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 j4flmao/agent-skills --skill memory-systems
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills

Made for: Claude Code, Codex.

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 ai-agent-memory-systems

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/memory-systems/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/memory-systems)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/memory-systems"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/memory-systems/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 ai-agent-memory-systems

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/memory-systems"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/memory-systems.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,797 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00128 $0.01797
Opus 5.5 $0.00051 $0.00719
Sonnet 5.5 $0.00026 $0.00359
Haiku 4.5 $0.00013 $0.00180

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

Security

Grade A, and why

ai-agent-memory-systems 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 5d 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.

skills/ai/ai-agents/memory-systems/SKILL.md · 156 lines

How it starts

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

Agent Memory Systems

Purpose

An LLM is stateless between calls; anything the agent "remembers" is either placed in the context window or retrieved into it. Memory design is therefore a set of policies: what stays verbatim in context, what gets compressed, what is persisted to external stores, how it is retrieved, and when it is updated or deleted. Bad memory design shows up as forgotten constraints, contradictory facts, and leaked data between users.

Agent Protocol

Trigger

"agent memory", "long-term memory", "remember across sessions", "context window full", "conversation summarization", "user profile memory", "episodic memory", "memory leaks between users".

Input Context

  • Session length and turn count; model context size.
  • What must persist across sessions (preferences, facts, past task outcomes).
  • Privacy/tenancy constraints and retention requirements.
  • Existing storage (Postgres, Redis, vector DB).

Output Artifact

Memory design: tiers, schemas, write/read/eviction policies, isolation and retention rules.

Response Format

Working memory: pinned={...} window={n turns} compression={summary|drop}
Semantic store: {schema} retrieval={hybrid+rerank} k={n}
Episodic store: {schema} written on={event}
Profile/facts: {key-value schema} update={upsert w/ provenance}
Isolation: {tenant/user key}  Retention: {ttl}  Deletion: {API}

Completion Criteria

  • Pinned context (instructions, goal, constraints) never evicted.
  • Every stored memory carries owner id, source, timestamp.
  • Retrieval is scoped by owner before similarity search.
  • Conflicting facts resolved by recency/provenance, not duplicated.
  • User-facing delete path exists.

Memory Tiers

Tier Lives in Content Retrieval Typical store
Working Context window System prompt, goal, plan, recent turns, tool results Always present In-process
Semantic External Facts, documents, user profile Similarity + filters Postgres/pgvector, vector DB, KV
Episodic External Past tasks: what was tried, outcome, lesson By task similarity or recency Table + embeddings
Procedural Prompt/code Learned instructions, tool usage rules Loaded at start Versioned prompt files

Read the full file on GitHub · 156 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. 5d ago Changed · +108 lines · +103 tokens per session 6ebd1f85438a
  2. 2mo ago First seen · 48 lines · 25 tokens per session scan A 708a2673e807

Subscribe to this mod's changes

ai-agent-memory-systems is a skill published in the GitHub repository j4flmao/agent-skills (38 stars, last pushed 5d ago), licensed MIT. It adds 128 tokens to every session and 1,797 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-08-30.

Related

Other skills, from other repositories

FORGE-data-compression

Context-window-aware data compression for long logs, code dumps, and multi-source evidence bundles. Compresses input to fit within model context limits while preserving semantic fidelity (F2 TRUTH ≥ 0.95). Supports streaming chunk-and-summarize pipelines. USE WHEN: "compress this log", "summarize before context…

ariffazil/AAA · 79 tokens

langchain-orchestration

Comprehensive guide for building production-grade LLM applications using LangChain's chains, agents, memory systems, RAG patterns, and advanced orchestration.

manutej/luxor-claude-marketplace · 35 tokens

hindsight-local

Store user preferences, learnings from tasks, and procedure outcomes. Use to remember what works and recall context before new tasks. (user).

vectorize-io/hindsight · 32 tokens

agentmemory-agents

How agentmemory wires into host coding agents via the connect command. Use when installing agentmemory into a specific agent, when asked which agents are supported, or when a connect adapter writes the wrong config path.

rohitg00/agentmemory · 46 tokens

memory-retain

Save what was learned to Hindsight long-term memory. Use when a task finishes, when the user states a fact, decision or preference, and when you discover something a later run or another Bot would need.

vectorize-io/hindsight · 46 tokens

last30Days

Resolve "last30Days" to a concrete ISO date range relative to your run time — a rolling 30-day window ending today. Returns inclusive civil dates plus exact UTC instants so you have temporal context without computing dates by hand. Read-only: no writes, no network. Use before a "last 30 days" / trailing-month task…

chaitanyagiri/munder-difflin · 83 tokens