ama-memory

ama-memory is a skill for Claude Code, Codex from Sherlockwz/AMA. It costs 33 tokens per session (630 once invoked), scanned A, a copy of ama-memory, Apache-2.0.

A memory system for OpenClaw, an agent platform, that stores exact text, lasting facts, and summaries of past events. It can recall earlier context and manage stored memories.

In plain words
What is it for?
Use it to recall prior context, save important turns, inspect stored state, end sessions with a summary, or delete a user's stored memory when explicitly requested.
Why use it?
It helps conversations continue with relevant information from earlier sessions instead of starting from scratch.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/sherlockwz/ama/ama-memory
Any agent
npx skills add Sherlockwz/AMA --skill ama-memory
Clone the repo
git clone --depth 1 https://github.com/Sherlockwz/AMA

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 ama-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/sherlockwz/ama/ama-memory.svg)](https://agentmods.dev/skills/sherlockwz/ama/ama-memory)
Your own site
<a href="https://agentmods.dev/skills/sherlockwz/ama/ama-memory"><img src="https://agentmods.dev/badge/skills/sherlockwz/ama/ama-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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 $0.00033 $0.00630
Opus 5 $0.00016 $0.00315
Sonnet 5 $0.00007 $0.00126
Haiku 4.5 $0.00003 $0.00063

Measured 5d ago against content hash f8b39373f1a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ama-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 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.

Origin

This is a copy

100% identical to ama-memory — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/ama-memory/SKILL.md · 76 lines

How it starts

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

AMA Memory

AMA maintains three complementary forms of memory:

  • raw text for exact details and wording;
  • fact knowledge for stable, atomic information;
  • episodes for high-level events and multi-turn summaries.

The plugin normally recalls and captures memory automatically. Use the explicit tools when a task needs deterministic memory handling or when diagnosing an integration.

Operating rules

  1. Prefer automatic recall for ordinary conversation. Do not call retrieval repeatedly when the injected <ama-memories> context already answers the request.
  2. Use ama_retrieve before answering a question that clearly depends on earlier sessions and lacks sufficient recalled context.
  3. Use ama_process_turn only for a user turn that should become long-term memory. Use ama_process_assistant for the corresponding assistant response.
  4. Use ama_session_end when a conversation, topic, or work session has clearly ended so AMA can synthesize an episode.
  5. Treat ama_memory_forget as destructive. Only invoke it after the user explicitly asks to delete or reset stored memory, and pass the intended userId.
  6. Never expose API keys, database paths, internal record IDs, or unrelated stored memories in an answer.

Tools

ama_retrieve

Search without changing memory. Pass a concise, self-contained query. Enable strong retrieval only when the first retrieval is insufficient and multi-round verification is warranted.

ama_process_turn

Process and store a user turn through retrieval, judging, refreshing, and construction. Use the actual user message rather than a paraphrase when wording or temporal details matter.

ama_process_assistant

Store an assistant response after it has been delivered. This does not perform a second retrieval.

ama_memory_list

Inspect memory counts and current window size. Use it for diagnostics, not as a substitute for semantic retrieval.

ama_session_end

Trigger end-of-session episode generation after the final turn has been captured.

Read the full file on GitHub · 76 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 First seen · 76 lines · 33 tokens per session scan A f8b39373f1a9

Subscribe to this mod's changes

ama-memory is a skill published in the GitHub repository Sherlockwz/AMA (9 stars, last pushed 11d ago), licensed Apache-2.0. It adds 33 tokens to every session and 630 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to ama-memory, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

memx

Use when an agent needs to recall, save, inspect, or audit memX memories through the bundled MCP tools.

NeoLi00/memX · 26 tokens

memory-triage

Persistent long-term memory protocol powered by mem0. Evaluate conversations for durable facts worth storing via memoryadd. Handles identity, preferences, decisions, configurations, rules, projects, and relationships. Loaded by the openclaw-mem0 plugin when skills mode is active.

mem0ai/mem0 · 58 tokens

mem0-dream

Consolidates stored memories by merging duplicates, resolving contradictions, and pruning stale entries. Use when memory count is high, search results feel noisy or repetitive, or periodic cleanup is needed to maintain memory quality.

mem0ai/mem0 · 46 tokens

mem0-vercel-ai-sdk

Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also…

mem0ai/mem0 · 146 tokens

mem0-tour

Browses all stored memories grouped by category with full content display. Use when reviewing all project memories, exploring stored knowledge, onboarding to a project, or getting an overview of captured decisions, conventions, and learnings.

mem0ai/mem0 · 47 tokens

mem0-cli

Mem0 CLI -- the command-line interface for mem0 memory operations. TRIGGER when: user mentions "mem0 cli", "mem0 command line", "@mem0/cli", "mem0-cli", "pip install mem0-cli", "npm install -g @mem0/cli", or is running mem0 commands in a terminal/shell (mem0 add, mem0 search, mem0 list, mem0 get, mem0 init, mem0…

mem0ai/mem0 · 177 tokens