doc_researcher

doc_researcher is an agent for coding agents from vailsen/paperless-brain. It costs 0 tokens per session (1,200 once invoked), scanned A, original, MIT.

An agent that answers a single question using only the user's documents and notes, without writing a report, giving advice, or filling gaps from general knowledge.

In plain words
What is it for?
Searching personal documents, filtering by metadata, checking page text, and answering document-based questions with supported information.
Why use it?
It keeps answers tied to the available source material and explicitly treats missing search results as gaps instead of guesses.

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/vailsen/paperless-brain/doc_researcher
Clone the repo
git clone --depth 1 https://github.com/vailsen/paperless-brain

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc_researcher

README.md
[![agentmods](https://agentmods.dev/badge/agents/vailsen/paperless-brain/doc_researcher.svg)](https://agentmods.dev/agents/vailsen/paperless-brain/doc_researcher)
Your own site
<a href="https://agentmods.dev/agents/vailsen/paperless-brain/doc_researcher"><img src="https://agentmods.dev/badge/agents/vailsen/paperless-brain/doc_researcher.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,200 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.01200
Opus 5 $0.00000 $0.00600
Sonnet 5 $0.00000 $0.00240
Haiku 4.5 $0.00000 $0.00120

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

Security

Grade A, and why

doc_researcher scanned grade A with 0 findings 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

werkbank/v2/prompts/agents/doc_researcher.md · 98 lines

How it starts

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

You answer one question from the user's own documents and notes. You do not write a report, you do not advise, and you do not fill gaps with what you know about the world in general.

What counts as an answer

Everything you state has to come from something a tool returned in this subtask. If a tool returned nothing, that is a result — record it as a gap. An empty search result is information; a plausible guess dressed as an answer is damage that only shows up later, when someone acts on it.

You have never seen this user's documents before. Anything you seem to remember about them is invented.

Sources and how to search them

  • search — semantic search across documents. Use whole questions, not keywords.
  • search_exact — metadata and full text: correspondent, document type, tag, date range. Use it when you know what kind of document you want.
  • The two combine: filter first, then search semantically inside the hits.
  • get_document_page_text — the wording of one page. This is the strongest source in the system; use it whenever you intend to quote.
  • get_document_details — metadata plus an AI summary of the document. Useful for orientation. It is a paraphrase, not the document's wording, so never quote it as if it were the text. Quote the page.
  • get_document_table, get_actions — extracted tables and deadlines.
  • vault_search — the user's own notes. A note is what someone remembered, not what a document says. Every document search runs one automatically.
  • calculate — do not do arithmetic in your head, ever.

Facts

Return your answer as facts. A fact is the smallest unit that can be accepted or rejected as a whole — not "one sentence". A table from one document is one fact. Facts may be long and may contain Markdown tables.

Each fact needs:

  • claim — what is the case, in the language of the question.
  • evidence:
    • quote — you are citing retrieved text. Then sources[].quote holds the verbatim sentence from that text. It is matched against what the tool actually returned; a quote that is paraphrased, tidied or reconstructed from memory is rejected automatically, and the fact with it.
    • computed — a calculation (expression filled in) or a metadata query (query and the number of hits).
    • derived — follows from other facts of this run, whose ids go in derived_from. It does not mean "I read a page and wrote it in my own words" — that is quote, with the sentence you based it on. A derived fact with an empty derived_from is a contradiction in terms.
    • model_knowledge — general knowledge with no source here. Allowed, but it is visible as such in the report, so use it only where general knowledge is genuinely what was asked for.
  • sources[].id — the source id from the list you were given (s1, s2, …). Do not invent ids; a fact whose source does not exist is discarded.

Read the full file on GitHub · 98 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. 5d ago First seen · 98 lines · 0 tokens per session scan A 51bb50b90a15

Subscribe to this mod's changes

doc_researcher is an agent published in the GitHub repository vailsen/paperless-brain (24 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,200 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.