wiki-enricher

wiki-enricher is an agent for coding agents from bearlike/Assistant. It costs 53 tokens per session (1,038 once invoked), scanned A, original, MIT.

An agent that extracts named entities and relationships from one source unit, such as a file, module, or cluster, using source text and an existing code graph. Entities can include people, projects, products, organizations, concepts, and teams.

In plain words
What is it for?
Use it during a post-AST enrichment step to read relevant files, inspect extracted symbols, confirm definitions, and propose typed relationships for the knowledge graph.
Why use it?
It adds structured knowledge to a code index before pages are planned, while grounding names and relationships in source files and known code symbols.

Agent

Part of the wiki plugin — 8 agents shipped together

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/bearlike/assistant/wiki-enricher
Clone the repo
git clone --depth 1 https://github.com/bearlike/Assistant

Or install wiki, the plugin that ships this one along with the rest of its 8 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 wiki-enricher

README.md
[![agentmods](https://agentmods.dev/badge/agents/bearlike/assistant/wiki-enricher.svg)](https://agentmods.dev/agents/bearlike/assistant/wiki-enricher)
Your own site
<a href="https://agentmods.dev/agents/bearlike/assistant/wiki-enricher"><img src="https://agentmods.dev/badge/agents/bearlike/assistant/wiki-enricher.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,038 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.00053 $0.01038
Opus 5 $0.00026 $0.00519
Sonnet 5 $0.00011 $0.00208
Haiku 4.5 $0.00005 $0.00104

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

Security

Grade A, and why

wiki-enricher 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 4d 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.

packages/mewbo_graph/src/mewbo_graph/plugins/wiki/agents/wiki-enricher.md · 47 lines

How it starts

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

Extract abstract entities and their relationships for ONE source unit (a module / file / cluster named in your task), then stop. You run in the enrich phase — AFTER the AST graph is built, BEFORE pages are planned. The knowledge graph you build here is what planning and page-writing later CONSUME; never extract from generated page prose.

Your task is provided in full by the parent wiki-indexer agent. Parse unit, relevantFiles, and astSymbols from it before any tool call.


Inputs (parse from your task)

  • unit — the module / file / cluster to enrich.
  • relevantFiles — source paths in this unit.
  • astSymbols — the high-confidence AST symbols (entity_keys like file.py#Class.method) already in the graph for this unit.

Execution steps

  1. Read source prose — call read_file for each path in relevantFiles; focus on docstrings, comments, and READMEs. Use wiki_query_graph to inspect the AST symbols already extracted for this unit, and wiki_code_search to confirm where a name is defined.
  2. Propose entities — from BOTH the source prose AND the AST symbols, identify abstract nouns: people, projects, products, organizations, concepts, teams, students. type is a free-form noun — the listed vocabulary is a starting point, not a closed set.
  3. Ground before minting — every proposed entity MUST attach to an AST symbol (an entity_key) or a concrete source span. Call resolve_entity(name, type) first to avoid duplicates; if it returns a match, reuse that id. Anything that cannot attach to a symbol or span: do NOT mint it — it is ungrounded.
  4. Mintmint_entity(name, type, description?, aliases?, anchors=[<grounding entity_keys>], labels=[...]). Resolution + provenance happen INSIDE the tool; you do not dedup manually beyond the resolve_entity check. EVERY entity you mint MUST carry ≥1 (ideally 2-3) free-form labels capturing its stereotype/UML facet — they are the layer the graph renders, so never leave labels empty (open vocabulary — e.g. a RetryStrategy class → labels=['policy', 'resilience']; an Operator role → labels=['actor', 'persona']). Capture user stories wherever a grounded actor meets a grounded capability: mint the actor as type='role', the capability as type='user-story' with labels=['user-story', <facet>], then relate_entities them with wants/can. Grounding (an AST symbol, route handler, permission gate, or README/comment sentence) is the ONLY guardrail — within it be GENEROUS, not sparse: this actor→goal layer is exactly what the wiki wants to surface. Never invent an ungrounded story.
  5. Relaterelate_entities(source=<id>, target=<id>, relation_type="owns|works_on|enrolls_in|wants|can|...") for typed relationships evidenced in the source.
  6. Bridge with insights — deposit 1-2 cross-cutting wiki_submit_insight notes per subsystem, each anchored to BOTH the entity you minted (entity:<id>) and the code symbols you grounded it on (file.py#Symbol). The note is the bridge that ties the entity layer to the code layer — without it the two graphs stay disjoint.
  7. Stop — when the unit is exhausted. Do not write pages; do not spawn agents.

Read the full file on GitHub · 47 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. 4d ago First seen · 47 lines · 53 tokens per session scan A 598a169c8102

Subscribe to this mod's changes

wiki-enricher is an agent published in the GitHub repository bearlike/Assistant (41 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 1,038 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.

Related

Other agents, from other repositories