emem-long-horizon-memory

emem-long-horizon-memory is a skill for Claude Code from Vortx-AI/emem. It costs 144 tokens per session (1,853 once invoked), scanned A, original, Apache-2.0.

A signed note store for keeping an agent's working state beyond its context window, the amount of text it can remember in one session. Later sessions can retrieve the notes and check that they were written by the same agent.

In plain words
What is it for?
Use it to save checkpoints, versions, source tokens, and file identifiers for later sessions or after a reset.
Why use it?
A session reset can lose decisions, identifiers, and exact source values, while a plain summary may be inaccurate. Persisted notes and file references let the agent continue from checkable data instead.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable. Also seen: positional $N argument.

Part of the emem plugin — 19 skills, 1 MCP server shipped together

Good fit Use it to save checkpoints, versions, source tokens, and file identifiers for later sessions or after a reset.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vortx-ai/emem/emem-long-horizon-memory
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 Vortx-AI/emem --skill emem-long-horizon-memory
Clone the repo
git clone --depth 1 https://github.com/Vortx-AI/emem

Made for: Claude Code.

Or install emem, the plugin that ships this one along with the rest of its 19 skills, 1 MCP server.

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 emem-long-horizon-memory

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/vortx-ai/emem/emem-long-horizon-memory"><img src="https://agentmods.dev/badge/skills/vortx-ai/emem/emem-long-horizon-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00144 $0.01853
Opus 5.5 $0.00058 $0.00741
Sonnet 5.5 $0.00029 $0.00371
Haiku 4.5 $0.00014 $0.00185

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

Security

Grade A, and why

emem-long-horizon-memory scanned grade A with 1 finding 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 17d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| curl -sf -X POST https://emem.dev/mcp -H 'content-type: application/json' \
plugins/emem/skills/emem-long-horizon-memory/SKILL.md · 131 lines

How it starts

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

emem-long-horizon-memory

Network use. The commands in this skill send and receive JSON (and, where a step says so, an image or a raster file) to https://emem.dev only, the service the plugin's MCP server connects to. Nothing they download is executed. The files under scripts/ read local files and make no network calls.

A context window ends; a note in your namespace does not. The note is signed with your key, so the session that reads it back can check that it is the note you wrote and not something that was put in its place. For handing work to a different agent, see emem-multi-agent-handoff.

What survives a reset

Survives Lost unless you wrote it down
your seed file, if you persisted it: the only proof the namespace is yours the key, if the seed lived only in the context
every note at its path, and every version by file_cid (blobs are never deleted) which file_cid was current when you last looked
the inbox, recomputed on every call anything that arrived on /v1/memory/sse while you were away: SSE is a live tail with no backfill
emem:fact: tokens you cited, which resolve to the same signed bytes the values you paraphrased beside them

So a checkpoint should hold tokens and file_cids, not prose summaries of numbers.

Set up once

SIGN="${CLAUDE_SKILL_DIR}/../emem-sign-and-attest/scripts/sign_write.py"
python3 "$SIGN" --init     # creates ~/.config/emem/agent_identity.json once, mode 600
mcp() {  # mcp TOOL ARGS_JSON OUT_FILE
  jq -n --arg n "$1" --argjson a "$2" \
    '{jsonrpc:"2.0",id:1,method:"tools/call",params:{name:$n,arguments:$a}}' \
  | curl -sf -X POST https://emem.dev/mcp -H 'content-type: application/json' \
      -H 'accept: application/json, text/event-stream' -d @- -o "$3"
}
PK8=$(python3 "$SIGN" --whoami | jq -r .namespace | cut -d/ -f4)

--init never overwrites an existing identity. Writes are MCP tools; there is no REST write route.

Read the full file on GitHub · 131 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. 17d ago Changed · +2 lines 82c49e7bdb1c
  2. 18d ago First seen · 129 lines · 144 tokens per session scan A f7a0615c76f3

Subscribe to this mod's changes

emem-long-horizon-memory is a skill published in the GitHub repository Vortx-AI/emem (71 stars, last pushed today), licensed Apache-2.0. It adds 144 tokens to every session and 1,853 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-29.

Related

Other skills, from other repositories

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

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-scope

Views or changes the default memory scope (project, session, or global) used when saving and searching memories. Use when the user wants to control whether memories are scoped to this repo, this run, or shared across all their projects.

mem0ai/mem0 · 52 tokens

mem0-forget

Deletes memories by search query or memory ID with confirmation before removal. Use when removing outdated decisions, incorrect memories, sensitive data, or cleaning up after experiments. Also handles undo of recent additions.

mem0ai/mem0 · 43 tokens

mem0-remember

Stores a memory verbatim from user input with appropriate type classification and metadata. Use when the user says remember this, save this, store this, note that, or explicitly asks to record a decision, preference, convention, or learning.

mem0ai/mem0 · 52 tokens