Agent skill

AMA Memory for OpenClaw

by Sherlockwz in Sherlockwz/AMA

Operates AMA's three-part memory system in OpenClaw, recalling context automatically and offering explicit tools to capture, inspect, close out or erase a user's memory.

Apache-2.0Auto-check passedAgent Workflows

Install AMA Memory for OpenClaw

skills CLI
$ npx skills add Sherlockwz/AMA --skill ama-memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Sherlockwz/AMA ama-memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ama-memory
GitHub stars
115
Token cost
~777 tokens
SKILL.md length
349 words
Files
101 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Operates AMA's three-part memory system in OpenClaw, recalling context automatically and offering explicit tools to capture, inspect, close out or erase a user's memory.

  • Works in 6 steps: Prefer automatic recall for ordinary… → Use ama_retrieve before answering a… → Use ama_process_turn only for a user… → …
  • Answering a question that depends on something from an earlier session
  • SKILL.md covers Operating rules, Tools, Typical workflow and Diagnostics
  • Ending a conversation or work session so it gets summarized into an episode

What it does

AMA keeps raw text for exact wording, fact knowledge for stable atomic facts, and episodes for high-level multi-turn summaries. The plugin normally recalls and captures memory on its own, so the explicit tools are for deterministic handling or for diagnosing the integration: retrieval should not repeat when the injected memory context already answers the request, and a destructive forget call is only used after the user explicitly asks to delete or reset their memory, with the correct user id attached. The skill also forbids exposing API keys, database paths, internal record ids or unrelated stored memories in an answer.

Six tools cover the workflow: ama_retrieve searches without changing memory, using a concise query; ama_process_turn stores a user turn through retrieval, judging, refreshing and construction, using the actual message rather than a paraphrase; ama_process_assistant stores the matching assistant reply without a second retrieval; ama_memory_list reports counts and window size for diagnostics only; ama_session_end triggers end-of-session episode generation once the final turn is captured; and ama_memory_forget erases all of a user's memory after their intent and identity are confirmed. If automatic hooks are off, the same sequence runs explicitly through these tools.

When your agent uses it

  • Answering a question that depends on something from an earlier session
  • Ending a conversation or work session so it gets summarized into an episode
  • Checking how much memory is stored, for diagnostics
  • Deleting a user's stored memory on their explicit request

Example prompts

  • “What did we decide about the pricing page last week?”
  • “We're done with this topic, close out the session.”
  • “The user asked you to forget everything about them. Do that now.”

Requirements

  • AMA's memory plugin running inside OpenClaw

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Prefer automatic recall for ordinary conversation. Do not call retrieval repeatedly when the injected 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…
  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…
  6. Never expose API keys, database paths, internal record IDs, or unrelated stored memories in an answer.

What it can do on your machine

Read from SKILL.md and the folder at commit a770f9a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AMA Memory for OpenClaw loads about 777 tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 349 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~777

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Sherlockwz/AMA at commit a770f9a, republished under its Apache-2.0 licence (© Sherlockwz). 349 words, ~777 tokens.

Download SKILL.mdSave it as .claude/skills/ama-memory/SKILL.md (or your agent's skills folder). This skill also uses 100 other files; get the full folder from GitHub.
name
ama-memory
description
Use AMA memory in OpenClaw to recall prior context, capture turns, inspect stored state, end sessions, or delete a user's memory when asked.

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.

ama_memory_forget

Erase all AMA memory for a user. Confirm intent and identity before invoking it.

Typical workflow

text
new user turn
  → auto-recall injects relevant AMA memories
  → answer using only relevant context
  → auto-capture stores the user and assistant turns
  → session end synthesizes episodic memory when appropriate

If automatic hooks are disabled, perform the same sequence explicitly with ama_retrieve, ama_process_turn, ama_process_assistant, and ama_session_end.

Diagnostics

When tools are unavailable or the sidecar is unhealthy, ask the operator to run:

bash
openclaw ama doctor
openclaw ama stats

Do not invent remembered content when retrieval fails. State that memory could not be checked and continue only with context available in the current conversation.

© Sherlockwz, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 100 other files (scripts) in the repository root of Sherlockwz/AMA.

  • SKILL.md
  • .env.example
  • .gitattributes
  • .github/ISSUE_TEMPLATE/bug_report.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/ISSUE_TEMPLATE/feature_request.yml
  • .github/pull_request_template.md
  • .github/workflows/ci.yml
  • .gitignore
  • .npmignore
  • CHANGELOG.md
  • CITATION.bib
  • CITATION.cff
  • CONTRIBUTING.md
  • LICENSE
  • README.md
  • README_zh-CN.md
  • SECURITY.md
  • … and 83 more

Open the folder on GitHubat commit a770f9a

Compare with similar skills

AMA Memory for OpenClaw next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AMA Memory for OpenClaw compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AMA Memory for OpenClaw this skillSherlockwz/AMA115—~777Automated safety check: PassApache-2.0
Coding Agent Session Findercode-yeongyu/oh-my-openagent70k1 repos~2.8kAutomated safety check: PassCustom licence
Claude-Mem Cloud Syncthedotmack/claude-mem98k1 repos~1kAutomated safety check: NotesApache-2.0
Cognee CLI Memory Commandstopoteretes/cognee32k1 repos~2.2kAutomated safety check: NotesApache-2.0
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Claude-Mem Searchthedotmack/claude-mem98k1 repos~511Automated safety check: PassApache-2.0

Similar skills

  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub starsUsed in 1 repo~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude-Mem Cloud Sync

    thedotmack/claude-mem

    Checks claude-mem cloud sync status and guides you through connecting a cmem.ai Pro account without the sync token ever passing through the chat.

    98k GitHub starsUsed in 1 repo~1k tokens
    Agent WorkflowsAuto-check: notes
  • Cognee CLI Memory Commands

    topoteretes/cognee

    Drives cognee from the terminal with remember, recall, forget and improve memory commands, dataset and config management and database migrations.

    32k GitHub starsUsed in 1 repo~2.2k tokens
    Agent WorkflowsAuto-check: notes
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Claude-Mem Search

    thedotmack/claude-mem

    Searches the user's persistent cross-session memory for timestamped observations synthesized from past agent sessions on cmem.ai.

    98k GitHub starsUsed in 1 repo~511 tokens
    Agent WorkflowsAuto-check passed
  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed

Categories

Questions about AMA Memory for OpenClaw

What does AMA Memory for OpenClaw do?

Operates AMA's three-part memory system in OpenClaw, recalling context automatically and offering explicit tools to capture, inspect, close out or erase a user's memory. AMA keeps raw text for exact wording, fact knowledge for stable atomic facts, and episodes for high-level multi-turn summaries. The plugin normally recalls and captures memory on its own, so the explicit tools are for deterministic handling or for diagnosing the integration: retrieval should not repeat when the injected memory context already answers the request, and a destructive forget call is only used after the user explicitly asks to delete or reset their memory, with the correct user id attached.

When should I use AMA Memory for OpenClaw?

AMA Memory for OpenClaw fits situations like: answering a question that depends on something from an earlier session; ending a conversation or work session so it gets summarized into an episode; checking how much memory is stored, for diagnostics; deleting a user's stored memory on their explicit request.

How do I install AMA Memory for OpenClaw in Claude Code?

Run `npx skills add Sherlockwz/AMA --skill ama-memory -a claude-code`. Or copy the skill folder (the Sherlockwz/AMA repository) into .claude/skills/ama-memory in your project. Claude Code loads it when a task matches its description.

How do I install AMA Memory for OpenClaw in Codex?

Run `npx skills add Sherlockwz/AMA --skill ama-memory -a codex`. Or copy the skill folder (the Sherlockwz/AMA repository) into .agents/skills/ama-memory in your project. Codex loads it when a task matches its description.

Can I use AMA Memory for OpenClaw in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Sherlockwz/AMA --skill ama-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ama-memory, .gemini/skills/ama-memory, .github/skills/ama-memory and .opencode/skills/ama-memory in your project.

What does AMA Memory for OpenClaw need to run?

SKILL.md names no scripts, command-line tools or credentials: AMA Memory for OpenClaw is instructions for the agent only. Our summary lists: AMA's memory plugin running inside OpenClaw.

Does AMA Memory for OpenClaw access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is AMA Memory for OpenClaw safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does AMA Memory for OpenClaw use?

AMA Memory for OpenClaw is published under the Apache-2.0 licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AMA Memory for OpenClaw use?

About 777 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to AMA Memory for OpenClaw?

Skills that share tags, products or a category with AMA Memory for OpenClaw: Coding Agent Session Finder (code-yeongyu/oh-my-openagent, 70k stars), Claude-Mem Cloud Sync (thedotmack/claude-mem, 98k stars), Cognee CLI Memory Commands (topoteretes/cognee, 32k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AMA Memory for OpenClaw?

Sherlockwz (a GitHub user) maintains it in Sherlockwz/AMA, which has 115 GitHub stars. The repository was last updated on September 8, 2026.

Source: Sherlockwz/AMA on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.