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.
npx agentmods add commands/sukinshetty/nemp-memory/recallgit clone --depth 1 https://github.com/SukinShetty/Nemp-memoryWrote 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.
[](https://agentmods.dev/commands/sukinshetty/nemp-memory/recall)<a href="https://agentmods.dev/commands/sukinshetty/nemp-memory/recall"><img src="https://agentmods.dev/badge/commands/sukinshetty/nemp-memory/recall.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00008 | $0.01387 |
| Opus 5 | $0.00004 | $0.00694 |
| Sonnet 5 | $0.00002 | $0.00277 |
| Haiku 4.5 | $0.00001 | $0.00139 |
Grade A, and why
recall 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/nemp:recall
Retrieve a memory by exact key or fuzzy search.
Usage
/nemp:recall
Arguments
key-or-query: Either an exact memory key OR a natural language query to search memories
Instructions
When the user invokes /nemp:recall, follow these steps:
1. Load All Memories
Read from both storage locations and merge:
# Read project memories if exists
[ -f ".nemp/memories.json" ] && cat .nemp/memories.json
# Read global memories if exists
[ -f "$HOME/.nemp/memories.json" ] && cat $HOME/.nemp/memories.json
2. Search Strategy
Phase 1: Exact Key Match
- Look for a memory where
keyexactly matches the query - If found, return immediately
Phase 2: Partial Key Match
- Look for memories where the key CONTAINS the query (case-insensitive)
- Example: query "bun" matches key "user-prefers-bun"
Phase 3: Value Search
- Search the
valuefield for the query terms (case-insensitive) - Rank by number of matching words
Phase 4: Fuzzy/Semantic Match (Basic)
- If no matches found, look for semantically related terms
- Example: "package manager" might match "npm", "bun", "yarn" mentions
- This is basic keyword expansion for now; semantic embeddings come later
3. Log the Read Operation
IMPORTANT: Always log read operations for audit trail.
After finding a match, append to .nemp/access.log:
echo "[$(date -u +%Y-%m-%dT%H:%M:%SZ)] READ key=<key> agent=${CLAUDE_AGENT_NAME:-main} query=<original-query>" >> .nemp/access.log
3b. Update Vitality Tracking
After logging to access.log, update the matched memory's vitality counters in memories.json:
- Load the memory from the appropriate storage file (project or global)
- If the memory lacks vitality fields, initialize with defaults first:
type:"fact"confidence:{"score": 0.65, "source": "agent-inferred", "reason": "Pre-cortex memory"}vitality: all counters set to 0,score: 50,state: "active",trend: "stable",last_read: null,decay_rate: 0.01links:{"goals": [], "conflicts": [], "supersedes": null, "superseded_by": null, "causal": []}
- Update these fields:
vitality.reads += 1 vitality.reads_7d += 1 vitality.reads_30d += 1 vitality.last_read = <current ISO-8601 timestamp> - Recalculate
vitality.scoreusing the formula:
Where:vitality = ( (reads_7d × 15) + (reads_30d × 3) + (foresight_load_ratio × 20) + (agent_reference_ratio × 25) + (update_frequency × 10) + (goal_link_active × 15) - (correction_events × 10) - (days_since_last_read × decay_rate) ) clamped to 0-100foresight_load_ratio= foresight_loads / (foresight_loads + foresight_skips), default 0 if both are 0agent_reference_ratio= agent_references / reads, default 0 if reads is 0update_frequency= update_count / max(1, days_since_created)goal_link_active= 1 if links.goals has any active goal, else 0
- Set
vitality.statebased on score:- 80-100:
"thriving" - 50-79:
"active" - 20-49:
"fading" - 1-19:
"dormant" - 0:
"extinct"
- 80-100:
- Write the updated memory back to memories.json
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.
- 4d ago First seen · 154 lines · 8 tokens per session scan A 33584a1a0ff8
recall is a command published in the GitHub repository SukinShetty/Nemp-memory (128 stars, last pushed 2mo ago), licensed MIT. It adds 8 tokens to every session and 1,387 once invoked, about $0.0000 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.
Other commands, from other repositories
memory-gc
Inspect or rotate hunt-memory JSONL files (audit.jsonl, patterns.jsonl, journal.jsonl). Caps file size and keeps N rotated backups so memory does not grow unbounded.
remember
Log current finding or successful pattern to hunt memory. Auto-fills from /validate output if available. Usage: /remember.
encode-repo
Bootstrap a repository into Forgetful's knowledge base.
memory-list
List recent memories from Forgetful.
memory-search
Search memories semantically using Forgetful.
session-end
I'll summarize this coding session and update the memory system with our accomplishments.