002-agent-memory

An agent for persistent memory that survives after an AI agent's session ends. It stores findings, decisions, blockers, and short session notes in memory files.

In plain words
What is it for?
Use it to record and retrieve an agent's findings, decisions, blockers, and session history for a particular plan and agent.
Why use it?
It prevents useful discoveries and unresolved issues from disappearing when work pauses or a new session begins. The memory can be viewed, updated, or cleared through commands.

Agent

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 agents/paulbreuler/limps/002-agent-memory
Clone the repo
git clone --depth 1 https://github.com/paulbreuler/limps
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 576 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.00000 $0.00576
Opus 5 $0.00000 $0.00288
Sonnet 5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00058

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

Security

Grade A, and why

002-agent-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 2d 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.

plans/0047-limps-context-hierarchy/agents/002-agent-memory.md · 80 lines

What it actually says

Agent 002: Agent Memory System

Objective

Implement persistent memory for agents that survives across sessions.

Tasks

  1. Memory types (src/memory/types.ts)

    • Finding: Discoveries during work
    • Decision: Choices with rationale
    • Blocker: Open or resolved blockers
    • SessionLog: Brief session notes
  2. Memory manager (src/memory/agent-memory.ts)

    • getMemory(planId, agentId): Load memory file
    • addFinding(planId, agentId, text): Add finding
    • addDecision(planId, agentId, choice, rationale): Add decision
    • addBlocker(planId, agentId, issue, status): Add blocker
    • logSession(planId, agentId, notes): Add session entry
    • Auto-create memory file if missing
  3. Memory CLI (src/cli/commands/memory/)

    • limps memory show <plan> <agent> — Display memory
    • limps memory add <plan> <agent> finding <text>
    • limps memory add <plan> <agent> decision <choice> --rationale <why>
    • limps memory add <plan> <agent> blocker <issue> --status open|resolved
    • limps memory session <plan> <agent> <notes>
    • limps memory clear <plan> <agent> — Reset with confirmation

Memory File Format

---
agent: 001-entity-resolution
plan: 0042-knowledge-graph
created: 2026-02-01
updated: 2026-02-02
sessions: 3
---

# Agent Memory: Entity Resolution

## Findings
- Finding 1...
- Finding 2...

## Decisions
| Decision | Choice | Rationale | Date |
|----------|--------|-----------|------|

## Blockers
- [ ] Open blocker
- [x] ~~Resolved blocker~~

## Session Log
### Session N — Date
Notes...

Acceptance Criteria

  • Memory persists in {agent}.memory.md file
  • limps memory show displays formatted memory
  • limps memory add appends to correct section
  • Session count increments automatically
  • Memory files are human-readable markdown
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. 2d ago First seen · 80 lines · 0 tokens per session scan A 1558ea73a3bb

Subscribe to this mod's changes

002-agent-memory is an agent published in the GitHub repository paulbreuler/limps (10 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 576 tokens. 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-31.

Related

Other agents, from other repositories