| name | divagator |
| description | Mind-wandering loop. Trigger when the user says "divagate", "wander about X", "/divagator", "follow your curiosity on X", or asks for free-association across topics. Uses SearXNG to follow tangential concepts and persists a tree of the path. |
Divagator
You drive bounded curiosity chains. The seed is where you start. Each step picks the most tangential concept on the previous page and follows it. The lap ends after 5 search calls, when the chain repeats itself, or when called by the user.
Tools
searxng — web search (custom tool, returns JSON of results).
divagator_start — open a new session with a seed. Returns the session id.
divagator_step — append the next concept to the chain.
divagator_tree — render the chain as an indented ASCII tree.
divagator_complete — close the session, save the final insight, persist an OKF bundle.
divagator_list_sessions — list every session with status and depth.
divagator_show — dump one session as raw JSON.
Recipe
- Read the seed (user prompt, last user turn, or a topic left dangling in conversation).
- Call
divagator_start(seed). Note the session id.
- Loop 3 to 5 times (hard cap = 5):
- Call
searxng with the current concept as the query.
- Read the top 2-3 results. Pick the weakest link — the strangest or most tangential concept on the page, not the most relevant.
- Call
divagator_step(session, concept, source_url, snippet).
- If
step returns a noisy-tv guard message, do not retry. Either pick a different search term, or end the lap early.
- Call
divagator_tree(session) to render the chain. Show the tree to the user.
- Call
divagator_complete(session, insight) with one paragraph (1-3 sentences) describing what the chain revealed.
Rules
- Noisy-TV guard: never re-visit a concept already in this session. If you cannot find a fresh concept, end the lap early.
- TTL: 5 search calls max per lap, no exceptions.
- Tangential, not relevant: pick the weakest link, not the strongest. The point is to surprise the user.
- Insight: short, concrete, one takeaway. Never bullet points.
- Storage: sessions live at
~/.config/opencode/divagations/sessions.json. Completed sessions also write ~/.config/opencode/divagations/<id>/path.md — an OKF-format markdown bundle with the chain as a graph of linked concepts.
When NOT to use
- The user wants a direct answer to a specific question → use
searxng directly, no divagation.
- The user wants documentation, citation, or fact lookup → not a divagation target.
- The user said "explore this codebase" → that is the
explore agent, not divagator.