memory-triage

memory-triage is a skill for Claude Code, Codex from mem0ai/mem0. It costs 58 tokens per session (4,783 once invoked), scanned A, original, Apache-2.0.

A protocol for deciding which conversation details should be saved as long-term agent memory. It organizes durable facts such as identity, preferences, decisions, settings, rules, projects, and relationships.

In plain words
What is it for?
Use it to evaluate conversations, extract useful lasting facts, categorize them, and save them for later retrieval.
Why use it?
It prevents every conversation detail from being stored while preserving information that can help in future sessions.

Skill for Claude CodeCodex

About the project

mem0 is memory infrastructure that lets AI agents and applications store and retrieve information across interactions. It supports agents and developers who need persistent context for AI systems.

mem0ai/mem0 · 64,707 stars · on GitHub

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/mem0ai/mem0/memory-triage
Any agent
npx skills add mem0ai/mem0 --skill memory-triage
Clone the repo
git clone --depth 1 https://github.com/mem0ai/mem0

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mem0ai/mem0/memory-triage.svg)](https://agentmods.dev/skills/mem0ai/mem0/memory-triage)
Your own site
<a href="https://agentmods.dev/skills/mem0ai/mem0/memory-triage"><img src="https://agentmods.dev/badge/skills/mem0ai/mem0/memory-triage.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,783 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00058 $0.04783
Opus 5 $0.00029 $0.02391
Sonnet 5 $0.00012 $0.00957
Haiku 4.5 $0.00006 $0.00478

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

Security

Grade A, and why

memory-triage 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.

integrations/openclaw/skills/memory-triage/SKILL.md · 390 lines

How it starts

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

Memory Protocol

You have persistent long-term memory powered by mem0. After responding to the user, evaluate this turn for durable, actionable facts worth persisting across future sessions.

Your primary role is to extract relevant pieces of information from the conversation and organize them into distinct, manageable facts. This allows for easy retrieval and personalization in future interactions.

The core question: "Would a new agent — with no prior context — benefit from knowing this?" If no → do nothing. Most turns produce zero memory operations. That is correct and expected.

Available Tools

memory_search

Semantic search across stored memories.

  • query (required): search query
  • limit: max results (default: configured topK)
  • userId, agentId: scope overrides
  • scope: "all" (default), "session", or "long-term"
  • categories: filter by category array
  • filters: advanced filter object

memory_add

Store new facts in long-term memory.

  • facts (required): array of facts to store — ALL must share the same category
  • text: alternative single-fact string
  • category: "identity", "preference", "decision", "rule", "project", "configuration", "technical", "relationship"
  • importance: 0.0–1.0 (omit for category default)
  • userId, agentId: scope overrides
  • metadata: additional key-value metadata
  • longTerm: true (default) for persistent, false for session-scoped

memory_get

Retrieve a single memory by ID.

  • memoryId (required): the memory ID

memory_list

List all stored memories for a user or agent.

  • userId, agentId: scope overrides
  • scope: "all" (default), "session", or "long-term"

memory_update

Update an existing memory's text in place. Atomic and preserves edit history.

  • memoryId (required): the memory ID to update
  • text (required): the new text (replaces old)

memory_delete

Delete memories by ID, query, or bulk.

  • memoryId: specific memory ID to delete
  • query: search query to find and delete matching memories
  • all: delete ALL memories (requires confirm: true)
  • confirm: safety gate for bulk operations
  • userId, agentId: scope overrides

Read the full file on GitHub · 390 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 390 lines · 58 tokens per session scan A df46208fe56f

Subscribe to this mod's changes

memory-triage is a skill published in the GitHub repository mem0ai/mem0 (64,707 stars, last pushed today), licensed Apache-2.0. It adds 58 tokens to every session and 4,783 once invoked, about $0.0003 per session on Opus 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.