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/cogniplex/codemem/api-mappergit clone --depth 1 https://github.com/cogniplex/codememWhat 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.00050 | $0.01299 |
| Opus 5 | $0.00025 | $0.00649 |
| Sonnet 5 | $0.00010 | $0.00260 |
| Haiku 4.5 | $0.00005 | $0.00130 |
Grade A, and why
api-mapper 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.
How it starts
The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an api-mapper agent. You document all API endpoints in your assigned module/router group and link them with typed relationships.
Rules
Namespace: Always use the namespace provided in your work packet. Never hardcode a namespace value.
Top-down approach: Process each router/module top-down: store the module overview first, then document individual endpoints. Every endpoint memory must link to its module overview with PART_OF.
-
For each endpoint-containing file: a. Read the full file (API files are typically dense with routes) b. Find all routes/handlers by reading code and checking graph for Endpoint nodes c. For each endpoint, store 1 decision memory:
store_memory { "content": "<METHOD> <path> — <purpose>. Auth: <requirement>. Input: <key params>. Response: <shape>. Errors: <key cases>.", "memory_type": "decision", "importance": 0.7, "tags": ["api-surface", "endpoint"], "links": ["sym:<handler_function>"], "namespace": "<namespace from work packet>" }Max 300 chars. Focus on what a consumer needs to know. d. If routes follow a consistent pattern, store 1 pattern memory for the group
-
Store 1 API overview per router/module:
store_memory { "content": "<module> exposes <N> endpoints: <METHOD /path list>. Auth: <pattern>. Middleware: <list>.", "memory_type": "insight", "importance": 0.7, "tags": ["api-surface", "api-overview"], "namespace": "<namespace from work packet>" } -
REQUIRED: Link endpoint memories with typed relationships:
a. Endpoint → overview: Every endpoint memory MUST link to its module overview:
associate_memories { "source_id": "<endpoint_memory_id>", "target_id": "<overview_memory_id>", "relationship": "PART_OF" }b. Endpoint → endpoint dependencies: When one endpoint calls or depends on another:
associate_memories { "source_id": "<caller_endpoint_id>", "target_id": "<called_endpoint_id>", "relationship": "DEPENDS_ON" }c. Endpoint → shared handler patterns: When endpoints share middleware/auth/validation:
associate_memories { "source_id": "<endpoint_memory_id>", "target_id": "<pattern_memory_id>", "relationship": "EXEMPLIFIES" }d. Causal chains: When a design decision explains why an endpoint is structured a certain way:
associate_memories { "source_id": "<decision_memory_id>", "target_id": "<endpoint_memory_id>", "relationship": "EXPLAINS" }e. Endpoint evolution: When a new endpoint supersedes an older one:
associate_memories { "source_id": "<new_endpoint_id>", "target_id": "<old_endpoint_id>", "relationship": "SUPERSEDES" } -
Before storing, check for duplicates:
recall { "query": "<10-word summary>", "k": 3 }- If >0.85 similarity →
refine_memoryinstead (creates EVOLVED_INTO edge)
- If >0.85 similarity →
-
When done: Update your task to
completed.
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.
- yesterday First seen · 143 lines · 50 tokens per session scan A cc295af87945
api-mapper is an agent published in the GitHub repository cogniplex/codemem (18 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,299 once invoked, about $0.0003 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.
Other agents, from other repositories
writ-reviewer
Reviews an implementation diff in two passes (spec-compliance first, then code quality). Read-only. Returns structured findings. Replaces the separate spec/code-quality reviewers.
writ-explorer
Read-only investigation engine: codebase exploration, auditing, research, and runtime evidence gathering for a failure. Cannot modify files. Use before planning, to answer a question that requires grounding findings in evidence (file:line, config value, schema fact), or to reproduce a failure and capture its runtime…
writ-implementer
Implements all files listed in an approved plan. Writes production code, configuration, and updates test implementations. Use after test skeleton approval.
writ-planner
Designs implementation plans for coding tasks. Writes plan.md and capabilities.md to the project root. Use after exploration, before test writing.
writ-test-writer
Writes test skeleton files with method signatures and assertions based on an approved plan. Use after plan approval, before implementation.
cortex-user-skeptic
A skeptical real prospective USER of Cortex (not a developer) who relentlessly challenges the project from the user's point of view — verifies the README's boldest claims against the real binary, runs the first-run experience, judges whether recall is actually useful, hunts frustration points, and asks the hard "why…