exocortex: Agent for Claude Code

.claude/agents/memory-engineer.md

Memory Engineer is an agent for Claude Code from shawnhack/exocortex. It costs 2 tokens per session (294 once invoked), scanned A, original, MIT.

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

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is shawnhack/exocortex's own configuration. It tells Claude Code how to work on exocortex itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything exocortex configures →

Reuse

Borrowing it

Nothing to install: this file belongs to shawnhack/exocortex. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/shawnhack/exocortex/main/.claude/agents/memory-engineer.md
Clone the repo
git clone --depth 1 https://github.com/shawnhack/exocortex

Made for: Claude Code.

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 Engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/shawnhack/exocortex/memory-engineer/github.svg)](https://agentmods.dev/agents/shawnhack/exocortex/memory-engineer)
Your own site
<a href="https://agentmods.dev/agents/shawnhack/exocortex/memory-engineer"><img src="https://agentmods.dev/badge/agents/shawnhack/exocortex/memory-engineer/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 Memory Engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/shawnhack/exocortex/memory-engineer"><img src="https://agentmods.dev/badge/agents/shawnhack/exocortex/memory-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00002 $0.00294
Opus 5.5 $0.00001 $0.00118
Sonnet 5.5 $0.00000 $0.00059
Haiku 4.5 $0.00000 $0.00029

Measured 2mo ago against content hash e0948f98ac49, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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.

.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. 2mo ago 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 1mo ago), licensed MIT. It adds 2 tokens to every session and 294 once invoked, about $0.0000 per session on Opus 5.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

Memory Engineer compared with agents from other repositories

Memory Engineer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Memory Engineershawnhack/exocortexAgent11mo agoMITA2Claude Code
semble-searchMinishLab/sembleAgent6.4k3d agoMITA46Claude Code
semble-searchMinishLab/sembleAgent6.4k3d agoMITA44Claude Code
context-researchermajor7apps/pensyveAgent99yesterdaynoneA47Claude Code
architecture-reviewercogniplex/codememAgent183mo agoApache-2.0A51Claude Code
playwright-test-generatormicrosoft/playwrightAgent99kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79k4d agoMITA33Claude Code