Logo: Sage Wiki

Sage Wiki

Communautéit
xoai
sage-wiki

Reference skill for sage-wiki — local-first knowledge graph with MCP server, REST API, compiled wiki, and Obsidian-compatible output.

Iwwersiicht

Editeurxoai
Repositorysage-wiki
Skill-Nummsage-wiki
Stären
624
Forks
102
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    xoai huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Sage Wiki an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/xoai/sage-wiki/tree/main/skills/sage-wiki
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/xoai/sage-wiki.git /tmp/sage-wiki
mkdir -p .claude/skills
cp -r /tmp/sage-wiki/skills/sage-wiki .claude/skills/sage-wiki
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Sage Wiki an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Sage Wiki automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Sage Wiki net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

sage-wiki

Local-first knowledge graph that compiles documents into an interlinked, human-readable wiki with provenance. Exposes 19 MCP tools over stdio/SSE and a versioned REST API under /v1/. Output is Obsidian-compatible markdown.

How to connect

MCP (primary): The server runs as a subprocess over stdio, or over SSE/HTTP:

json
{
  "mcpServers": {
    "sage-wiki": {
      "command": "sage-wiki",
      "args": ["serve", "--transport", "stdio", "--project", "/path/to/wiki"]
    }
  }
}

REST (/v1/): When the server is running with --ui, the REST facade is at /v1/. Auth is Bearer-token (same as SAGE_WIKI_TOKEN); loopback is zero-config. All errors use a fixed {error: {code, message, details}} envelope.

The 19 MCP Tools

wiki_add_ontology (write)

Create an ontology entity or relation.

  • REST: POST /v1/ontology/entities / POST /v1/ontology/relations | Argument | Type | Required | Default | |----------|------|----------|---------| | entity_id | string | no | — | | entity_name | string | no | — | | entity_type | string | no | — | | relation | string | no | — | | source_id | string | no | — | | target_id | string | no | — |

wiki_add_source (write)

Add a source file to a source folder and update the manifest.

  • REST: POST /v1/sources | Argument | Type | Required | Default | |----------|------|----------|---------| | path | string | yes | | | type | string | no | — |

wiki_capture (write)

Capture knowledge from a conversation or text.

  • REST: POST /v1/capture | Argument | Type | Required | Default | |----------|------|----------|---------| | content | string | yes | | | context | string | no | — | | tags | string | no | — |

wiki_commit (write)

Git add and commit all changes.

  • REST: POST /v1/git/commit | Argument | Type | Required | Default | |----------|------|----------|---------| | message | string | no | — |

wiki_compile (async)

Run the full compile pipeline: diff → summarize → extract concepts → write articles.

  • REST: POST /v1/jobs/compile (async — 202 + job_id) | Argument | Type | Required | Default | |----------|------|----------|---------| | dry_run | boolean | no | false | | fresh | boolean | no | false | | prune | boolean | no | false |

wiki_compile_diff (read)

Show added/modified/removed source files compared to the manifest.

  • REST: GET /v1/compile/diff

wiki_compile_topic (async)

Compile sources for a specific topic on demand.

  • REST: POST /v1/jobs/compile?topic=... (async — 202 + job_id) | Argument | Type | Required | Default | |----------|------|----------|---------| | max_sources | number | no | — | | topic | string | yes | |

wiki_graph_query (read)

Answer a relational question by graph traversal: seed entities are resolved from the question (aliases resolve to their canonical entity), a bounded multi-hop subgraph is serialized, and the answer is grounded ONLY in those edges — every citation carries source_doc and confidence provenance.

  • REST: POST /v1/graph/query | Argument | Type | Required | Default | |----------|------|----------|---------| | as_of | string | no | — | | hops | number | no | — | | max_edges | number | no | — | | mode | string | no | — | | question | string | yes | |

wiki_learn (write)

Store a learning entry for the self-learning loop.

  • REST: POST /v1/learnings | Argument | Type | Required | Default | |----------|------|----------|---------| | content | string | yes | | | tags | string | no | — | | type | string | yes | |

wiki_lint (async)

Run linting passes on the wiki.

  • REST: POST /v1/jobs/lint (async — 202 + job_id) | Argument | Type | Required | Default | |----------|------|----------|---------| | fix | boolean | no | false | | pass | string | no | — |

wiki_list (read)

List wiki articles, optionally filtered by entity type.

  • REST: GET /v1/entities | Argument | Type | Required | Default | |----------|------|----------|---------| | type | string | no | — |

wiki_ontology_query (read)

Query the ontology graph.

  • REST: GET /v1/ontology/{entity}/traverse | Argument | Type | Required | Default | |----------|------|----------|---------| | depth | number | no | — | | direction | string | no | — | | entity | string | yes | | | relation | string | no | — |

wiki_provenance (read)

Show source-article provenance.

  • REST: GET /v1/provenance | Argument | Type | Required | Default | |----------|------|----------|---------| | article | string | no | — | | source | string | no | — |

wiki_query (compound)

Ask a free-form question against the wiki: searches sources and compiled articles, synthesizes a cited answer with the LLM (spends LLM budget), and files the result to wiki/under_review/ by default (trust output review) or wiki/outputs/ only when trust include_outputs is 'true'.

  • REST: — | Argument | Type | Required | Default | |----------|------|----------|---------| | question | string | yes | | | top_k | number | no | — |

wiki_read (read)

Read the full content of a wiki article by path.

  • REST: GET /v1/articles/{path} | Argument | Type | Required | Default | |----------|------|----------|---------| | path | string | yes | |

wiki_search (read)

Search the wiki with hybrid retrieval: BM25 + vector over documents and chunks, fused with ontology-graph proximity.

  • REST: GET /v1/search | Argument | Type | Required | Default | |----------|------|----------|---------| | boost_tags | string | no | — | | channels | string | no | — | | expand | boolean | no | false | | limit | number | no | — | | query | string | yes | | | rerank | boolean | no | false | | tags | string | no | — |

wiki_status (read)

Show wiki stats: sources, concepts, entries, vectors, entities, relations.

  • REST: GET /v1/status

wiki_write_article (write)

Write a concept article, create ontology entity, and embed vector.

  • REST: PUT /v1/articles/{concept} | Argument | Type | Required | Default | |----------|------|----------|---------| | concept | string | yes | | | content | string | yes | |

wiki_write_summary (write)

Write a summary markdown file, index in FTS5, and optionally embed vector.

  • REST: PUT /v1/summaries | Argument | Type | Required | Default | |----------|------|----------|---------| | concepts | string | no | — | | content | string | yes | | | source | string | yes | |

Error Codes

Branch on code, never on message:

CodeHTTPWhen
invalid_argument400Missing, malformed, or out-of-range argument.
unauthenticated401Missing or invalid Bearer token.
forbidden403Host not allowed; path containment violation.
not_found404Article, entity, or job does not exist.
conflict409Compile already in progress; job already finished.
feature_disabled412as_of without temporal enabled; mode=global without communities enabled.
payload_too_large413Capture content over 100 KB.
internal500Unclassified tool failure. Message must not leak paths.
unavailable503Backend / store unavailable.

Opt-In Features

All opt-in flags live under config.yaml → ontology:

FlagDefaultUnlocks
ontology.temporal.enabledtrueHistorical queries (as_of in graph_query), temporal validity edges.
ontology.triples.enabledfalseSubject-predicate-object fact extraction from articles.
ontology.resolve.enabledfalseEntity resolution — merges duplicate entities across documents.
ontology.communities.enabledfalseCommunity detection via Louvain; mode=global in graph_query.

Tiers

Sources are assigned a tier determining compile depth:

TierLabelWhat Happens
0IndexFile metadata only — no LLM cost.
1EmbedVector embeddings — no LLM summarization.
3Full CompileSummarize → extract concepts → write articles. Tier 3 is ~5–8 min/doc. There is no Tier 2.

There is no Tier 2. Tiers go 0 → 1 → 3.

Important Correctness Points

  1. Tiers are 0 / 1 / 3 — there is no Tier 2. Documents and tooltips that claim a Tier 2 are wrong.
  2. ontology.temporal.enabled defaults true (per code). ontology.triples, ontology.resolve, and ontology.communities default false.
  3. as_of requires ontology.temporal.enabled; mode=global requires ontology.communities.enabled.
  4. compile and lint are job submissions — they return 202 Accepted with a job_id, not a blocking result. Poll GET /v1/jobs/{id} for status.
  5. Evidence spans (provenance) quote the compiled summary, not the source document. The summary is the distilled, LLM-processed form.

Install

bash
# MCP (stdio — primary integration path)
sage-wiki serve --project /path/to/wiki

# REST (with Web UI)
sage-wiki serve --ui --project /path/to/wiki

# Agent skill installation
npx skills add https://github.com/xoai/sage-wiki --skill sage-wiki

Pre-1.0 notice: Every surface here is experimental. Tool semantics, argument names, and REST routes may change between versions. Pin the version you depend on.

Generated by tools/skillgen — 19 tools in registry.

Heefeg gestallte Froen

Wat mécht de KI-Skill Sage Wiki?

Reference skill for sage-wiki — local-first knowledge graph with MCP server, REST API, compiled wiki, and Obsidian-compatible output.

Firwat Sage Wiki op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Sage Wiki besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Sage Wiki an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/xoai/sage-wiki/tree/main/skills/sage-wiki an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Sage Wiki benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Sage Wiki benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Sage Wiki domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Sage Wiki gratis?

Jo. xoai huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇