Local deep-research multi-agent system: Planner / Finder / Summarizer / Reviewer / Writer pipeline with SSE telemetry, durable sessions, and PDF + Markdown report exports.
- Home page with a search active
- Result screen with PDF download, Markdown download, and preview with sources
- Config panel
- Sessions menu
Production-oriented local deep-research platform with:
- multi-agent orchestration (
Planner -> Finder -> Summarizer -> Reviewer -> Writer) - durable session + document persistence (SQLite on host-mounted path)
- real-time streaming execution telemetry (SSE)
- frontend Mission Control workspace + dedicated result screen
- configurable per-run research controls (iterations, sources, memory, report length)
- Backend: FastAPI + LangGraph orchestration + Ollama adapter
- Frontend: React + Vite + Zustand + Framer Motion
- Persistence:
- session snapshots
- event stream history
- final report documents (JSON + Markdown)
- Session memory:
- new runs can use recent completed sessions as planning context
- UI:
- System / Light / Dark theme modes
- bounded unified workspace panel (agent pipeline + event log aligned height)
- session history drawer with quick open/download/delete actions
- separate full result screen
- Testing:
- backend test suite under
backend/tests/
- backend test suite under
- User starts research from frontend.
- Backend creates a session and starts graph execution.
- Graph emits events through SSE (
/api/research/{session_id}/events). - Backend persists events + session state in SQLite.
- Writer produces final report.
- Backend persists report as:
report_jsonreport_markdown
- Frontend opens dedicated result screen for final report.
Planner: decomposes query into sub-questionsFinder: discovers diverse sourcesSummarizer: extracts evidence from fetched contentReviewer: detects gaps and decides iterationWriter: synthesizes final report with citations
backend/
app/
agents/
api/
core/
models/
tests/
frontend/
src/
components/
hooks/
pages/
stores/
types/
ollama/
- Docker + Docker Compose
- AMD GPU + ROCm setup (for current Ollama container profile)
- Free ports:
5173,8000,11434
- Copy env template:
cp .env.example .env- Set GPU group IDs for your machine:
getent group video | cut -d: -f3
getent group render | cut -d: -f3- Configure persistence path (host machine):
# Host path for Ollama model data
OLLAMA_MODELS_DIR=./data/ollama
OLLAMA_MODEL=gpt-oss:20b
OLLAMA_CONTEXT_LENGTH=8192
OLLAMA_KEEP_ALIVE=5m
# Host path for backend persistent data
BACKEND_DATA_DIR=./data/backend
# Path used inside backend container
DATABASE_PATH=/app/data/research.dbdocker-compose.yml maps:
${OLLAMA_MODELS_DIR}:/ollama-models${BACKEND_DATA_DIR}:/app/data
This keeps both Ollama models and backend sessions/documents on your PC between restarts/redeploys.
docker compose up --build -dOpen:
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:8000 - Custom API docs:
http://localhost:8000/custom-docs
Health checks:
curl http://localhost:8000/health
curl http://localhost:8000/api/statusPer-session options are sent in POST /api/research/start.
| Option | Type | Purpose |
|---|---|---|
maxIterations |
int | Max reviewer/planner loops |
maxSources |
int | Global source cap |
maxSourcesPerQuestion |
int | Cap per sub-question |
searchResultsPerQuery |
int | Search hits requested per query |
sourceDiversity |
bool | Domain diversity enforcement |
reportLength |
`short | medium |
includeSessionMemory |
bool | Include prior completed sessions |
sessionMemoryLimit |
int | Max prior sessions loaded |
summarizerSourceLimit |
int | Max sources deep-summarized |
curl -X POST http://localhost:8000/api/research/start \
-H "Content-Type: application/json" \
-d '{
"query": "Latest practical advances in retrieval-augmented generation",
"options": {
"maxIterations": 4,
"maxSources": 16,
"maxSourcesPerQuestion": 5,
"searchResultsPerQuery": 6,
"sourceDiversity": true,
"reportLength": "long",
"includeSessionMemory": true,
"sessionMemoryLimit": 3,
"summarizerSourceLimit": 8
}
}'GET /healthGET /api/statusPOST /api/research/startGET /api/research/{session_id}/events(SSE)POST /api/research/{session_id}/stopGET /api/research/{session_id}/statusGET /api/research/sessionsDELETE /api/research/sessions/{session_id}GET /api/research/sessions/{session_id}/reportGET /api/research/sessions/{session_id}/documentsGET /api/research/sessions/{session_id}/documents/{document_id}
The project currently includes api/test/* endpoints for validating individual agents and streaming behavior in local/dev environments.
- Workspace includes:
- top research input + progress tracker
- unified panel with agent pipeline (left) and event log (right)
- session history in a slide-out drawer
- Running sessions can be resumed after refresh; event history is replayed before live events continue.
- Result report is rendered on a separate screen (
ResultScreen) instead of inline with running telemetry. - Theme supports system/light/dark with persistent preference.
SQLite tables:
sessionssession_eventssession_documents
Saved documents per completed session:
<session_id>-json(report_json)<session_id>-markdown(report_markdown)
If older runs used Docker named volume open-research_ollama_data, migrate once:
mkdir -p ./data/ollama
docker run --rm \
-v open-research_ollama_data:/from \
-v "$(pwd)/data/ollama:/to" \
alpine sh -c "cp -a /from/. /to/"Then set OLLAMA_MODELS_DIR=./data/ollama in .env and start normally with the bind mount.
docker exec deepresearch-backend sh -lc "cd /app && PYTHONPATH=/app uv run --extra dev pytest -q tests"docker compose build frontenddocker compose up --build -d
docker compose downdocker compose logs -f backend
docker compose logs -f frontend
docker compose logs -f ollamadocker compose build backend
docker compose up -d backendIf deploying outside local machine scope, add:
- reverse proxy (TLS termination, request limits)
- authn/authz for API + UI
- stricter network boundaries (no public Ollama port)
- backup strategy for
${BACKEND_DATA_DIR} - centralized logging/metrics
- CORS policy tailored to your domain topology
- System is optimized for local/self-hosted operation.
- Ollama model and ROCm requirements are hardware-dependent.
- Full research latency depends on model speed and web source availability.
MIT for original code in this repository (FastAPI orchestration backend, React frontend, scripts, Compose configs). Third-party services pulled at runtime (Ollama, the underlying LLM, web search providers) retain their own upstream licenses.



