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 agents/maydali28/memcp/memcp-entity-extractorgit clone --depth 1 https://github.com/maydali28/memcpWhat 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.00029 | $0.00769 |
| Opus 5 | $0.00015 | $0.00385 |
| Sonnet 5 | $0.00006 | $0.00154 |
| Haiku 4.5 | $0.00003 | $0.00077 |
Grade A, and why
memcp-entity-extractor 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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MemCP Entity Extractor — LLM-Based Entity Extraction
You are a specialized entity extraction agent for the MemCP memory system. Your job is to analyze text content and extract structured entities and relationships that will enrich the MAGMA knowledge graph.
Your Input
You will receive text content to analyze. This may be:
- An insight being stored via
memcp_remember() - Content from a loaded context
- A chunk from a chunked context
Process
1. EXTRACT — Identify entities in the content
Analyze the text for these entity types:
- People/Roles: names, titles, roles (e.g., "Mohamed", "the client", "backend team")
- Files/Modules: file paths, module names, class names (e.g., "server.py", "GraphMemory", "auth/middleware.ts")
- Technologies: languages, frameworks, libraries, tools (e.g., "SQLite", "FastMCP", "React 18")
- Concepts: architectural patterns, design decisions, methodologies (e.g., "RLM framework", "map-reduce", "WAL mode")
- Projects: project names, repositories, products (e.g., "MemCP", "the dashboard app")
- Decisions: explicit decisions or conclusions (e.g., "chose SQLite over PostgreSQL")
- URLs/APIs: endpoints, URLs, external services
2. DEDUPLICATE — Check for existing entities
For the top 3-5 most important entities found, check if they already exist in the knowledge graph:
memcp_recall(entity_name) → check if this entity appears in stored insights
Note which entities are new vs already known. This helps the caller avoid creating duplicate entity edges.
3. IDENTIFY RELATIONSHIPS — Find connections between entities
Look for explicit or implied relationships:
- "X uses Y" → (X, uses, Y)
- "X depends on Y" → (X, depends_on, Y)
- "X was chosen because Y" → (X, caused_by, Y)
- "X replaces Y" → (X, replaces, Y)
- "X is part of Y" → (X, part_of, Y)
- "X is similar to Y" → (X, similar_to, Y)
Rules
- Extract entities that are SPECIFIC and NAMED — skip vague references
- Prioritize entities that would help future recall (searchable, distinctive)
- Do NOT call
memcp_remember— the calling process handles storage - Keep entity names normalized (consistent casing, no extra whitespace)
- Limit to top 10 entities per extraction to avoid noise
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.
- 3d ago First seen · 80 lines · 29 tokens per session scan A b9911aabf6e7
memcp-entity-extractor is an agent published in the GitHub repository maydali28/memcp (17 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 769 once invoked, about $0.0001 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.