AI agent for company research. Type a company name, get a structured brief powered by live web search and Claude.
Live: https://dispatch-agent.netlify.app Backend: https://github.com/harshgolani/dispatch/tree/main/backend
- You type a company name
- The agent runs three targeted web searches via Tavily — overview, recent news, engineering culture
- Claude Haiku classifies each result for relevance. If irrelevant, retries with a broader query.
- Claude Sonnet synthesizes all results into a structured markdown report
- The execution trace shows every step — which model ran what and why
Output format:
- What They Do — products, positioning, business model
- Recent News — latest developments, funding, launches
- Engineering & Culture — stack, hiring, Glassdoor signals
- Why It's Interesting — for job seekers and investors
Browser → Netlify (React) → Render (FastAPI) → Agent Pipeline
The agent pipeline runs three steps:
- Tavily searches the web (3 targeted queries)
- Claude Haiku classifies each result for relevance
- Claude Sonnet synthesizes all results into a structured report
Every search result is classified by Haiku before reaching Sonnet. Classification is a binary yes/no question — cheap, fast, and Haiku handles it correctly. Sonnet runs exactly once for the final synthesis. This reduces token cost by ~60% compared to routing everything through Sonnet.
Simple tasks → Haiku. Complex reasoning → Sonnet. This is how production AI systems manage inference cost.
| Layer | Technology |
|---|---|
| Frontend | React 19 + Vite |
| Backend | FastAPI + Python |
| Web retrieval | Tavily |
| Classification | Claude Haiku |
| Synthesis | Claude Sonnet |
| Frontend hosting | Netlify |
| Backend hosting | Render |
Backend:
cd backend
pip install -r requirements.txt
cp .env.example .env
# Add ANTHROPIC_API_KEY and TAVILY_API_KEY to .env
uvicorn main:app --reload
# Runs on http://localhost:8000Frontend:
cd frontend
npm install
npm run dev
# Runs on http://localhost:5173Update API constant in src/App.jsx to switch between local and production backend.
POST /research
Request:
{"company": "Anthropic"}Response:
{
"company": "Anthropic",
"report": "## What They Do\n...",
"trace": [
{"step": "search_overview", "model": "tavily", "query": "..."},
{"step": "classify_overview", "model": "haiku"},
{"step": "classify_overview_result", "verdict": "relevant"},
...
{"step": "synthesize", "model": "sonnet"}
]
}- CORS restricted to Netlify frontend URL
- Rate limiting: 10 research requests/hour per IP via slowapi
- 100 character input limit on company name
- API keys stored as environment variables, never in code
- No streaming — report appears all at once after 5-8 seconds. Streaming is a Phase 2 improvement.
- Session-only results — lost on page refresh. No database required for current use case.
- Single retry on irrelevant results — production version would use multiple query reformulation strategies.
- Render free tier spin-down — first request after inactivity takes 30-60 seconds to wake the server.