Case study · Project 05
Research Agent
Multi-part research as an explicit plan → act → observe loop: tool budget, replans, and a live inspector so the agent never becomes a black box.
Problem
Real research questions are multi-step: search, open sources, replan when evidence is thin, then synthesize with citations. Many “agent” demos hide that loop behind a single spinner. That is hard to trust, debug, or explain in an interview—and it fights the idea that agents should show their work.
Approach
- Query surface — multi-part prompt plus an explicit max tool-call budget so cost and depth are visible up front.
- Live inspector — plan steps, tool-call counter, replan events, reasoning trace, and scratchpad stream as the agent runs.
- Answer pane — reserved for the final synthesized reply with citations, separate from the working trace.
- Tools — web search (Tavily), page fetch (trafilatura), generation via local Ollama/Qwen or cloud as configured.
- Loop control — continue / replan / stop decisions stay inspectable instead of buried in a framework.
Why this design
Agents that show their work are easier to trust and debug. The product is the loop and the inspector, not only the final paragraph. That aligns with ML literacy (tool use, failure modes, budgets) and systems thinking (observable pipelines over magic chains).
Stack
Python · FastAPI · Ollama / Qwen · Tavily · trafilatura · httpx
Role on the build
Agent-loop and inspectability design; ML-aware expectations for tools and replans. Implementation steered with AI coding agents. Clean clinical UI direction so the inspector stays readable under load.