Production-ready multi-agent research system with LangGraph orchestration, real-time SSE traces, guardrails, and operational monitoring.
- Searcher, Summarizer, and Critic agents with structured trace events.
- LangGraph orchestration with single-run streaming and synchronous execution paths.
- FastAPI endpoints for health, SSE streaming, synchronous research run, and metrics.
- Input guardrails, request IDs, rate limiting, CORS allowlist, and security headers.
- React frontend for streaming trace cards and final source-grounded answer rendering.
- Integration and unit tests for API and agent behavior.
- Execution budget modes with small, medium, and large source budgets.
- Deterministic evaluation harness for quality and citation-faithfulness checks.
- Governance baseline: contributing, security, architecture, API, deployment, testing, changelog, prompt guide, templates, ownership.
api/main.py- API service, SSE stream endpoint, and operational controls.agents/- Searcher, Summarizer, Critic, and LangGraph workflow.frontend/- React research console and trace visualization UI.prompts/- role instructions for each agent.tests/- backend API and agent unit/integration coverage.docs/- architecture, API, deployment, testing, and prompt governance.
# backend
pip install -r requirements.txt
uvicorn api.main:app --reload --port 8002
# frontend
cd frontend
npm ci
npm run dev -- --host 0.0.0.0 --port 4175Then open:
- API health: http://127.0.0.1:8002/health
- Frontend console: http://127.0.0.1:4175
pip install -r requirements.txt
uvicorn api.main:app --reload --port 8002Optional backend security env vars:
RESEARCH_API_KEY=
RATE_LIMIT_PER_MINUTE=90
APP_ENV=development
CORS_ORIGINS=http://127.0.0.1:4175,http://localhost:4175
ALLOWED_HOSTS=127.0.0.1,localhost,api,frontend
DEFAULT_EXECUTION_TIER=mediumExecution budget tiers:
- small: source budget cap 3
- medium: source budget cap 5
- large: source budget cap 8
cd frontend
npm ci
npm run dev -- --host 0.0.0.0 --port 4175cp .env.example .env
# Edit .env and set APP_ENV=production plus RESEARCH_API_KEY before first deploy
docker compose -f docker-compose.prod.yml up -d --buildProduction endpoints:
- Frontend: http://127.0.0.1:4175
- API via frontend proxy: http://127.0.0.1:4175/api/health
Optional monitoring profile:
docker compose -f docker-compose.prod.yml --profile monitoring up -dAgent trace demo:
Architecture overview:
Trace console preview:
GET /healthGET /research(SSE stream, protected when API key is configured)POST /research/run(sync execution, protected when API key is configured)GET /metrics
- Deterministic eval scenarios in
eval/scenarios/deterministic_eval.json. - Evaluation harness in
tools/evaluate_research.py. - Tool access boundary guidance in
docs/GUARDRAILS.md. - Trace walkthrough in
docs/TRACE_WALKTHROUGH.md. - Sequence diagram in
docs/SEQUENCE_DIAGRAM.md.
Run deterministic evaluation:
python tools/evaluate_research.py --scenario-file eval/scenarios/deterministic_eval.json --output-json eval/results/deterministic_eval_results.json- Before and after outcomes are documented in
docs/WEEK11_MEASURED_OUTCOMES.md. - Reliability evidence includes checklist retention, docs growth, workflow expansion, and test-surface growth.
- Cost-aware execution evidence includes source-budget tier charting (
small,medium,large).
# backend tests
pytest -q
# frontend production build
cd frontend && npm run build- Run backend tests:
pytest -q. - Run frontend production build validation:
cd frontend && npm run build. - Run extended release checks in the Production Verification section before semantic tags.
Run before creating release tags:
# backend
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m compileall -q api agents tests tools
python -m pip check
pytest -q --maxfail=1
pip-audit -r requirements.txt --progress-spinner off
# frontend
cd frontend
npm ci
npm run build
npm audit --omit=dev --audit-level=high
# container images
docker build -f Dockerfile -t agentic-research-assistant-api:local .
docker build -f frontend/Dockerfile --build-arg VITE_API_URL=/api -t agentic-research-assistant-frontend:local frontendExpected outcome:
- Backend compile, tests, and dependency checks pass.
- Frontend production build completes successfully.
- Dependency audits show no high-severity blockers.
- API: http://127.0.0.1:8002
- Frontend: http://127.0.0.1:4175
docs/ARCHITECTURE.mddocs/API.mddocs/DEPLOYMENT.mddocs/TESTING.mddocs/PROMPT_GUIDE.mddocs/GUARDRAILS.mddocs/TRACE_WALKTHROUGH.mddocs/SEQUENCE_DIAGRAM.md.claude/CLAUDE.md.github/workflows/release.yml
Dockerfile(backend production image)frontend/Dockerfile(frontend production image)frontend/nginx/default.conf(SPA serving, API proxy, SSE-safe settings)docker-compose.prod.yml(production stack with health checks)
- Current orchestration executes a fixed three-agent sequence.
- Live external search quality depends on provider API availability and quotas.
- Add retrieval provider abstraction with ranked source fusion.
- Add policy-driven redaction for sensitive snippets in traces.
- Add latency-budget controls and adaptive source count selection.
