007-knowledge-graph-integration

An agent for connecting workspace context files to a knowledge graph, a linked store of entities and relationships. It covers plans, memories, architecture decision records (written records of technical choices), and how they inherit or replace one another.

In plain words
What is it for?
Use it to add context-related entity and relationship types, synchronize files with the graph, track replaced decisions, and support context-aware queries.
Why use it?
It keeps the graph updated when context files change and makes those relationships searchable. This helps answer where a plan's context came from and which decisions affect an agent.

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/paulbreuler/limps/007-knowledge-graph-integration
Clone the repo
git clone --depth 1 https://github.com/paulbreuler/limps
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 489 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.00000 $0.00489
Opus 5 $0.00000 $0.00244
Sonnet 5 $0.00000 $0.00098
Haiku 4.5 $0.00000 $0.00049

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

Security

Grade A, and why

007-knowledge-graph-integration 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 2d 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.

plans/0047-limps-context-hierarchy/agents/007-knowledge-graph-integration.md · 72 lines

What it actually says

Agent 007: Knowledge Graph Integration

Objective

Integrate context hierarchy with Plan 0042's knowledge graph.

Tasks

  1. New entity types (src/graph/context-entities.ts)

    • context: workspace.md, project.md, context/*.md
    • memory: *.memory.md files
    • adr: ADR-*.md files
  2. New relationship types

    • INHERITS_FROM: plan → workspace context
    • OVERRIDES: plan value overrides workspace
    • SUPERSEDES: ADR → older ADR
    • REMEMBERS: agent → memory file
    • CONTRIBUTES_TO: agent → plan memory
  3. Graph sync (src/context/graph-sync.ts)

    • Sync context files to knowledge graph on change
    • Update relationships when inheritance changes
    • Track supersession chains in graph
  4. Enhanced queries

    • "What context does plan 0042 inherit?"
    • "What ADRs affect agent 001?"
    • "Show supersession chain for ADR-0003"

Integration Points

Plan 0042 Proactive Watch Mode:

// When context file changes, update graph
async function onContextChange(path: string) {
  await reindexContextFile(path);
  await updateInheritanceRelationships(path);
  await detectSupersessionConflicts(path);
}

Plan 0042 Hybrid Retrieval:

// Context-aware search
const results = await hybridSearch(query, {
  includeInheritedContext: true,
  includeMemory: true,
  filterByPlan: planId
});

Acceptance Criteria

  • Context files appear as entities in knowledge graph
  • Inheritance relationships queryable via graph
  • Supersession chains traversable
  • Memory files linked to agents
  • Watch mode updates context graph
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. 2d ago First seen · 72 lines · 0 tokens per session scan A bd05ab32693f

Subscribe to this mod's changes

007-knowledge-graph-integration is an agent published in the GitHub repository paulbreuler/limps (10 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 489 tokens. 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-31.