research-engine
User Question → Research Planning → Parallel Information Acquisition → Evidence Extraction → Context Graph Construction → Knowledge Graph Integration → Multi-Agent Reasoning → Research Report + Discoveries
Three foundational systems
Parallel Research Engine. A planner staffs ten specialized research agents (Academic, Industry, Patent, Open Source, Market, News, Expert Opinion, Historical Context, Technical Documentation, Regulatory) and an asyncio orchestrator fans out agent × source × query tasks through a worker pool — concurrency is a config knob; per-source semaphores keep every public API within its limits.
Context Graph. Per-session situational awareness updated live as documents land: entities, claims, evidence, branches, deterministic contradiction candidates, confidence rollups, open questions. If a local DataHub is running, the session is emitted as a dataset with per-source lineage — research provenance as first-class metadata.
Knowledge Graph. Persistent across sessions. Entity resolution in three rungs: exact/alias match → embedding similarity (Qdrant embedded) → judge-model confirmation from a different model family. Edges keep history (first/last seen, sessions, evidence counts); the planner consults the KG before every run, so the engine never relearns what it already verified.
Six graph-reasoning agents
| Agent | Mechanism |
|---|---|
| Verification | deterministic gate: reliability ≥ 0.7 single-source, or ≥ 2 independent sources ≥ 0.45 |
| Contradiction | opposite-polarity pairing → judge confirms; never auto-confirms |
| Research Analyst | per-branch summaries voiced only from verified claims |
| Discovery | graph paths whose endpoints are evidenced by different source categories |
| Trend | emerging = measured: recent 90-day evidence ≥ 2× trailing baseline |
| Question | unresolved questions + weak entities → follow-up research paths |
Sources, honestly
14 adapters live keyless (arXiv, OpenAlex, Semantic Scholar, PubMed, Crossref, Wikipedia, GitHub, GitLab, Hugging Face, Hacker News, Stack Exchange, GDELT, data.gov, Reddit-degraded). Six more ship fully implemented but disabled fail-closed until an API key is pasted (Brave, Serper, NewsAPI, IEEE, PatentsView, Kaggle); WIPO is an honest stub because no free API exists. Every report includes the full source status table — live, degraded, needs-key, error.
Run it
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt .venv/bin/python -m research_engine "the future of AI hardware" # or the API: .venv/bin/uvicorn research_engine.api.app:app --port 8017
Local-first: Ollama for all model roles (judge separated by family), Qdrant in embedded mode, SQLite, asyncio queue. The spec's server stack — Neo4j, PostgreSQL, Redis, Qdrant server — is a config flip per layer, adapters included.