Multi-Agent Research Assistant

October 10, 2026 (2w ago)

Stack: Python, FastAPI, LangChain, Gemini, Tavily, React, TypeScript, Vite, Tailwind CSS, Playwright, Storybook · Repo: Axeloooo/Multi-Agent-Research-Assistant

Problem

The browser in this project receives only a narrow surface: a fixed allowlist of activity labels, bounded status summaries, and the streamed report and critique. It never sees raw tool calls, provider metadata, chain reasoning or raw exceptions.

Behind that, four agents work on a topic in sequence. The scope is stated as a beta: one process, one job at a time, up to 20 finished runs kept in memory and lost on restart. Durable storage, auth and citations are listed as planned.

Architecture diagram

  React + Vite UI (useResearchRun.ts)
      |  POST /api/runs        DELETE /api/runs/{id}   EventSource
      v                                                    ^
  FastAPI (create_app) -----------------------------------+
      |  enqueue                     GET /api/runs/{id}/events (SSE)
      v                                      ^  ids + Last-Event-ID replay
  RunRegistry: one active run, in memory ----+
      |  pipeline_factory                    ^ typed PipelineEvent
      v                                      |
  stream_research_pipeline -------------------+
      |
      v
  Search agent (Tavily web_search)
      v
  Reader agent (scrape_url)
      v
  Writer chain  --> streams report deltas
      v
  Critic chain  --> streams critique deltas
 
  Completed runs only: report.md and result.json downloads

POST /api/runs queues a run in RunRegistry, which runs one asyncio task at a time. Search and Reader are LangChain agents with one tool each; Writer and Critic are prompt, model and output-parser chains, all on a Gemini flash-lite model. The registry stores events with ids so EventSource can reconnect and replay from Last-Event-ID, with a keepalive every 15 seconds.

Key decisions

Challenges

Results

Links