research
Ground Your Agent in Local Knowledge with wikigraph-knowledge
Use Wanta WikiGraph knowledge contexts in agents via the managed wg command—no raw file handling needed.
Where this fits
You are building an agent that answers questions about a user's private book collection, internal documentation, or imported research archives. The user attaches a .wikg file or says "@知识库" and expects the agent to reason over that knowledge base without manual parsing. The wikigraph-knowledge skill gives your agent a clean, managed interface to Wanta's WikiGraph library through the wg command, so it can query the right context scope without touching raw storage paths.
Why agents benefit
- Scope-aware retrieval: The skill automatically distinguishes between the whole library (
wikg://lib) and a specific archive (wikg://lib/arc/<id>), letting the agent pick the narrowest context that answers the question—no extra prompting needed. - No fragile dependencies: It runs only through Wanta's managed
wgcommand on PATH, avoiding global installs, version mismatches, or accidental access to raw.wikgfiles as plain attachments. - Read-only by default: Knowledge bases are treated as immutable, so your agent can safely query without risking accidental mutation—important for long-running or multi-step workflows.
- Explicit command boundary: The skill enforces a single entry point, making it easier to audit, log, or sandbox agent actions against the knowledge base.
- Cross-archive discovery: For broad questions or unknown-source lookups, the agent can fall back to the library scope and compare across multiple imported archives.
Practical scenarios
Answering a question from a specific imported book
The user selects a single archive (e.g., a technical manual) and asks a targeted question. The agent sees wikg://lib/arc/<id> in context and runs wg query against that archive only, returning precise, source-grounded answers.
Cross-book comparison when the source is unclear
A user says "@知识库" and asks, "What does this say about concurrency models?" The agent uses the library scope to scan all archives, compare findings, and cite the most relevant book—saving the user from remembering which archive contains the information.
Fallback when an archive lacks evidence
If a focused archive returns sparse results, the skill tells the agent to widen to the library scope before giving up. This prevents premature "I don't know" responses and improves answer coverage.
Add it to your agent workflow
Install the skill directly into your agent project:
npx skills add oomol-lab/wanta --skill wikigraph-knowledge
After installation, your agent can detect a Wanta context and invoke the managed command. A minimal usage example in a tool-calling loop:
# Pseudo-code: agent tool definition
if knowledge_context.startswith("wikg://lib/arc/"):
scope = knowledge_context # specific archive
else:
scope = "wikg://lib" # whole library
result = subprocess.run(["wg", "query", "--scope", scope, "--question", user_query])
This keeps your agent's code clean and independent of WikiGraph internals.
Compare before adopting
Before committing, evaluate the skill against a few benchmarks: check the GitHub repo's issue response time and recent commit activity (currently ~63 stars, but freshness matters more than raw count). Compare with alternatives like direct RAG over PDFs or other knowledge-graph tools—do they offer the same scope granularity? Confirm the wg command integrates smoothly with your agent's runtime (Node, Python, etc.) and that the read-only boundary matches your security model. Finally, test with your own .wikg files to see if the skill's context detection covers your exact usage patterns.
Why it is worth tracking
This skill addresses a real pain point: agents that need to work with structured, local knowledge bases without reinventing the wheel. The project is early but focused, with a clear command boundary and sensible scope rules. Keep an eye on community adoption and whether the maintainers add more context types or improve error handling. Re-evaluate when your agent needs broader knowledge-graph features like incremental updates or multi-user access. For a quick reference, see the skill listing on OpenAgentSkill to track its evolution.
Featured Skill
wikigraph-knowledge
Skill by oomol-lab