Local-first, citation-honest, reproducible AI research agent. Span-grounded citations, trace + replay, multi-format export, MCP server. Runs on Ollama.
Project description
DeepDive
A local-first AI research agent. Asks a question, searches the web (or your own documents), reads the sources, and writes a cited report. Every claim is checked against a verbatim excerpt from its source — claims the validator can't verify are dropped.
pip install deepdive-research
ollama pull llama3.2
deepdive research "When did Apollo 11 land on the Moon?" -o report.md
No API key required. Runs on Ollama by default.
Features
Span-grounded citations
The claim extractor returns each claim alongside the verbatim excerpt that supports it. A post-extraction validator re-checks every excerpt against the fetched source page via substring match. Claims that don't ground get dropped from the report.
The Markdown report ends with an Evidence appendix listing every claim and its verbatim source excerpt:
**1.** Apollo 11 landed on the Moon on July 20, 1969.
- [✓] [Apollo 11 - Wikipedia](https://en.wikipedia.org/wiki/Apollo_11)
> Apollo 11 (July 16-24, 1969) was the American spaceflight that
> first landed humans on the Moon, and the fifth crewed mission of
> NASA's Apollo program.
Trace and replay
Every research run can record a trace of every LLM call, search, and scrape. Replay reconstructs the report offline, byte-for-byte.
deepdive research "..." -o report.md # auto-records report.md.trace.jsonl
deepdive replay report.md.trace.jsonl # produces an identical report, no network
deepdive trace verify report.md.trace.jsonl # re-validates every excerpt
deepdive inspect report.md.trace.jsonl # event counts
Source restriction
Restrict search to your own allow/block lists of hostnames. Subdomains match; wildcards like *.gov are supported.
deepdive research "..." --allow-domains arxiv.org,nih.gov
deepdive research "..." --block-domains medium.com,*.substack.com
Local corpus and offline mode
Index your own documents into a sqlite-vec database, then research them with no outbound network calls.
deepdive index ~/Documents/papers -o ~/.local/share/deepdive/index.db
deepdive research "..." --corpus ~/.local/share/deepdive/index.db --offline
In --offline mode the LLM endpoint must be loopback (Ollama is fine; cloud APIs raise) and non-loopback URLs are dropped at the scraper level.
Multi-format export
deepdive research "..." -o report.md # markdown (default)
deepdive research "..." -o paper.tex --export latex # +references.bib
deepdive research "..." -o data.json --export json
deepdive research "..." -o note.md --export obsidian # YAML + [[wikilinks]]
deepdive research "..." -o page.md --export notion
deepdive research "..." -o refs.bib --export bibtex
Use as an MCP server
Expose DeepDive's research tool to any MCP-compatible client.
deepdive serve-mcp # stdio
deepdive serve-mcp --http --port 8765 # Streamable HTTP
Install
pip install "deepdive-research[all]" # everything: MCP server, corpus indexing
pip install "deepdive-research[mcp]" # MCP server only
pip install "deepdive-research[corpus]" # local corpus indexing only
ollama pull llama3.2 # tool-capable LLM (default)
ollama pull nomic-embed-text # embeddings (only needed for --corpus)
Architecture
DeepDive is built on actants. The pipeline:
question
│
▼ query generation (LLM)
search backend (DuckDuckGo / SearxNG / local corpus)
│ │ optional: --allow / --block filter
▼ scraper (web / corpus / offline)
claim extractor (LLM, returns excerpts)
│
▼ span-grounding validator (drops claims without verbatim excerpts)
cross-reference
│
▼ report builder (LLM)
Markdown / LaTeX / BibTeX / JSON / Obsidian / Notion
Every external call is wrapped in optional recorders, which is how trace and replay work.
What's not in scope
- Hosted SaaS or paid tier — DeepDive is open-source and runs on your hardware
- Multi-modal output (charts, infographics)
- Conversational follow-up on a single report — single-shot research only
- Browser automation
- Code execution as a research step
Status
- Version: 0.3.1
- License: MIT
- Python: 3.12+
- Framework: actants ≥ 0.5.0
Part of Open Intelligence Labs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deepdive_research-0.3.2.tar.gz.
File metadata
- Download URL: deepdive_research-0.3.2.tar.gz
- Upload date:
- Size: 58.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94861c4c7a6f92dc72cf4ae338aa14173c6d2b7b82246cbc770796aa20271e47
|
|
| MD5 |
60bec86bed1b7ced8bfab118b59d689a
|
|
| BLAKE2b-256 |
5f98705497f107a88abe6890e9b38c92703e6eb7aff1811ac0c799f7316fb53c
|
Provenance
The following attestation bundles were made for deepdive_research-0.3.2.tar.gz:
Publisher:
release.yml on openintelligence-labs/deepdive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deepdive_research-0.3.2.tar.gz -
Subject digest:
94861c4c7a6f92dc72cf4ae338aa14173c6d2b7b82246cbc770796aa20271e47 - Sigstore transparency entry: 2285160415
- Sigstore integration time:
-
Permalink:
openintelligence-labs/deepdive@5d308d24d1ed1152ffb0f981faf52165c4cd4b5d -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/openintelligence-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5d308d24d1ed1152ffb0f981faf52165c4cd4b5d -
Trigger Event:
push
-
Statement type:
File details
Details for the file deepdive_research-0.3.2-py3-none-any.whl.
File metadata
- Download URL: deepdive_research-0.3.2-py3-none-any.whl
- Upload date:
- Size: 54.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91aabcc50897a2c9dd83cac9493731d9416ed8d5a14a447108c70cd4c06aa0b1
|
|
| MD5 |
bd09d8193ed46910194cd9c8ee210ce5
|
|
| BLAKE2b-256 |
5dcf20e196674c1e7380831c81cfd33fe4b228d09f7d05a021c1ea52571239b3
|
Provenance
The following attestation bundles were made for deepdive_research-0.3.2-py3-none-any.whl:
Publisher:
release.yml on openintelligence-labs/deepdive
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deepdive_research-0.3.2-py3-none-any.whl -
Subject digest:
91aabcc50897a2c9dd83cac9493731d9416ed8d5a14a447108c70cd4c06aa0b1 - Sigstore transparency entry: 2285160447
- Sigstore integration time:
-
Permalink:
openintelligence-labs/deepdive@5d308d24d1ed1152ffb0f981faf52165c4cd4b5d -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/openintelligence-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5d308d24d1ed1152ffb0f981faf52165c4cd4b5d -
Trigger Event:
push
-
Statement type: