Semantic search over the wiki — narrow follow-ups only. This is a nested LLM call: each invocation spawns a separate query agent with its own turn budget. Use ONLY when you have a specific sub-question that direct file reads can't easily answer (e.g. "what does the b
(question: str)
| 115 | |
| 116 | @function_tool |
| 117 | async def query_wiki(question: str) -> str: |
| 118 | """Semantic search over the wiki — narrow follow-ups only. |
| 119 | |
| 120 | This is a nested LLM call: each invocation spawns a separate |
| 121 | query agent with its own turn budget. Use ONLY when you have a |
| 122 | specific sub-question that direct file reads can't easily answer |
| 123 | (e.g. "what does the book say about X across multiple |
| 124 | chapters?"). For primary traversal, use list/read/get_page_content |
| 125 | instead — they are cheaper and give you the raw text, not |
| 126 | another LLM's summary. |
| 127 | """ |
| 128 | # Lazy import to avoid a circular dependency at module load time. |
| 129 | from openkb.agent.query import run_query |
| 130 | |
| 131 | kb_dir = Path(wiki_root).parent |
| 132 | return await run_query(question, kb_dir, model, stream=False) |
| 133 | |
| 134 | @function_tool |
| 135 | def write_skill_file(path: str, content: str) -> str: |
nothing calls this directly
no test coverage detected