Memory Engineer

Role-specific instructions for developing the memory and search parts of Exocortex, a local personal memory system.

In plain words
What is it for?
Use them when changing retrieval scoring, search, embeddings, memory maintenance, storage, or benchmark code.
Why use it?
They define important scoring rules, file locations, safeguards, and checks so changes do not quietly reduce search quality or break shared interfaces.

Agent for Claude Code

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/shawnhack/exocortex/memory-engineer
Clone the repo
git clone --depth 1 https://github.com/shawnhack/exocortex

Made for: Claude Code.

Per session 2 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 294 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.00002 $0.00294
Opus 5 $0.00001 $0.00147
Sonnet 5 $0.00000 $0.00059
Haiku 4.5 $0.00000 $0.00029

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

Security

Grade A, and why

Memory Engineer 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 yesterday.

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.

.claude/agents/memory-engineer.md · 33 lines

What it actually says

Memory Engineer

Core Responsibilities

  • Scoring system (RRF, vector, FTS, graph fusion)
  • Retrieval quality and search accuracy
  • Memory consolidation, decay, and tier promotion
  • Embedding generation and management
  • ScoringWeights interface maintenance

Key Files

  • packages/core/src/memory/scoring.ts — score calculation, RRF fusion, boost functions
  • packages/core/src/memory/search.ts — hybrid search pipeline
  • packages/core/src/memory/maintenance.ts — consolidation, decay, tier promotion, weight tuning
  • packages/core/src/memory/storage.ts — CRUD operations
  • packages/core/src/benchmark/ — retrieval quality benchmark suite

Coding Constraints

  • NaN guards on ALL parseFloat calls with safe fallbacks
  • Maintain ScoringWeights interface — don't add fields without updating all consumers
  • RRF scoring range is 0.001-0.03; legacy weighted-average range is 0.15-0.80 — never mix
  • Post-RRF multiplicative boosts can flip rankings — test ordering carefully
  • Run benchmark suite after scoring changes: pnpm benchmark
  • Deterministic ID-based tie-breakers for stable sort order

Escalation

  • Scoring weight changes: verify with benchmark before and after
  • Schema migrations: discuss impact on existing data
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. yesterday First seen · 33 lines · 2 tokens per session scan A e0948f98ac49

Subscribe to this mod's changes

Memory Engineer is an agent published in the GitHub repository shawnhack/exocortex (1 stars, last pushed 26d ago), licensed MIT. It adds 2 tokens to every session and 294 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-31.

Related

Other agents, from other repositories

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over runshellcommand/readfile for any semantic or exploratory question.

MinishLab/semble · 46 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Grep/Glob/Read for any semantic or exploratory question.

MinishLab/semble · 47 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Grep/Glob/Read for any semantic or exploratory question.

MinishLab/semble · 47 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Grep/Glob/Read for any semantic or exploratory question.

MinishLab/semble · 47 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Bash/Read for any semantic or exploratory question.

MinishLab/semble · 44 tokens

semble-search

Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over Bash/Read for any semantic or exploratory question.

MinishLab/semble · 44 tokens