Who it is forA developer who has a data pipeline or script that produces documents and wants them filed into a wiki automatically.
The problemDocuments produced by a script end up in folders with no structure, and someone has to file them by hand.
The outcomeA Python script that files each document as a note and returns the result, including the tokens spent.
What you need first
- Python 3.11 or later, or uv to install it
- An API key for OpenRouter, OpenAI, Gemini or another OpenAI-compatible server, or Ollama installed for free local use
- Documents as text, Markdown, PDF, Word, PowerPoint, Excel or OpenDocument files
Steps
- Install the library with
pip install llmwiki2(Python 3.11 or later). - In Python, run
from llmw2 import Wiki, thenwiki = Wiki.from_env(bundle="./wiki")andwiki.init(). - Set the OKF_* variables and your provider key, for example OPENROUTER_API_KEY, before creating the Wiki object.
- Call
result = wiki.ingest(open("meeting.md").read(), title="Pricing meeting")for each document. - Print
resultand open the note in ./wiki to check the filing. (inferred, check the README)
Prompt for your agent
Write a Python script that imports Wiki from llmw2, points it at ./wiki, and calls ingest on each file in <folder>. Expected output: one result per file with the note and token usage. Verify that each returned note appears as a Markdown file under ./wiki.
Caveat. The README documents the ingest call and Wiki.from_env, but this script's exact return fields should be checked against the library guide before you rely on them.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for crow-hq/llm-wiki-v2 and "Add documents to a wiki from a Python script"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer