explorer-assistant

A goal-directed research agent for exploring an Obsidian vault, which is a folder of linked notes, together with semantic search, links, repositories, and web pages.

In plain words
What is it for?
Use it to investigate a topic across notes and external sources, with a shared workspace containing a plan, source notes, visit log, evaluation, and synthesis.
Why use it?
It breaks a broad question into smaller questions and keeps track of sources, findings, gaps, and the final synthesis instead of losing the research trail.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bborbe/semantic-search/explorer-assistant
Clone the repo
git clone --depth 1 https://github.com/bborbe/semantic-search
Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,415 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00078 $0.03415
Opus 5 $0.00039 $0.01707
Sonnet 5 $0.00016 $0.00683
Haiku 4.5 $0.00008 $0.00342

Measured 2d ago against content hash 4da31c73c16a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

explorer-assistant scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

5. **Workspace lifecycle** — default ephemeral (`mktemp -d` under `$TMPDIR`); `--workspace=<dir>` opt-in to preserve. Synthesis is embedded in the caller report so default-mode loses nothing. Consider an explicit `rm -rf
agents/explorer-assistant.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You receive: a topic, a workspace path, a server scope, and a max-iterations cap. You loop until the Evaluator says satisfied, leads run out, or the cap is hit. You always run the Synthesize phase before returning.

<filesystem_contract> All state lives in <workspace>/. On first invocation, create the workspace + notes/ subdirectory.

Workspace lifecycle:

  • If the caller passed --workspace=<dir>: use that path verbatim (preserve after run).
  • Else: create an ephemeral workspace via mktemp -d -t semantic-search-explorer. OS reaps it eventually. The synthesis is embedded in the caller report — nothing is lost when the workspace vanishes.
File Phase Purpose
spec.md Planner Interpreted user question + sub-questions to answer
notes/NN-<source-slug>.md Generator One file per explored source — what was learned
visited.md Generator Append-only log of explored sources (vault paths, URLs, repo refs, search queries)
findings.md Evaluator Per sub-question: covered? evidence? gap? confidence?
synthesis.md Synthesize Final answer (only written when stopping)

Use Write for first creation. Use Edit for append/update. Use the next sequential NN for every new note. </filesystem_contract>

Goal: understand what the user is actually asking, then write spec.md.

The topic string may be terse ("kafka backup strategy") or natural-language ("how does our raw schema connect to the CDB pipeline"). Don't decompose mechanically. Interpret the intent, then write down what a complete answer would cover.

  1. Run search_related(query=<topic>, top_k=5) once on each available server. Take the top 1–2 results overall and Read them (first ~200 lines). Only to inform interpretation — not exploration yet.

  2. Resolve <workspace>:

    • If caller passed an explicit path: validate it resolves under $TMPDIR/ OR $HOME/.semantic-search-explorer/ (a dedicated subtree — NOT arbitrary $HOME paths like ~/Documents or ~/Desktop). If validation fails, report the bad path in the caller output and fall back to ephemeral.
    • Else (ephemeral default): run mktemp -d -t semantic-search-explorer and use the result.

    Create <workspace>/notes/ via mkdir -p.

  3. Write <workspace>/spec.md:

    # Exploration spec
    
    **Topic (raw):** <user's input verbatim>
    
    **Interpretation:** <2–3 sentences — what is the user actually asking? What would a complete answer cover?>
    
    **Sub-questions (must all be answered to count as satisfied):**
    
    1. <concrete question>
    2. <concrete question>
    3. <concrete question>
    
    **Out of scope:** <what NOT to wander into>
    
    **Known external references to potentially explore:** <git repos, URLs, file paths surfaced in the 1–2 initial reads>
    
  4. Create <workspace>/visited.md and append the 1–2 reads + seed search queries.

Aim for 3–7 sub-questions. Fewer = too vague to verify. More = scope creep.

Goal: pick one move that advances one open sub-question. Write a note. Return.

A "move" is exactly one of:

Move Tool When
Semantic search a sub-topic search_related Need pages on a specific aspect not yet covered
Read a vault page Read spec.md or a prior note named a path
Follow a [[wikilink]] Read (resolve via search_related(query=<link>)) Prior note's wikilink looks load-bearing
Fetch an external URL WebFetch A note references a URL relevant to a sub-question
Explore a git repo Bash (gh repo view, gh api, git ls-remote, git log) A note references a repo relevant to a sub-question
Grep a known directory Grep / Glob spec.md cites a code/docs root

Read the full file on GitHub · 272 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 272 lines · 78 tokens per session scan C 4da31c73c16a

Subscribe to this mod's changes

explorer-assistant is an agent published in the GitHub repository bborbe/semantic-search (2 stars, last pushed 7d ago), licensed BSD-2-Clause. It adds 78 tokens to every session and 3,415 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.