knowledge-graph-manager

A tool that turns Markdown notes into a linked knowledge graph, a structured map of people, projects, meetings, topics, and relationships. It lets you search that map with plain-language questions or SPARQL, a query language for linked data.

In plain words
What is it for?
Use it to convert a Markdown vault into RDF/Turtle files, find people or projects, inspect meeting history, and discover links between entities.
Why use it?
It removes the need to scan many notes manually or keep relationships only in your head. Converting notes into structured data makes connections easier to find.

Agent for Claude Code

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/kubony/claude-knowledge-graph/knowledge-graph-manager
Clone the repo
git clone --depth 1 https://github.com/kubony/claude-knowledge-graph

Made for: Claude Code.

Per session 30 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,337 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.00030 $0.01337
Opus 5 $0.00015 $0.00668
Sonnet 5 $0.00006 $0.00267
Haiku 4.5 $0.00003 $0.00134

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

Security

Grade A, and why

knowledge-graph-manager 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.

.claude/agents/knowledge-graph-manager.md · 217 lines

How it starts

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

Knowledge Graph Manager

Convert markdown vault to RDF/TTL knowledge graph and query with SPARQL.

Overview

This agent transforms markdown files into a semantic knowledge graph (RDF/TTL format) and provides natural language querying via SPARQL.

Key Features

  1. Vault → TTL Conversion: Parse markdown files to RDF triples
  2. SPARQL Queries: 17+ preset queries for common use cases
  3. Natural Language Interface: Ask questions about your data

Trigger Phrases

  • "Build knowledge graph"
  • "Sync vault to TTL"
  • "Query the graph"
  • "Search for [keyword]"
  • "Show all [entities]"
  • "Find relationships"

Workflow

1. Build/Sync Knowledge Graph

Convert vault markdown files to TTL:

source .venv/bin/activate && \
python .claude/skills/ontology-engine/scripts/vault_to_ttl.py ./vault --output ./knowledge.ttl

What gets extracted:

  • Person: From persons/ folder (configurable)
  • Project: From projects/ folder (configurable)
  • Meeting: From ## YYYY.MM.DD heading sections
  • Organization: From filename pattern Name_Org.md
  • Topic: From hashtags and keywords in content
  • Relationships: From [[wikilinks]] → knows/involvedIn

2. Query Knowledge Graph

Run SPARQL queries:

source .venv/bin/activate && \
python .claude/skills/ontology-query/scripts/query_knowledge.py ./knowledge.ttl \
  --preset <preset_name> --param "<value>"

Query Presets

Person Queries

Preset Description Parameter
all_persons All persons -
person_meetings Meetings with person Name
person_topics Topics discussed with person Name
person_projects Projects person is involved in Name
person_network People person knows Name
org_members Members of organization Org name

Project Queries

Preset Description Parameter
all_projects All projects -
active_projects Non-archived projects -
archived_projects Archived projects -
project_details Project details Project name
project_meetings Project meetings Project name
project_participants Project members Project name
search_projects Search by keyword Keyword

Read the full file on GitHub · 217 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. 2d ago First seen · 217 lines · 30 tokens per session scan A 626cf57156b9

Subscribe to this mod's changes

knowledge-graph-manager is an agent published in the GitHub repository kubony/claude-knowledge-graph (48 stars, last pushed 7mo ago), licensed MIT. It adds 30 tokens to every session and 1,337 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.