An agentic research tool that turns a company name into a structured, source-backed briefing. The FastAPI backend coordinates specialized research and synthesis steps; the React interface tracks the job and lets you export the finished report as a PDF.
- Researches a company’s business, industry, financial context, and recent news.
- Uses Tavily search and relevance scoring to find and curate source material.
- Synthesizes category briefings with Gemini and produces the final report with OpenAI models.
- Streams research progress to the browser and supports PDF export.
- Optionally persists jobs and reports in MongoDB.
React + Vite UI
│ POST /research
▼
FastAPI application
│
▼
Research graph
analyzers → collector → curator → briefing → editor
│
├── Tavily: research and relevance scoring
├── Gemini: briefing synthesis
└── OpenAI: research tasks and final editing
The UI connects to the API with VITE_API_URL and receives incremental updates from GET /research/{job_id}/stream.
- Python 3.11 or later
- Node.js 18 or later
- API keys for Tavily, Google Gemini, and OpenAI
- A Google Maps API key only if you want location autocomplete
- MongoDB only if you want persistent jobs and reports
-
Create a virtual environment and install the backend dependencies:
uv venv .venv uv pip install -r requirements.txt
If you do not use
uv, create the environment withpython -m venv .venvand install withpip install -r requirements.txt. -
Create
.envfrom the example and set the required backend keys:cp .env.example .env
TAVILY_API_KEY=your_tavily_key GEMINI_API_KEY=your_gemini_key OPENAI_API_KEY=your_openai_key # MONGODB_URI=optional_mongodb_connection_string
-
Configure the frontend:
cp ui/.env.development.example ui/.env.development.local cd ui && npm install && cd ..
Set
VITE_API_URL=http://localhost:8000inui/.env.development.local. AddVITE_GOOGLE_MAPS_API_KEYonly when location autocomplete is needed. -
Start the API in one terminal:
.venv/bin/uvicorn application:app --reload --port 8000
-
Start the UI in a second terminal:
cd ui npm run dev
Open http://localhost:5174. The API is available at http://localhost:8000/docs.
After creating the root .env and ui/.env.development.local files, run:
docker compose up --buildThis exposes the API on port 8000 and the UI on port 5174.
| Method | Endpoint | Purpose |
|---|---|---|
POST |
/research |
Start a research job. |
GET |
/research/{job_id}/stream |
Receive server-sent progress and completion events. |
GET |
/research/{job_id}/report |
Retrieve a completed report. |
POST |
/generate-pdf |
Generate a PDF from report Markdown. |
GET |
/research/pdf/{filename} |
Download a generated PDF. |
Example request:
curl -X POST http://localhost:8000/research \
-H 'Content-Type: application/json' \
-d '{
"company": "Tavily",
"company_url": "https://tavily.com",
"industry": "AI search",
"hq_location": "New York, USA"
}'| Variable | Required | Used by |
|---|---|---|
TAVILY_API_KEY |
Yes | Backend research and curation |
GEMINI_API_KEY |
Yes | Backend briefing synthesis |
OPENAI_API_KEY |
Yes | Backend research and report editing |
MONGODB_URI |
No | Backend job/report persistence |
VITE_API_URL |
Yes | Frontend API connection |
VITE_GOOGLE_MAPS_API_KEY |
No | Frontend location autocomplete |
