Problem
search_wiki (#233/#234, extended in #258/#259) is only reachable from inside the
openkb query/openkb chat agent. There is no way for a script, a CI job, or an external
AI assistant (e.g. GitHub Copilot, Claude Code) that isn't running the OpenKB agent itself
to browse the taxonomy (concepts/entities) or run the tiered summaries/sources search — the
only options today are re-implementing keyword search with grep, or paying for a full
openkb query LLM round-trip just to get a list of candidate pages.
Separately, the query/chat agent itself still navigates concepts/entities via index.md's
one-line summaries plus ad-hoc read_file calls, rather than the new, purpose-built
list_taxonomy_items/get_taxonomy_item (#259) — so it doesn't yet benefit from the
tiered search's precision/recall separation either.
Vorschlag
- CLI:
openkb list-taxonomy [--kind concept|entity] [--json] and
openkb search <query> [--scope briefs,summaries,sources] [--top-k N] [--json], so any
external caller (script, CI, or an AI assistant's shell tool) gets the same taxonomy
browsing and tiered search the agent uses, with zero LLM cost.
- Wire
list_taxonomy/the retiered search_wiki into build_query_agent
(openkb/agent/query.py, inherited by chat.py), replacing the old
index.md-plus-ad-hoc-read_file path for concepts/entities and the single-tier
search_wiki for summaries/sources, with updated search-strategy instructions.
Kontext
This issue was drafted with the assistance of an AI assistant.
Problem
search_wiki(#233/#234, extended in #258/#259) is only reachable from inside theopenkb query/openkb chatagent. There is no way for a script, a CI job, or an externalAI assistant (e.g. GitHub Copilot, Claude Code) that isn't running the OpenKB agent itself
to browse the taxonomy (concepts/entities) or run the tiered summaries/sources search — the
only options today are re-implementing keyword search with
grep, or paying for a fullopenkb queryLLM round-trip just to get a list of candidate pages.Separately, the query/chat agent itself still navigates concepts/entities via
index.md'sone-line summaries plus ad-hoc
read_filecalls, rather than the new, purpose-builtlist_taxonomy_items/get_taxonomy_item(#259) — so it doesn't yet benefit from thetiered search's precision/recall separation either.
Vorschlag
openkb list-taxonomy [--kind concept|entity] [--json]andopenkb search <query> [--scope briefs,summaries,sources] [--top-k N] [--json], so anyexternal caller (script, CI, or an AI assistant's shell tool) gets the same taxonomy
browsing and tiered search the agent uses, with zero LLM cost.
list_taxonomy/the retieredsearch_wikiintobuild_query_agent(
openkb/agent/query.py, inherited bychat.py), replacing the oldindex.md-plus-ad-hoc-read_file path for concepts/entities and the single-tier
search_wikifor summaries/sources, with updated search-strategy instructions.Kontext
TieredWikiSearch/list_taxonomy_items/get_taxonomy_item.already-implemented, already-tested core logic.
This issue was drafted with the assistance of an AI assistant.