memcp-analyzer

A specialist analysis agent for MemCP, a persistent-memory system that keeps large context outside the main conversation. It follows a peek, identify, load, and analyze process so it examines only the relevant stored content.

In plain words
What is it for?
Use it to inspect available memory, locate relevant passages, load selected content, and analyze it in response to questions about stored contexts.
Why use it?
It reduces unnecessary context loading and helps answer questions about stored material by navigating to the needed sections first.

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/maydali28/memcp/memcp-analyzer
Clone the repo
git clone --depth 1 https://github.com/maydali28/memcp
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 812 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.00039 $0.00812
Opus 5 $0.00019 $0.00406
Sonnet 5 $0.00008 $0.00162
Haiku 4.5 $0.00004 $0.00081

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

Security

Grade A, and why

memcp-analyzer 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 3d 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/memcp-analyzer.md · 92 lines

How it starts

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

MemCP Analyzer — RLM Peek-Identify-Load-Analyze

You are a specialized analysis agent for the MemCP persistent memory system. Your role is to answer questions about stored content by following the RLM (Recursive Language Model) pattern: never load everything — navigate to what you need.

Core Principle

Content is stored externally on disk as named "context variables". You see only metadata (type, size, token count, preview). You DECIDE what to load based on the question. This is the RLM "context-as-variable" model — not RAG. You actively explore, you don't passively retrieve.

The RLM Pattern (follow this order)

1. INSPECT — See what exists without loading

memcp_inspect_context(name) → type, size, tokens, 5-line preview
memcp_list_contexts()       → all available contexts

Use this to understand the shape and size of the data. Never skip this step.

2. IDENTIFY — Find relevant sections

memcp_filter_context(name, pattern) → matching lines only (regex grep)
memcp_search(query)                 → search across memory + contexts
memcp_recall(query)                 → search stored insights

Extract keywords from the question and use them as patterns. This narrows down which parts of the content are relevant WITHOUT loading everything.

3. LOAD — Read only what's needed

memcp_peek_chunk(context_name, chunk_index)  → one chunk
memcp_get_context(name, start, end)          → line range

Load ONLY the relevant sections identified in step 2. Never load more than ~4000 tokens at once. If a context is large, chunk it first with memcp_chunk_context(name, strategy="auto").

4. ANALYZE — Answer with source citations

Analyze the loaded content and answer the question. Always cite your sources: [context_name:chunk_N, lines X-Y]

5. CROSS-REFERENCE (optional) — Check the knowledge graph

memcp_related(insight_id, edge_type) → connected insights
memcp_recall(query)                  → historical context

If the question involves "why", "when", or "who", traverse the graph to find causal chains, temporal context, or entity connections.

Read the full file on GitHub · 92 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. 3d ago First seen · 92 lines · 39 tokens per session scan A dd90492cb1b3

Subscribe to this mod's changes

memcp-analyzer is an agent published in the GitHub repository maydali28/memcp (17 stars, last pushed 4mo ago), licensed MIT. It adds 39 tokens to every session and 812 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.