Self-hosted research agent. Ask a question — get a synthesized answer from the web.
Automatically picks the cheapest strategy that can answer your query, from a quick search to full browser automation.
| Strategy | Trigger | Pipeline | Cost |
|---|---|---|---|
search_only |
Most queries | SearXNG → LLM | ~$0.002 |
search_then_crawl |
"read full article", "detailed" | SearXNG → Crawl4AI → LLM | ~$0.005 |
search_then_browse |
"compare prices", "fill form" | SearXNG → Browser-Use → LLM | ~$0.05–0.10 |
browse_direct |
URL in query, "go to site" | Browser-Use → LLM | ~$0.05–0.15 |
85%+ of queries go through search_only — fast and nearly free.
- SearXNG — self-hosted meta-search (Google, Bing, DDG, Wikipedia)
- Crawl4AI — fast headless page extraction
- Browser-Use — browser automation for interactive pages
- Claude — answer synthesis (via Claude Code CLI, Anthropic API, or OpenAI)
1. Start SearXNG
docker-compose up -d2. Install dependencies
pip install -r requirements.txt
playwright install chromium3. Configure
cp .env.example .env# Provider: claude_code | anthropic | openai
LLM_PROVIDER=claude_code
ANTHROPIC_API_KEY=sk-ant-... # only if using anthropic
OPENAI_API_KEY=sk-... # only if using openai
SEARXNG_URL=http://localhost:8080
LLM_CHEAP=claude-haiku-4-5
LLM_SMART=claude-sonnet-4-5CLI
python -m agent.main> what is the USD to EUR rate today
> read the full Wikipedia article about Roman Empire
> go to https://example.com and summarize
MCP server — expose as a tool for Claude Code or any MCP client
python mcp_server.py~/.claude/mcp.json:
{
"mcpServers": {
"rsearch": {
"command": "python",
"args": ["/path/to/rsearch/mcp_server.py"]
}
}
}Available tools:
research(query)— run a query, strategy is picked automaticallyresearch_strategy(query)— preview which strategy would be used
- Python 3.10+
- Docker
- Chromium (
playwright install chromium)