Built a research agent inside Claude Code that doesn't make things up. Based it directly on Anthropic's guide to reducing hallucinations: give the model permission to say "I don't know," extract direct quotes before analyzing, cite every claim inline, and retract anything it can't source. Layered chain-of-thought verification and confidence levels on top.
For search, it runs against my self-hosted SearXNG instance, a metasearch engine that aggregates Bing, DuckDuckGo, Brave, Reddit, and Startpage. Results get deduped and ranked by how many engines found each URL. Higher engine count means higher trust. No single search provider dependency.
The agent is a slash command in Claude Code. Type /research, ask a question, and it gathers evidence, reads the actual pages, builds a sourced report, and auto-publishes to GitHub. Run it with Claude Code's looping feature for ongoing stories and it keeps updating the report as new information drops.
Example: when LiteLLM got hit with a supply chain attack last week, /research tracked the story across 70+ outlets over four days, from the initial PyPI compromise through the Telnyx cascade, with every claim cited and verified.
