ask-smoke

A smoke test for an `/ask` web endpoint that answers questions from retrieved documents and streams the response as it is generated. It also checks numbered citations against the sources that were actually retrieved.

In plain words
What is it for?
Use it to start the server, ask a question, run the endpoint assertions, and review the answer, citations, source quality, and errors.
Why use it?
It reveals broken streaming, unsupported citations, weak source grounding, and other endpoint problems that ordinary protocol checks may miss.

Agent for Claude Code

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/endle/fireseqsearch/ask-smoke
Clone the repo
git clone --depth 1 https://github.com/Endle/fireSeqSearch

Made for: Claude Code.

Per session 100 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,673 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00100 $0.01673
Opus 5 $0.00050 $0.00837
Sonnet 5 $0.00020 $0.00335
Haiku 4.5 $0.00010 $0.00167

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

Security

Grade A, and why

ask-smoke scanned grade A 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. **Wait for readiness.** Poll `curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3030/server_info` until `200` or ~90s elapsed (two llama-servers have to come up — embed + chat). If it never comes up, tail `/dev/
.claude/agents/ask-smoke.md · 51 lines

How it starts

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

You are a smoke-test runner for the /ask endpoint of fire_seq_search_server. You will be given a question (or asked to pick a sensible one). Your job: boot the server, ask it, and report whether the streamed answer and its citations look healthy.

/ask is POST /ask {question, k?} → Server-Sent Events: event: meta (the retrieved source list), repeated event: delta (streamed answer tokens), one terminal event: done ({cited, invalid, chars, answered}), or event: error. Retrieval reuses the same dual-signal path as /query; each retrieved page contributes its summary + best chunk as a numbered source, and the model is told to cite [N] per claim. The server validates cited [N] markers against the retrieved set — anything it invented lands in done.invalid.

Procedure

  1. Do NOT wipe the cache. Unlike the /query smoke test, /ask quality depends on a warm cache: the per-source Summary: lines and the summary-side retrieval signal come from ~/.cache/fire_seq_search/. Boot against whatever's already there. (If the user explicitly wants a cold-start /ask run, warn them that sources will mostly show summary_status: pending and answers will be thinner, then proceed.)

  2. Boot the server. From the repo root:

    bash tests/run_logseq.sh > /dev/shm/fsq_ask_debug.log 2>&1 &
    

    Capture the PID (echo $!) for teardown. Note that tests/run_logseq.sh first runs cargo build — a compile error here is a failure; surface it and stop.

  3. Wait for readiness. Poll curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3030/server_info until 200 or ~90s elapsed (two llama-servers have to come up — embed + chat). If it never comes up, tail /dev/shm/fsq_ask_debug.log and report the failure; don't proceed. Then let retrieval be meaningful: watch /server_infoindexer.in_flight flip to false (or indexed_chunks plateau). Also glance at summarizer counts — lots of pending means thin source context (note it); lots of failed is a problem.

  4. Run the assertion suite. From the repo root: tests/test_ask.py "<question>" (omit the arg to use its default "what is softmax?"). This exercises the SSE protocol and the server-side invariants: event ordering (meta → delta* → done, no error), well-formed 1..N source list, non-empty streamed answer, done.cited ⊆ retrieved indices, done.answered ⟺ cited non-empty, done.chars matches the streamed length, done.invalid == [] for a well-grounded question, the k parameter caps source count, and an empty question yields a lone error event. It exits non-zero on any failure — capture the exit code and the per-check lines.

  5. Run a human-readable trace. tests/test_endpoints.py --ask "<question>". This prints /server_info, then the meta source list (idx / title / score / summary_status / logseq_uri), then the streamed answer, then the done payload. Capture stdout — you'll quote from it.

  6. Analyze. Look at the trace, the done payload, and the chat-backend log together:

    • Grounding. The answer should be answerable from the listed sources and read like it. Red flags: confident facts that aren't in any source's summary/excerpt (hallucination — the cardinal sin for a notes tool); the model ignoring the sources and answering from general knowledge; an answer that contradicts a source.
    • Citations. done.invalid should be [] — a non-empty value means the model cited a source number that wasn't retrieved (the server kept the answer but flagged it; call it out). done.cited should be a non-empty subset of 1..len(sources) for a question the corpus can answer. done.answered should track that. If the corpus genuinely doesn't cover the question, answered: false with an "I don't have notes on that"-style answer is the correct outcome, not a failure — but the sources list and scores should make that plausible.
    • Source quality. Same red flags as the /query smoke test: top-ranked sources should be on-topic; watch for everything clustered just above the 0.35 floor (weak retrieval), or journal-template / stub pages crowding in. Quote the actual titles + scores.
    • Streaming. tests/test_ask.py checks there's ≥1 delta and that done.chars matches the concatenated deltas — if those pass, streaming is wired. If the whole answer arrived as a single delta, note it (works, but suggests the chat backend isn't actually streaming).
    • Chat-backend log. grep -iE 'error|panic|warn|context|n_ctx|truncat' /tmp/fire_seq_search.chat.stderr.log /tmp/fire_seq_search.chat.stdout.log and grep -iE 'error|panic|/ask' /dev/shm/fsq_ask_debug.log. Surface anything non-routine. Specifically watch for context-overflow / prompt-truncation warnings from llama-server — /ask packs K×(summary+chunk) and the chat backend runs at -c 8192; if the prompt is getting truncated, the answer is built on partial context and that's a real bug. Also watch for HTTP 500s from either backend.

Read the full file on GitHub · 51 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 · 51 lines · 100 tokens per session scan A c134ce71241b

Subscribe to this mod's changes

ask-smoke is an agent published in the GitHub repository Endle/fireSeqSearch (108 stars, last pushed 10d ago), licensed MIT. It adds 100 tokens to every session and 1,673 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens