marchwarden/researchers/web
Jeff Smith 7cb3fde90e M1.3: Inner agent loop with tests
WebResearcher — the core agentic research loop:
- Tool-use loop: Claude decides when to search (Tavily) and fetch (httpx)
- Budget enforcement: stops at max_iterations or token_budget
- Synthesis step: separate LLM call produces structured ResearchResult JSON
- Fallback: valid ResearchResult even when synthesis JSON is unparseable
- Full trace logging at every step (start, search, fetch, synthesis, complete)
- Populates all contract fields: raw_excerpt, categorized gaps,
  discovery_events, confidence_factors, cost_metadata with model_id

9 tests: complete research loop, budget exhaustion, synthesis failure
fallback, trace file creation, fetch_url tool integration, search
result formatting.

Refs: archeious/marchwarden#1

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-08 14:29:27 -06:00
..
__init__.py Initial project structure and scaffolding 2026-04-08 11:57:15 -06:00
agent.py M1.3: Inner agent loop with tests 2026-04-08 14:29:27 -06:00
models.py M0.3: Implement contract v1 Pydantic models with tests 2026-04-08 14:00:45 -06:00
tools.py M1.1: Search and fetch tools with tests 2026-04-08 14:17:18 -06:00
trace.py M1.2: Trace logger with tests 2026-04-08 14:21:10 -06:00