Skip to main content
Glama
keshrath

agent-knowledge

by keshrath

agent-knowledge

License: MIT Node >= 20 Tests: 563 passing MCP Tools: 6 LongMemEval R@5: 98.8%

Sitzungsübergreifender Speicher und Abruf für KI-Codierungsassistenten -- funktioniert sofort mit Claude Code, Cursor, OpenCode, Cline, Continue.dev und Aider. Git-synchronisierte Wissensdatenbank, hybride semantische+TF-IDF-Suche, automatische Destillation mit Schwärzung von Geheimnissen.

Benchmark: R@5 = 97.2% (sparse) / 98.8% (hybrid) auf longmemeval_s und 86.0% (sparse) / 88.4% (hybrid) auf dem schwierigeren longmemeval_m-Split — das öffentliche akademische Benchmark LongMemEval (Wu et al. 2024, ICLR 2025), volle 500 Fragen pro Split, kein LLM, kein API-Schlüssel, läuft vollständig offline. +8.6pp bis +13.2pp R@5 gegenüber der offiziellen flat-bm25-Basislinie des Papers in einer direkten Reproduktion. Vollständige Tabelle nach Kategorien, Reproduktionsanweisungen und Details zum Paper-Vergleich finden Sie in bench/README.md.

Warum

KI-Codierungssitzungen sind vergänglich. Wenn eine Sitzung endet, ist alles, was sie gelernt hat – Architekturentscheidungen, Debugging-Einblicke, Projektkontext – verloren. Die nächste Sitzung beginnt von Null.

agent-knowledge löst dies mit zwei komplementären Systemen:

  1. Wissensdatenbank – ein git-synchronisierter Markdown-Speicher mit strukturierten Einträgen (Entscheidungen, Arbeitsabläufe, Projektkontext), der über Sitzungen und Maschinen hinweg bestehen bleibt.

  2. Sitzungssuche – TF-IDF-bewertete Volltextsuche über Sitzungstranskripte aller Ihrer Codierungswerkzeuge, sodass Agenten sich daran erinnern können, was zuvor passiert ist – unabhängig davon, welches Werkzeug verwendet wurde.

Related MCP server: Memory-MCP

Unterstützte Werkzeuge

Sitzungen aller gängigen KI-Codierungsassistenten werden automatisch erkannt – wenn ein Werkzeug installiert ist, erscheinen seine Sitzungen automatisch.

Werkzeug

Format

Automatisch erkannter Pfad

Claude Code

JSONL

~/.claude/projects/

Cursor

JSONL

~/.cursor/projects/*/agent-transcripts/

Codex CLI

JSONL

~/.codex/projects/

Aider

Markdown/JSONL

.aider.chat.history.md / .aider.llm.history in Projektverzeichnissen

Continue.dev

JSON

~/.continue/projects/

Cline

JSON

VS Code globalStorage saoudrizwan.claude-dev/tasks/

OpenCode

SQLite

~/.local/share/opencode/opencode.db (oder $OPENCODE_DATA_DIR)

Keine Konfiguration erforderlich. Zusätzliche Sitzungswurzeln können über die Umgebungsvariable AGENT_KNOWLEDGE_EXTRA_SESSION_ROOTS hinzugefügt werden (durch Kommas getrennte Pfade).

Funktionen

  • Host-unabhängige Sitzungssuche -- einheitliche Suche über alle gängigen KI-Codierungsassistenten (Claude Code, Cursor, Codex CLI, Aider, Continue.dev, Cline, OpenCode). Kein Hostname ist in der Konfiguration fest verdrahtet – die Adapter-Registry prüft beim Start installierte Host-Wurzeln.

  • Hybride Suche -- semantische Vektorähnlichkeit kombiniert mit TF-IDF-Keyword-Ranking

  • Git-synchronisierte Wissensdatenbank -- Markdown-Speicher mit YAML-Frontmatter, automatisches Commit und Push bei Schreibvorgängen

  • Automatische Veraltungserkennung -- knowledge_analyze(action: "stale_by_code_activity") kreuzreferenziert Dateipfade, die in jedem Eintragstext erwähnt werden, mit filesModified in aktuellen Sitzungszusammenfassungen. Gepaart mit einer Präzisionsschicht für Symbolpräsenz: Bezeichner, die der Eintrag zitiert (Inline-Backticks + Codeblöcke), werden in der berührten Datei überprüft; wenn sie weiterhin existieren, wird die Konfidenz um ×0,3 herabgestuft. Einträge mit evergreen: true sind ausgenommen.

  • Verfolgung von Suchlücken -- knowledge_analyze(action: "search_gaps") zeigt Null-Ergebnis-Abfragen der letzten since_days, gruppiert nach Token-Jaccard-Ähnlichkeit. Das klarste Signal für „Welche Einträge sollte ich als Nächstes schreiben?".

  • Kontextpacker mit Abschnittspriorität -- knowledge(action: "wakeup") erstellt ein mehrteiliges Bündel (identity → active_tasks → recent_decisions → known_gotchas → last_session_summary → top_weighted → semantic_fallback) innerhalb eines Token-Budgets (Standard 800, überschreibbar über token_budget oder AGENT_KNOWLEDGE_WAKEUP_BUDGET). Nicht genutztes Abschnittsbudget wird auf spätere Abschnitte umverteilt.

  • Bewerteter und abgesicherter Promoter -- Sitzungseinblicke werden über einen gewichteten Bewerter mit 6 Signalen und drei unabhängigen Toren (minScore, minRecallCount, minUniqueQueries) gefördert. Läuft automatisch im Hintergrund, auf Anfrage über knowledge_admin(action: "promote") oder offline testbar über npm run bench:promote. Gibt bei jedem Lauf ein prüfbares .dreams/YYYY-MM-DD.md-Tagebuch aus.

  • Plugbares Adaptersystem -- Unterstützung für neue Werkzeuge durch Implementierung der SessionAdapter-Schnittstelle

  • Embeddings -- lokale (Hugging Face), OpenAI, Claude/Voyage oder Gemini-Anbieter

  • Fuzzy-Matching -- tolerante Suche bei Tippfehlern mittels Levenshtein-Distanz

  • 6 Suchbereiche -- Fehler, Pläne, Konfigurationen, Werkzeuge, Dateien, Entscheidungen

  • 6 MCP-Werkzeuge -- konsolidierte aktionsbasierte Schnittstelle (knowledge, knowledge_search, knowledge_session, knowledge_graph, knowledge_analyze, knowledge_admin)

  • Evergreen-Einträge -- evergreen: true im Frontmatter befreit einen Eintrag vom Verfall im Ranking UND macht ihn unter Promotion nur anhängbar. Das Dashboard zeigt auf diesen Karten ein Pinn-Nadel-Abzeichen.

  • Autorenzuordnung -- optionales author: <string>-Frontmatter erscheint als dezenter Chip auf jeder Karte.

  • Code-Graph-Auflösung -- calls, imports, inherits-Kantentypen für Codestruktur; gerichtete BFS-Traversierung (outbound/inbound/both); bulk_link für effiziente Erfassung; unlink_by_origin zum Löschen veralteter Code-Kanten vor erneuter Erfassung; code:-präfixierte Knoten-IDs unterscheiden Code von Wissen

  • Temporaler Wissensgraph -- Kanten unterstützen valid_from / valid_to-Gültigkeitsfenster; as_of-Abfragen liefern Punkt-in-der-Zeit-Schnappschüsse; invalidate-Aktion markiert Fakten als beendet, ohne sie zu löschen

  • Hybride Bewertungsverstärkungen -- Verstärkungen für Eigennamen und zeitliche Nähe zusätzlich zur TF-IDF + semantischen Mischung, begrenzt auf +66,7%, Kurzschluss, wenn keine Signale vorhanden sind

  • Kategorie als Verstärkung (nicht Filter) -- Opt-in zu category_mode: "boost", sodass eine falsche Kategorievermutung die richtige Antwort herabstuft, anstatt sie zu verwerfen

  • Wörtliche Sitzungsindizierung -- Nachrichten-Chunks (≥30 Zeichen) werden in den Vektorspeicher eingebettet, sodass rohe Konversation abrufbar ist; umschaltbar mit AGENT_KNOWLEDGE_INDEX_VERBATIM=false

  • Konfigurierbare Git-URL -- knowledge_admin(action: "config") für Laufzeit-Setup, gespeichert am XDG/AppData-Speicherort

  • Maschinenübergreifende Persistenz -- Wissen wird über Git synchronisiert, Sitzungen werden aus dem lokalen Speicher jedes Werkzeugs gelesen

  • Echtzeit-Dashboard -- durchsuchen, suchen und verwalten unter localhost:3423

  • Schwärzung von Geheimnissen -- API-Schlüssel, Tokens, Passwörter, private Schlüssel werden vor dem Git-Push automatisch geschwärzt

  • Wissensgraph -- Beziehungskanten zwischen Einträgen (related_to, supersedes, depends_on, contradicts, specializes, part_of, alternative_to, builds_on) mit BFS-Traversierung

  • Konfidenz-/Verfallbewertung -- Einträge werden nach Zugriffshäufigkeit und Aktualität bewertet; automatische Beförderung von Kandidat zu etabliert zu bewährt

  • Speicherkonsolidierung -- TF-IDF-Duplikaterkennung beim Schreiben (warnt vor ähnlichen Einträgen) plus knowledge_analyze(action: "consolidate") für Stapel-Dedup-Scan

  • Reflexionszyklus -- knowledge_analyze(action: "reflect") zeigt unverbundene Einträge und generiert strukturierte Aufforderungen für den Agenten, neue Graphverbindungen zu identifizieren

  • Automatische Verlinkung beim Schreiben -- neue Einträge werden automatisch mit den 3 ähnlichsten vorhandenen Einträgen verlinkt, wenn die Kosinus-Ähnlichkeit > 0,7 ist

  • Konfidenz-Metadaten — Einträge mit extracted (benutzergeschrieben) oder inferred (automatisch destilliert, 0,85× Suchrang-Multiplikator) gekennzeichnet; das Feld confidence_score trägt die Modellsicherheit 0-1

  • Wissensanalyse — knowledge_analyze-Aktionen god_nodes (am stärksten verbundene Einträge), bridges (kategorieübergreifende Verbinder), gaps (isolierte Einträge)

  • Wissenszusammenfassung — knowledge_analyze(action: "brief") gibt eine gecachte Zusammenfassung von ~200 Token zurück (Kernkonzepte, aktive Projekte, aktuelle Entscheidungen, veraltete und Lückenanzahl) für die Orientierung zu Sitzungsbeginn

  • Kantenherkunft — Graphkanten verfolgen origin (manuell, Auto-Link, Destillat, Reflexion), sodass die Analyse Benutzerurteil von automatisierten Heuristiken unterscheiden kann

  • Deterministische Vorextraktion bei der Destillation — Sitzungszusammenfassungen enthalten jetzt Git-Commits, Fehlermuster, aufgerufene URLs und geänderte Pakete, die per Regex aus Bash-/Werkzeugausgabe extrahiert werden (keine LLM-Kosten)

  • Frische-Metadaten bei jedem Suchergebnis — jedes Wissensergebnis trägt freshness: { body_age_days, last_accessed, access_count, verified_at, verification_age_days, evergreen }. Der Agent liest das Vertrauenssignal und entscheidet; wir erlegen keine Richtlinien-Herabstufung auf.

  • Kategoriespezifische Verfallsfenster — der Filter „Unused" und das Bytype-Diagramm berücksichtigen kategoriespezifische Schwellenwerte (Projekte 180d, Personen 365d, Entscheidungen 90d, Arbeitsabläufe 60d, Notizen 30d), sodass identitätsgeprägte Inhalte nicht nur deshalb veraltet aussehen, weil sie nicht wöchentlich erneut gelesen werden.

  • Lebenszyklus-Hooks — SessionStart Auto-Wakeup + Erfassungs-Frischeprüfung, UserPromptSubmit gezielte Injektion beim ersten Prompt, PreCompact Speicher-Leerungs-Hinweis + Destillat, SessionEnd Destillat. Insgesamt sechs Hook-Skripte, alle fail-open, jedes über eine AGENT_KNOWLEDGE_*-Umgebungsvariable umschaltbar. Siehe docs/HOOKS.md.

  • Ersetzt Host-Auto-Speicher — auf Hosts mit einem Sitzungsspeichersystem (Claude Codes ~/.claude/projects/*/memory/, ähnlich in anderen IDEs) leiten Sie dauerhafte Benutzerfakten und Feedback stattdessen an agent-knowledge weiter. Auto-Speicher ist maschinenlokal und für andere Maschinen unsichtbar; agent-knowledge ist git-synchronisiert, maschinenübergreifend, durchsuchbar und erscheint im Wakeup. Siehe den Claude-Code-Integrationshinweis in docs/USER-MANUAL.md.

Codebasis-Erfassung

Die knowledge-ingest-Fähigkeit befüllt oder aktualisiert die Wissensdatenbank aus einem Codebasis-Verzeichnis. Sie verwendet tree-sitter für die strukturelle Extraktion ohne Token (Klassen, Funktionen, Importe, Aufrufgraphen, Begründungskommentare), gruppiert dann Dateien in Subsysteme und erstellt Wissenseinträge + Graphkanten über vorhandene MCP-Werkzeuge. Nachfolgende Läufe sind inkrementell – nur geänderte Dateien werden erneut verarbeitet.

/knowledge-ingest ./my-project

Verwendet den Agent Skills Standard – funktioniert mit Claude Code, OpenCode, Cursor, Codex CLI und Gemini CLI. Einzelheiten finden Sie im Erfassungsleitfaden.

Unterstützte Sprachen: TypeScript, JavaScript, Python, Go, Rust, Java, C, C++.

Schnellstart

Installation über npm

npm install -g agent-knowledge

Oder aus dem Quellcode klonen

git clone https://github.com/keshrath/agent-knowledge.git
cd agent-knowledge
npm install && npm run build

Option 1: MCP-Server (für KI-Agenten)

Fügen Sie dies zu Ihrer MCP-Client-Konfiguration hinzu (Claude Code, Cline usw.):

{
  "mcpServers": {
    "agent-knowledge": {
      "command": "npx",
      "args": ["agent-knowledge"]
    }
  }
}

Das Dashboard startet automatisch unter http://localhost:3423 bei der ersten MCP-Verbindung.

Siehe Einrichtungsleitfaden für clientspezifische Anweisungen (Claude Code, Cursor, Windsurf, OpenCode).

Option 2: Eigenständiger Server (für REST/WebSocket-Clients)

node dist/server.js --port 3423

MCP-Werkzeuge (6)

Wissensdatenbank

Tool

Aktion

Beschreibung

Parameter

knowledge

list

Einträge nach Kategorie und/oder Tag auflisten

category?, tag?

read

Einen bestimmten Eintrag lesen

path (erforderlich)

write

Eintrag erstellen/aktualisieren (automatische Git-Synchronisierung)

category, filename, content (alle erforderlich)

delete

Eintrag löschen (automatische Git-Synchronisierung)

path (erforderlich)

sync

Manuelles Git pull + push

--

wakeup

L0-Identität + L1-Einträge mit höchster Gewichtung zurückgeben (token-budgetiert)

token_budget?, category?

Suche

Tool

Beschreibung

Parameter

knowledge_search

Allgemeine hybride TF-IDF + semantische Suche (ohne scope)

query, project?, role?, max_results?, ranked?, semantic?, category?, category_mode?, mmr?, mmr_lambda?, explain?

Eingeschränkter sitzungsbezogener Abruf (wenn scope gesetzt)

query, scope, project?, max_results?

Antwortformat: {mode: "general" \| "scoped", sessions, knowledge}. Der eingeschränkte Modus gibt per Design knowledge: [] zurück.

Bereiche (scopes): errors, plans, configs, tools, files, decisions, all.

Suchoptionen:

  • mmr: true wendet ein Maximal-Marginal-Relevance-Reranking an (entfernt nahezu doppelte Cluster in den Top-K). mmr_lambda 0-1, Standard 0.7.

  • category_mode: "boost" (Standard) gibt Einträgen mit passender Kategorie einen 1,25-fachen Score-Multiplikator, anstatt Nicht-Übereinstimmungen zu verwerfen. Übergeben Sie "filter" für ein striktes Filterverhalten.

  • explain: true fügt jedem Wissens-Treffer score_components: {bm25, decay, maturity, confidence, category_boost, mmr_penalty} hinzu.

Sitzungen

Tool

Aktion

Beschreibung

Parameter

knowledge_session

list

Sitzungen mit Metadaten auflisten

project?

get

Vollständige Sitzungskonversation abrufen

session_id, project?, include_tools?, tail?

summary

Sitzungszusammenfassung (Themen, Tools, Dateien)

session_id, project?

Wissensgraph

Tool

Aktion

Beschreibung

Parameter

knowledge_graph

link

Kante zwischen Einträgen erstellen/aktualisieren

source, target, rel_type, strength?

unlink

Kanten zwischen Einträgen entfernen

source, target, rel_type?

invalidate

Kanten als abgelaufen markieren (valid_to setzen)

source, target, rel_type?, valid_to?

list

Kanten auflisten

entry?, rel_type?, as_of?

traverse

Gerichtete BFS-Traversierung ab einem Eintrag

entry, depth?, direction?, rel_type?, as_of?

bulk_link

Kanten in Stapelverarbeitung erstellen (Code-Graph-Erfassung)

edges (Array aus {source, target, rel_type, strength?, origin?})

unlink_by_origin

Alle Kanten nach Ursprung löschen

origin

Wissenstypen: related_to, supersedes, depends_on, contradicts, specializes, part_of, alternative_to, builds_on Codestrukturtypen: calls, imports, inherits

Traversierungsrichtungen: outbound (Quelle→Ziel), inbound (Ziel→Quelle), both (Standard, ungerichtet)

Analyse

Tool

Aktion

Beschreibung

Parameter

knowledge_analyze

consolidate

Nahezu doppelte Einträge finden

category?, threshold?

reflect

Unverbundene Einträge zum Verknüpfen finden

category?, max_entries?

god_nodes

Am stärksten verbundene Einträge (Grad-Zentralität)

top_n?

bridges

Kategorieübergreifende Verbinder (Betweenness)

top_n?

gaps

Isolierte Einträge (0-1 Kanten) nach Reife

max_entries?

brief

Zwischengespeicherte Zusammenfassung der Wissensbasis (~200 Token)

--

Verwaltung

Tool

Aktion

Beschreibung

Parameter

knowledge_admin

status

Vektor-Store-Statistiken

--

config

Konfiguration anzeigen oder aktualisieren

git_url?, memory_dir?, auto_distill?

rebuild_embeddings

Alle Wissenseinträge neu einbetten (nützlich bei Anbieterwechsel)

--

prune_orphans

Einbettungen für nicht mehr auf der Festplatte vorhandene Sitzungen löschen

vacuum?, force_vacuum?

vacuum

Freie Seiten im Vektor-Store zurückgewinnen

--

promote

Bewerteter und mit Schwellenwerten versehener Promoter

promote_mode? (apply|explain), min_score?, min_recall_count?, min_unique_queries?

Bewerteter Promoter

Jeder projektbezogene Kandidat wird anhand von sechs Signalen bewertet (Relevanz 0,30, Häufigkeit 0,24, Abfragevielfalt 0,15, Aktualität 0,15, Konsolidierung 0,10, konzeptioneller Reichtum 0,06) und anhand von minScore ≥ 0,5, minRecallCount ≥ 2, minUniqueQueries ≥ 2 geprüft. Alle drei Schwellenwerte müssen erfüllt sein. Die automatische Promotion im Hintergrund wird über dasselbe Konfigurationsflag auto_distill gesteuert; bei Bedarf mit knowledge_admin(action: "promote") aufrufen.

  • promote_mode: "explain" (Standard) — Kandidaten bewerten + prüfen, Tagebuch schreiben, Wissensbasis NICHT verändern.

  • promote_mode: "apply" — Kandidaten, die die Prüfung bestehen, promoten, Tagebuch schreiben, Git-Commit erstellen.

  • Jeder Lauf schreibt ~/agent-knowledge/.dreams/YYYY-MM-DD.md mit Signalaufschlüsselungen und Prüfergebnissen pro Kandidat. Das mit . beginnende Verzeichnis ist git-verfolgt, aber von Liste/Suche ausgeschlossen.

  • Fundierte Rehydrierung: Ein Kandidat wird übersprungen, wenn seine Quellsitzungsdatei nicht mehr auf der Festplatte vorhanden ist (verhindert das Promoten gelöschter Inhalte).

  • Einträge mit evergreen: true-Frontmatter werden durch Promotion nie überschrieben — Aktivität wird angehängt.

Write-Bench-Testumgebung: npm run bench:promote — Offline-Wiedergabe mit automatischer Beschriftung durch „in späteren Sitzungen referenziert". Vergleicht den geprüften Promoter mit einer naiven „alles veröffentlichen"-Basislinie und berichtet Präzision / Recall / F1. Verwenden Sie dies, um Signalgewichtungs- oder Schwellenwertänderungen zu prüfen, bevor Sie sie ausrollen.

REST-API

Methode

Endpunkt

Beschreibung

GET

/api/knowledge

Wissenseinträge auflisten

GET

/api/knowledge/search?q=

Wissensbasis durchsuchen

GET

/api/knowledge/:path

Einen bestimmten Eintrag lesen

GET

/api/knowledge/god-nodes?top_n=

Am stärksten verbundene Einträge

GET

/api/knowledge/bridges?top_n=

Kategorieübergreifende Verbinder

GET

/api/knowledge/gaps?max_entries=

Isolierte Einträge

GET

/api/knowledge/brief

Kurzübersicht der Wissensbasis

GET

/api/sessions

Sitzungen auflisten

GET

/api/sessions/search?q=&role=&ranked=

Sitzungen durchsuchen (TF-IDF)

GET

/api/sessions/recall?scope=&q=

Eingeschränkter Abruf

GET

/api/sessions/:id

Eine Sitzung lesen

GET

/api/sessions/:id/summary

Sitzungszusammenfassung

POST

/api/knowledge

Eintrag schreiben (HTTP-Clients)

GET

/health

Gesundheitsprüfung

Architektur

graph LR
    subgraph Storage
        KB[(Knowledge Base<br/>~/agent-knowledge<br/>Git Repository)]
    end

    subgraph Session Sources
        CC[(Claude Code<br/>JSONL)]
        CU[(Cursor<br/>JSONL)]
        OC[(OpenCode<br/>SQLite)]
        CL[(Cline<br/>JSON)]
        CD[(Continue.dev<br/>JSON)]
        AI[(Aider<br/>MD / JSONL)]
    end

    subgraph agent-knowledge
        KM[Knowledge Module<br/>store / search / git]
        AD[Session Adapters<br/>auto-discovery]
        SE[Search Engine<br/>TF-IDF + Fuzzy]
        DS[Dashboard<br/>:3423]
        MCP[MCP Server<br/>stdio]
    end

    subgraph Clients
        AG[Agent Sessions]
        WB[Web Browser]
    end

    KB <-->|git pull/push| KM
    CC --> AD
    CU --> AD
    OC --> AD
    CL --> AD
    CD --> AD
    AI --> AD
    AD --> SE
    KM --> MCP
    SE --> MCP
    KM --> DS
    SE --> DS
    MCP --> AG
    DS --> WB

Wissensgraph

Einträge und Codesymbole können über typisierte, gewichtete Kanten verbunden werden, die in einer dedizierten edges-SQLite-Tabelle gespeichert sind. Elf Beziehungstypen werden unterstützt — 8 für Wissenskanten und 3 für Codestruktur:

Wissen: related_to, supersedes, depends_on, contradicts, specializes, part_of, alternative_to, builds_on Codestruktur: calls, imports, inherits

  • knowledge_graph(action: "link") erstellt oder aktualisiert eine Kante (mit optionaler Stärke 0-1)

  • knowledge_graph(action: "unlink") entfernt Kanten (optional nach Typ gefiltert)

  • knowledge_graph(action: "list") listet Kanten für einen Eintrag oder Beziehungstyp auf

  • knowledge_graph(action: "traverse") führt eine gerichtete BFS-Traversierung ab einem Starteintrag durch. Unterstützt direction (outbound, inbound, both) und rel_type-Filter

  • knowledge_graph(action: "bulk_link") erstellt Kanten in Stapelverarbeitung in einer einzigen Transaktion (für die Code-Graph-Erfassung)

  • knowledge_graph(action: "unlink_by_origin") löscht alle Kanten mit einem bestimmten Ursprung (zum Löschen veralteter Code-Kanten vor der erneuten Erfassung)

Code-Graph

Codestruktur-Kanten werden von der knowledge-ingest-Fähigkeit während der Codebasis-Erfassung erstellt. Sie verwenden Knoten-IDs mit code:-Präfix:

code:src/auth/middleware.ts                    # file node
code:src/auth/middleware.ts::validateToken      # symbol node

Abfragebeispiele:

# Who calls validateToken?
knowledge_graph({ action: "traverse", entry: "code:src/auth.ts::validateToken", direction: "inbound", rel_type: "calls", depth: 3 })

# What breaks if I change this function?
knowledge_graph({ action: "traverse", entry: "code:src/auth.ts::validateToken", direction: "inbound", rel_type: "calls", depth: 5 })

# Combined: callers + knowledge context (decisions, design rationale)
knowledge_graph({ action: "traverse", entry: "code:src/auth.ts::validateToken", depth: 2 })

Automatische Verknüpfung

Wenn knowledge mit action: "write" einen Eintrag erstellt oder aktualisiert, findet es automatisch die 3 ähnlichsten vorhandenen Einträge über Kosinus-Ähnlichkeit und erstellt related_to-Kanten für jedes Paar mit einem Wert über 0,7.

Konfidenz- & Abkling-Bewertung

Jeder Wissenseintrag hat einen Konfidenzwert, der in der entry_scores-SQLite-Tabelle verfolgt wird. Suchergebnisse werden wie folgt eingestuft:

finalScore = baseRelevance * 0.5^(daysSinceLastAccess / 90) * maturityMultiplier

Einträge reifen automatisch basierend auf der Zugriffszahl:

Stufe

Zugriffe

Multiplikator

candidate

< 5

0.5x

established

5-19

1.0x

proven

20+

1.5x

Häufig aufgerufene Einträge steigen im Suchranking; veraltete Einträge verlieren mit der Zeit an Gewicht.

Suchfunktionen

TF-IDF-Ranking -- Ergebnisse werden nach Term Frequency-Inverse Document Frequency bewertet. Seltene Begriffe erhöhen die Relevanz. Globaler Index wird 60 Sekunden lang zwischengespeichert.

Fuzzy-Matching -- Levenshtein-Editierdistanz mit gleitendem Fenster. Konfigurierbarer Schwellenwert (Standard 0,7).

Bereichsbezogener Abruf über knowledge_search mit dem Parameter scope:

Bereich

Treffer

errors

Stack-Traces, Ausnahmen, fehlgeschlagene Befehle

plans

Architektur, TODOs, Implementierungsschritte

configs

Einstellungen, Umgebungsvariablen, Konfigurationsdateien

tools

MCP-Tool-Aufrufe, CLI-Befehle

files

Dateipfade, Änderungen

decisions

Abwägungen, Begründungen, Entscheidungen

Integrationen

REST-Schreib-Endpunkt

POST /api/knowledge akzeptiert { category, filename, content } und führt die vollständige Schreib-Pipeline aus: git pull → Datei schreiben → Einbettungsindex → Auto-Link → git push → Duplikatprüfung. Gibt { path, autoLinks?, duplicateWarnings?, git } mit Status 201 zurück.

Dies ermöglicht HTTP-basierte Schreibvorgänge von anderen Diensten ohne MCP-Verbindung.

agent-tasks KnowledgeBridge

agent-tasks verfügt über eine eingebaute KnowledgeBridge, die bei Aufgabenabschluss automatisch learning- und decision-Artefakte an agent-knowledge überträgt. Einträge landen in decisions/ mit Frontmatter-Tags (agent-tasks, Projektname, Artefakttyp), werden automatisch mit Einbettungen indiziert und automatisch mit ähnlichen Einträgen verlinkt. Keine Konfiguration erforderlich — wenn agent-knowledge unter localhost:3423 läuft, funktioniert es.

Tests

npm test              # 563 tests across 35 files
npm run test:watch    # Watch mode
npm run lint          # ESLint on src/ and tests/
npm run typecheck     # tsc --noEmit
npm run check         # typecheck + lint + format + test

Umgebungsvariablen

Alle Umgebungsvariablen stehen unter dem Präfix AGENT_KNOWLEDGE_*. Kein Hostname ist fest verdrahtet — die Adapter-Registry erkennt installierte KI-Coding-Hosts automatisch (.claude, .cursor, .codex, .aider, .continue, OpenCode) ohne Konfiguration.

Kern

Variable

Standard

Beschreibung

AGENT_KNOWLEDGE_MEMORY_DIR

~/agent-knowledge

Git-synchronisiertes Wissensbasis-Verzeichnis

AGENT_KNOWLEDGE_GIT_URL

--

Git-Remote-URL (automatisches Klonen, wenn das Verzeichnis fehlt)

AGENT_KNOWLEDGE_AUTO_DISTILL

true

Sitzungserkenntnisse automatisch in die Wissensbasis destillieren

AGENT_KNOWLEDGE_INDEX_VERBATIM

true

Rohe Sitzungsnachrichten-Blöcke in den Vektor-Store indizieren, damit die Konversation später abrufbar ist. Setzen Sie false, um bei großem Umfang Speicherplatz zu sparen.

AGENT_KNOWLEDGE_DATA_DIR

(Plattformkonfiguration)

Primären Host-Datenstamm überschreiben. Im Normalfall ungesetzt lassen — Adapter erkennen automatisch alle bekannten Host-Stämme unter ~/.

AGENT_KNOWLEDGE_EXTRA_SESSION_ROOTS

--

Zusätzliche Sitzungsverzeichnisse, durch Kommas getrennt. Werden zu dem hinzugefügt, was die automatische Erkennung findet.

AGENT_KNOWLEDGE_PORT

3423

Dashboard-HTTP/WebSocket-Port

Einbettungen

Variable

Standard

Beschreibung

AGENT_KNOWLEDGE_EMBEDDING_PROVIDER

local

local | openai | claude | gemini

AGENT_KNOWLEDGE_EMBEDDING_ALPHA

0.3

TF-IDF- vs. semantischer Mischungsfaktor (0 = rein semantisch, 1 = reines TF-IDF)

AGENT_KNOWLEDGE_EMBEDDING_MODEL

--

Standardmodell des Anbieters überschreiben

AGENT_KNOWLEDGE_EMBEDDING_IDLE_TIMEOUT

60

Sekunden bis zum Entladen des lokalen Modells (0 = geladen lassen)

AGENT_KNOWLEDGE_EMBEDDING_THREADS

(automatisch)

ONNX-/OMP-Thread-Anzahl für den lokalen Anbieter

API-Schlüssel

Projektbezogene Überschreibungen haben Vorrang vor den Standard-Schlüsseln. Setzen Sie einen von beiden; die projektbezogene Form ermöglicht es, agent-knowledge mit einem anderen Schlüssel auszuführen als den Rest Ihrer Umgebung.

Variable

Fallback

Beschreibung

AGENT_KNOWLEDGE_OPENAI_API_KEY

OPENAI_API_KEY

OpenAI-Einbettungen

AGENT_KNOWLEDGE_ANTHROPIC_API_KEY

ANTHROPIC_API_KEY

Claude-/Voyage-Einbettungen

AGENT_KNOWLEDGE_GEMINI_API_KEY

GEMINI_API_KEY

Gemini-Einbettungen

Hooks

Variable

Standard

Beschreibung

AGENT_KNOWLEDGE_AUTOWAKE

1

Automatisch ein knowledge(action: wakeup)-Bundle in SessionStart injizieren. Auf 0 setzen, um zu deaktivieren.

AGENT_KNOWLEDGE_WAKEUP_BUDGET

800

Tokens für das Wakeup-Bundle

AGENT_KNOWLEDGE_FIRSTPROMPT_INJECT

1

Eine gezielte knowledge_search beim ersten Benutzer-Prompt ausführen und die besten Treffer injizieren. 0 / false / off zum Deaktivieren.

AGENT_KNOWLEDGE_FIRSTPROMPT_BUDGET

600

Tokens für die First-Prompt-Injektion (Begrenzung [100, 8000])

AGENT_KNOWLEDGE_FIRSTPROMPT_MAX_HITS

4

Maximale Wissens-Treffer, die dem ersten Prompt angehängt werden (Begrenzung [1, 20])

AGENT_KNOWLEDGE_PRECOMPACT_NUDGE

1

Vor der Vorkompaktierung den Agenten dazu anregen, Kontext über knowledge(action: write) zu speichern. 0 deaktiviert die Anregung; off unterdrückt sowohl Anregung als auch Festplatten-Dump.

Externe Tool-Überschreibungen

Variable

Standard

Beschreibung

OPENCODE_DATA_DIR

~/.local/share/opencode

Überschreiben, wo OpenCodes Sitzungsdatenbank liegt (OpenCodes eigene Umgebungsvariable, von unserem Adapter berücksichtigt)

Dokumentation

  • Setup-Guide — Installation, Client-Einrichtung (Claude Code, OpenCode, Cursor, Windsurf), Hooks, Skills

  • Ingestions-Guide — Codebase-Ingestions-Skill, tree-sitter-Extraktion, inkrementelle Updates

  • Architektur — Quellstruktur, Designprinzipien, Datenbankschema

  • Dashboard — Web-UI-Ansichten und Funktionen

  • Changelog

Lizenz

MIT

Available Tools

6 tools
knowledgeA

Knowledge base CRUD, sync, and session-start hydration. Actions: "list" (browse entries), "read" (get entry content), "write" (create/update entry, auto git sync), "delete" (remove entry, auto git sync), "sync" (manual git pull + push), "wakeup" (return token-budgeted section-priority context bundle — identity, active_tasks, recent_decisions, known_gotchas, last_session_summary, top_weighted, semantic_fallback — call once at session start).

ParametersJSON Schema
NameRequiredDescriptionDefault
tagNoFilter by tag (action=list)
pathNoRelative path to the entry, e.g. 'projects/my-project.md' (action=read, delete)
actionYesAction to perform
contentNoFull markdown content for the entry (action=write)
categoryNoCategory (action=list: filter; action=write: target directory). One of: projects, people, decisions, workflows, notes
filenameNoFilename with or without .md extension (action=write), e.g. 'my-project.md'
sectionsNo[wakeup] Comma-separated, ordered section list. Valid: identity, active_tasks, recent_decisions, known_gotchas, last_session_summary, top_weighted, semantic_fallback. Default: all seven in that order. Omit to preserve v1.8.0 behaviour.
token_budgetNo[wakeup] Max tokens to render (chars/4 estimate, default 800)
section_budgetsNo[wakeup] Per-section token-budget overrides, e.g. {"identity": 200, "top_weighted": 400}. Unspecified sections split the remainder evenly. Unused budget redistributes to later sections.

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden — and it does disclose meaningful side effects: write/delete trigger auto git sync, sync is a manual git pull+push, and wakeup returns a token-budgeted section-priority bundle. This is solid disclosure for a mutation-capable tool; it only omits reversibility (e.g., whether delete is recoverable from git history) and confirmation behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the content is dense and informative, but it is presented as one long run-on sentence without line breaks or structural separation, making the six actions and their caveats harder to parse at a glance. Fewer words could be used; the parentheticals are useful but poorly delimited.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-complexity tool (9 params, 6 actions, enums, nested objects) with no output schema, the description explains wakeup's return bundle but not the return values for the other five actions (e.g., what list returns, what read returns on success/failure). The schema covers parameter semantics well, but the absence of output descriptions for the remaining actions leaves gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the input schema already documents all nine parameters with action-scoped descriptions. The description adds value on top by explaining wakeup semantics — section ordering, defaults, budget behavior — but does not substantially enrich the other parameters beyond what the schema states. A baseline of 3 is appropriate given the high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear purpose ('Knowledge base CRUD, sync, and session-start hydration') and enumerates six concrete actions with brief one-line definitions. It implicitly distinguishes from siblings (search, graph, analyze) by being the CRUD/sync/wakeup orchestrator, though it never names the siblings or their differing responsibilities explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is conveyed per-action ('call once at session start' for wakeup, 'auto git sync' for write/delete) and the verb definitions imply when each is appropriate. However, with five siblings present, there is no explicit when-to-use-versus-alternative guidance (e.g., when to prefer knowledge_search over this tool's list action), and no exclusions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge_adminB

Admin operations: view vector store stats, view/update configuration, rebuild embeddings, prune orphan session embeddings, or VACUUM the database. Use action "status" for index stats, "config" to view or update settings, "rebuild_embeddings" to re-embed all knowledge entries (useful when switching providers), "prune_orphans" to delete embeddings for sessions no longer present on disk, "vacuum" to reclaim free pages.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesAction: status (vector store stats), config (view/update settings), rebuild_embeddings (re-embed all entries), prune_orphans (delete embeddings for missing sessions), vacuum (reclaim free pages), promote (run the scored promoter — see promote_mode)
vacuumNoRun VACUUM after pruning (action=prune_orphans, default true)
git_urlNoGit remote URL (action=config). Set to empty string to remove.
min_scoreNo[promote] Minimum composite score to promote (default: 0.5).
memory_dirNoLocal knowledge base directory (action=config). Empty to reset.
auto_distillNoEnable/disable scheduled promotion (action=config)
force_vacuumNoRun VACUUM even if no orphans were pruned (action=prune_orphans)
promote_modeNoaction=promote mode (default: explain). "explain" returns score breakdowns without writing; "apply" promotes candidates that pass all gates.
min_recall_countNo[promote] Minimum recall count gate (default: 2).
min_unique_queriesNo[promote] Minimum unique-query gate (default: 2).

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does disclose destructive effects for prune_orphans ('delete embeddings') and vacuum ('reclaim free pages'). However, it understates rebuild_embeddings' destructive rewriting of existing embeddings, and it completely omits the 'promote' action's behavior (apply vs explain modes, write behavior vs read-only). For a tool with several destructive operations, the disclosure is partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core operations are front-loaded in the opening sentence, with each action's purpose expanded in a single subsequent sentence. The structure is efficient and scannable. Minor deduction for the slightly run-on single-sentence expansion and for leaving out promote, which makes the list feel incomplete rather than intentionally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex admin tool with 10 parameters, 6 actions, no output schema, and no annotations, the description should be comprehensive — but it covers only 5 of 6 actions and omits the entire promote workflow with its 4 dedicated parameters (promote_mode, min_score, min_recall_count, min_unique_queries). An agent reading only the description would never learn a whole callable mode exists, which is a significant completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all 10 parameters, giving a baseline of 3. The description adds marginal value by linking rebuild_embeddings to the provider-switching use case, but it adds no semantics beyond the schema for the config params (git_url, memory_dir, auto_distill) and leaves the promote-related parameters entirely unexplained in prose despite them being a substantial cluster of the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear purpose — administrative operations on the knowledge/vector store — and enumerates five concrete actions (status, config, rebuild_embeddings, prune_orphans, vacuum) with their effects. It clearly distinguishes itself from the read/search siblings. However, it silently omits the 'promote' action that exists in the schema enum, and the umbrella phrase 'Admin operations' is vague until the action list clarifies it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives actionable when-to-use context for rebuild_embeddings ('useful when switching providers') and explains what each action accomplishes, which implicitly routes the agent to the right action. But it provides no guidance for the 'promote' action (its dedicated params min_score, min_recall_count, min_unique_queries, promote_mode are never narrated), and it never states when NOT to use the tool or how it differs from siblings beyond 'admin' framing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge_analyzeA

Analysis tools: find duplicates, unconnected entries, most-connected concepts (god nodes), bridge entries, knowledge gaps, zero-result search queries, stale-by-code-activity entries, or generate a compact knowledge brief. Actions: consolidate, reflect, god_nodes, bridges, gaps, brief, search_gaps, stale_by_code_activity.

ParametersJSON Schema
NameRequiredDescriptionDefault
top_nNoNumber of results (action=god_nodes default: 10, action=bridges default: 5)
actionYesAction: consolidate (find duplicates), reflect (find unconnected entries), god_nodes (most-connected entries), bridges (cross-cluster connectors), gaps (entries with 0-1 edges), brief (compact knowledge base summary), search_gaps (zero-result knowledge_search queries grouped by similarity — the single best signal for "what entries should I write next?"), stale_by_code_activity (entries whose referenced file paths were modified in recent sessions after the entry body was last edited — automatic staleness signal, v1.8.1).
categoryNoScan only this category (omit for all)
min_countNo[search_gaps] Minimum occurrence count per merged group (default: 1). Raise to surface only repeated misses.
thresholdNoSimilarity threshold 0-1 (action=consolidate, default: 0.5)
since_daysNo[search_gaps] Lookback window in days (default: 30). Only queries logged within this window are considered.
max_entriesNoMax unconnected entries to include (action=reflect, default: 20)
group_similarityNo[search_gaps] Jaccard token similarity threshold for merging near-duplicate queries (default: 0.35, range 0-1). Low because short queries yield low Jaccard even when topically related.
min_touching_sessionsNo[stale_by_code_activity] Minimum distinct sessions that must have modified one of the entry's referenced files for it to be flagged (default: 1).

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description bears the full disclosure burden, yet it is internally contradictory on the consolidate action: the verb implies merging/mutation while the gloss '(find duplicates)' implies read-only discovery. There is no statement about whether any action mutates entries, what output shape results, or performance implications — a real gap for a multi-action analysis tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence and the whole description runs roughly 60 words with no filler. The trailing 'Actions:' enumeration is partially redundant with the schema enum but serves as a useful name→semantic mapping, earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex tool — 9 parameters, 8 actions, no output schema, no annotations. All action semantics are enumerated, but the description is silent on per-action return formats and on whether any action (notably consolidate) has side effects, both material for an analysis surface of this breadth.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema's parameter descriptions are unusually rich (per-action defaults, the Jaccard rationale for group_similarity, min_count semantics). The tool description adds little beyond re-listing action names, so the schema-carrying baseline of 3 is correct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description enumerates eight distinct analyses with denotative glosses (duplicates, unconnected entries, god nodes, bridges, gaps, zero-result queries, stale-by-code-activity, brief), clearly binding the tool to knowledge-base entry analysis. This differentiates it from siblings like knowledge_search (querying) and knowledge_admin (admin actions) without needing to open a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each action carries clear context, e.g., 'gaps (entries with 0-1 edges)', 'bridges (cross-cluster connectors)', and search_gaps is explicitly framed as 'the single best signal for what entries should I write next?'. Missing, however, are explicit when-not or alternative statements that route selection against sibling tools at the tool level.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge_graphB

Knowledge graph operations with temporal validity and code structure support. Create/remove edges, traverse via directed BFS, bulk-import code graph edges. Relationship types: related_to, supersedes, depends_on, contradicts, specializes, part_of, alternative_to, builds_on, calls, imports, inherits. Code structure types (calls/imports/inherits) are created by knowledge-ingest and use "code:" prefixed node IDs.

ParametersJSON Schema
NameRequiredDescriptionDefault
as_ofNoISO date — only return edges valid at this date (action=list/traverse, optional)
depthNoMax traversal depth in hops (action=traverse, default: 2)
edgesNoArray of edges to create (action=bulk_link). Each: { source, target, rel_type, strength?, origin? }
entryNoEntry path for filtering (action=list) or BFS start (action=traverse)
actionYesAction: link (create edge), unlink (remove edge), invalidate (set valid_to), list (list edges), traverse (directed BFS), bulk_link (batch-create edges), unlink_by_origin (delete all edges from a specific origin)
originNoEdge origin to delete (action=unlink_by_origin). E.g. "tree-sitter" to clear code graph before re-ingest.
sourceNoSource entry path (action=link/unlink/invalidate), e.g. 'projects/my-project.md'
targetNoTarget entry path (action=link/unlink/invalidate), e.g. 'decisions/architecture.md'
rel_typeNoRelationship type (required for link, optional filter for unlink/invalidate/list)
strengthNoEdge strength 0-1 (action=link, default: 0.5)
valid_toNoISO date the fact stopped being true (action=link/invalidate). For invalidate, defaults to today.
directionNoTraversal direction (action=traverse, default: both). outbound: follow source→target (what does X call?). inbound: follow target→source (who calls X?). both: undirected (default, preserves legacy behavior).
valid_fromNoISO date the fact became true (action=link, optional). Null/omitted = unbounded.

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. It discloses temporal validity and that code structure edges are created by knowledge-ingest, which is useful. However, it does not warn about destructive side effects of unlink/invalidate or the scope of bulk operations, leaving behavioral uncertainty.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise, using three sentences to cover operations, relationship types, and code structure nuance. It could tighten by omitting the redundant relationship list from the enum, but it remains front-loaded and readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema is present, and the description does not describe return values for actions like list or traverse. It also omits details about state mutations (e.g., irreversibility of unlink). Given the tool's complexity and no annotations, this is a significant gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds minimal value: it re-lists relationship types (already in the enum) and notes the 'code:' prefix for node IDs. It does not explain parameter interactions beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs knowledge graph operations: create/remove edges, traverse via BFS, bulk-import code edges. It also lists relationship types and code structure specifics. However, it does not explicitly contrast with sibling tools like knowledge_search or knowledge_analyze, so differentiation relies on the implicit 'graph' focus.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus siblings. It does not mention when not to use it, nor does it reference alternative tools. The code structure note implies a use case, but there is no clear routing or exclusion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

knowledge_sessionA

Session operations: list sessions, get a full conversation, or get a summary. Use action "list" to browse sessions, "get" to retrieve messages, "summary" for a quick overview.

ParametersJSON Schema
NameRequiredDescriptionDefault
tailNoOnly return the last N messages (action=get)
limitNoMax sessions to return (action=list, default: 20, max: 500)
actionYesAction to perform
offsetNoSkip first N sessions (action=list, default: 0)
projectNoFilter by project name (substring match)
session_idNoSession UUID (required for get, summary)
include_toolsNoInclude tool_use and tool_result messages (action=get, default: false)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility for behavioral disclosure. It states the actions but does not mention whether operations are read-only, side effects, required permissions, error behavior (e.g., invalid session_id), or any rate limits. For a tool with three read-like actions, this is a notable gap; the agent is left to infer safety and failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with zero waste. It front-loads the core concept 'Session operations' and immediately explains the three actions. Every sentence contributes to understanding the tool, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description provides enough to invoke the tool correctly for the three actions, but it omits the response format entirely. Since there is no output schema, the agent is unaware of what each action returns (e.g., list returns an array, get returns messages). For a multi-action tool, this is a moderate gap, though the actions are simple enough that an agent might infer typical behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All seven parameters are fully described in the schema (100% coverage), so the schema carries the heavy lifting. The description adds context for how the action parameter drives behavior (list vs get vs summary) and clarifies the purpose of some parameters indirectly (e.g., tail for get, limit for list), but it does not add new semantic detail beyond the schema. This aligns with the coverage baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Session operations: list sessions, get a full conversation, or get a summary.' It identifies three distinct actions (list, get, summary) and explicitly differentiates from sibling tools by focusing on session operations, which none of the sibling names (knowledge, knowledge_search, knowledge_admin, knowledge_graph, knowledge_analyze) cover.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides per-action guidance: 'Use action list to browse sessions, get to retrieve messages, summary for a quick overview.' This clarifies when to use each action, but it does not mention when to favor this tool over siblings such as knowledge_search or knowledge_analyze. There is no explicit exclusion or alternative routing at the tool level, though the action-level guidance is useful.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv1.9.7
    • First observedknowledge
    • First observedknowledge_admin
    • First observedknowledge_analyze
    • First observedknowledge_graph
    • First observedknowledge_search
    • First observedknowledge_session

TDQS

A3.9/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct functional domain: CRUD operations, cross-source search, session management, admin/maintenance, graph relationships, and analysis/insights. The action-based sub-operations are clearly scoped, and there is no meaningful overlap between tools.

Naming Consistency5/5

All tool names follow the consistent pattern `knowledge_<verb_noun>` using snake_case throughout. The naming convention is uniform, with descriptive suffixes (search, session, admin, graph, analyze) that clearly differentiate purposes.

Tool Count5/5

Six tools is an ideal count for a knowledge-management server. Each tool encapsulates a distinct set of related operations (CRUD, search, sessions, admin, graph, analysis), providing comprehensive functionality without overwhelming the agent.

Completeness5/5

The toolset covers the full lifecycle of a knowledge base: creating/reading/updating/deleting entries, searching across sessions and entries, managing session history, performing administrative tasks (embeddings, vacuum), maintaining knowledge graph relationships, and deriving analytical insights. No obvious gaps exist; even advanced features like bulk graph import and orphan pruning are included.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides persistent memory for AI coding assistants, storing and retrieving architectural decisions, patterns, and solutions across sessions using semantic search, while also offering git integration for commit messages and code expertise mapping.
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides persistent memory for AI agents using hybrid search (vector embeddings + BM25) with neural reranking, enabling storage and retrieval of insights, debugging solutions, and patterns across coding sessions.
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI coding assistants with persistent, context-rich memory of a codebase, including documentation and git history, enabling recall across sessions.
    105
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides persistent, searchable memory and knowledge capture for AI-assisted development, enabling agents to retain decisions, bugs, and patterns across sessions and projects.
    MIT