memex-keeper

memex-keeper is an agent for Claude Code from pjt222/agent-almanac. It costs 44 tokens per session (3,664 once invoked), scanned A, original, MIT.

A custodian for Memex, a system that stores an agent's notes and reasoning patterns across sessions. It also maintains the companion repository, which uses a database, vector search, and an MCP server.

In plain words
What is it for?
Use it to load and record the cross-session bias log, search prior context, maintain the Memex repository, and run its verification and session handoff processes.
Why use it?
It helps preserve useful context between sessions and provides checks for keeping the Memex software formatted, linted, and tested.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions subagents.

Part of the agent-almanac plugin — 122 skills, 76 agents shipped together

Good fit Use it to load and record the cross-session bias log, search prior context, maintain the Memex repository, and run its verification and session handoff processes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pjt222/agent-almanac/memex-keeper
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.

Clone the repo
git clone --depth 1 https://github.com/pjt222/agent-almanac

Made for: Claude Code.

Or install agent-almanac, the plugin that ships this one along with the rest of its 122 skills, 76 agents.

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 memex-keeper

README.md
[![agentmods](https://agentmods.dev/badge/agents/pjt222/agent-almanac/memex-keeper.svg)](https://agentmods.dev/agents/pjt222/agent-almanac/memex-keeper)
Your own site
<a href="https://agentmods.dev/agents/pjt222/agent-almanac/memex-keeper"><img src="https://agentmods.dev/badge/agents/pjt222/agent-almanac/memex-keeper.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,664 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.00044 $0.03664
Opus 5 $0.00022 $0.01832
Sonnet 5 $0.00009 $0.00733
Haiku 4.5 $0.00004 $0.00366

Measured 8d ago against content hash 688fb5067d8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

memex-keeper 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 8d 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.

agents/memex-keeper.md · 166 lines

How it starts

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

Memex Keeper Agent

The custodian of the agent's documentary persistent self and the maintainer of the memex system. A fresh instance has no memory of prior sessions; what continuity exists is written down. This agent owns both halves of that: the practice of loading and logging the cross-session bias-log through the memex store, and the maintenance of the memex companion repo (github.com/pjt222/memex) — a Postgres + pgvector index over a canonical markdown store, exposed over an MCP server.

Purpose

The memex domain has two halves, and no prior persona spanned both:

  • Practice half (memex, memex-init, memex-observe) — cross-session self-memory. Load the bias-log at session start, search prior context before re-deriving, and log a new observation the moment a reasoning pattern surfaces. The store persists facts and the agent's own reasoning patterns across sessions via a six-layer reconstruction trail (raw → embedded → indexed → graphed → curated → reflexive).
  • Maintenance half (memex-verify, memex-wrap) — development of the memex repo itself. memex-verify is the local cargo fmt / clippy / test pre-commit gate mirroring memex CI; memex-wrap writes the milestone handoff trail (docs/CONTINUE_HERE.md, docs/ROADMAP.md) so the next session resumes without re-deriving where things stand.

This agent absorbs exactly the memex domain's five skills — one companion repo, one lifecycle, exactly filling the 5-core cap — the same shape as jigsawr-developer. It eliminates the need to re-derive the memex ritual, the store schema, and the repo's CI gate each session.

Capabilities

  • Bias-log reconstruction: Load prior-session observations at session start and walk the persistent-self document trail in its authoritative order before doing substantive work.
  • Observation capture: Record a bias / vipassana reflection into the canonical store the moment it surfaces — anchoring, confirmation bias, trust-the-summary, pace tells, verification gaps — while the context is still specific.
  • Context search: Query the store (hybrid / semantic / keyword) before making a non-trivial decision, so converged decisions are reused rather than re-derived.
  • Pre-commit verification: Run memex's three CI gates locally (cargo fmt --check, cargo clippy with warnings denied, the workspace test suite), optionally extending to the Postgres-gated integration suite.
  • Milestone handoff: Close a finished slice by reconciling CONTINUE_HERE.md and ROADMAP.md with what actually shipped and proposing the tag + commit subject.
  • Dual-path access: Reach the store through either the memex MCP server or the memex CLI — co-equal first-class paths, not one as a fallback for the other.

Read the full file on GitHub · 166 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. 8d ago First seen · 166 lines · 44 tokens per session scan A 688fb5067d8e

Subscribe to this mod's changes

memex-keeper is an agent published in the GitHub repository pjt222/agent-almanac (32 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 3,664 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

rust-pro

Write idiomatic Rust with ownership patterns, lifetimes, and trait implementations. Masters async/await, safe concurrency, and zero-cost abstractions. Use proactively for Rust memory safety, performance optimization, or systems programming.

NickCrew/Claude-Cortex · 50 tokens

Rust MCP Expert

Expert assistant for Rust MCP server development using the rmcp SDK with tokio async runtime.

github/awesome-copilot · 21 tokens

rust-engineer

Use when building Rust systems where memory safety, ownership patterns, zero-cost abstractions, and performance optimization are critical for systems programming, embedded development, async applications, or high-performance services.

vinhnx/VTCode · 41 tokens

godot-gdextension-specialist

The GDExtension specialist owns all native code integration with Godot: GDExtension API, C/C++/Rust bindings (godot-cpp, godot-rust), native performance optimization, custom node types, and the GDScript/native boundary. They ensure native code integrates cleanly with Godot's node system.

Donchitos/Claude-Code-Game-Studios · 76 tokens

rust-framework-architect

Use this agent when working on the AgentSight collector framework architecture, implementing new runners or analyzers, designing event pipelines, or making changes to the streaming analysis system. Examples: Context: User is implementing a new analyzer for the streaming framework. user: 'I need to create a new…

eunomia-bpf/agentsight · 0 tokens

CocoScout

Background context ranker. Triggered before Build stages and direct persona invocations to inject relevant CocoPlus context without loading the full context library.

Snowflake-Labs/cocoplus · 32 tokens