Academic knowledge graph system — symbol-driven research discovery with lightweight vector retrieval
0
stars
123
commits
Python
primary language
Sep 11, 2026
updated
Your AI coding agent already reads code and writes code. DrBrain gives it a structured knowledge graph of academic papers — so it can search literature, trace causal chains, find research gaps, and infer new relationships through rule-based reasoning.
cat.git clone https://github.com/UynajGI/DrBrain.git
cd DrBrain
uv sync && uv pip install -e .
drbrain setup # interactive wizard (bilingual EN / 中文)
This creates ~/DrBrain/ as your library root
(%USERPROFILE%/DrBrain on Windows).
# Ingest → build → embed → closure (all incremental)
drbrain fetch "10.1038/nature14539" # grab a paper by DOI
drbrain build # 5-stage LLM extraction
drbrain embed # TransE graph embeddings
drbrain closure # rule-based inference
drbrain ask "What gaps remain in deep learning?"
# Or chain everything at once
drbrain pipeline --preset full
pipx install drbrainanduv tool install drbrainare coming in beta.
| Category | Feature | Details |
|---|---|---|
| Ingest | PDF → structured knowledge | MinerU parsing → 5-source metadata cross-validation (arXiv, CrossRef, S2, OpenAlex, DeepXiv) → LLM tree structuring |
| Build | 5-stage concept extraction (incremental) | Ontology extension → entity extraction (10-way concurrent) → relation extraction → coreference → iterative refinement |
| Query | BM25 + graph-enhanced search | Keyword search with multiplicative PageRank boost, directed graph traversal, hybrid ranking |
| RAG Retrieval | LlamaIndex hybrid engine | BM25 + vector + tree retrieval fused via RRF, rerank, drbrain hybrid one-shot query, drbrain rag index/eval |
| Knowledge Graph | Rule-based closure (incremental) | 8+4 inference rules, t-norm transitive grounding, TransE embeddings for link prediction |
| Concept Graph | Corpus-scale co-occurrence map | drbrain cg — concept graph build/embed/neighbors, UMAP map export, leakage-free trend prediction |
| Reasoning | Symbol-driven discovery | Causal chains, confidence propagation, counterfactual analysis, cross-domain isomorphism, hypothesis generation |
| Workflows | 7 structured reasoning pipelines | review, gap-analysis, impact, compare, frontier, lineage, paradigm |
| Sessions | Persistent reasoning context | DB-backed multi-turn sessions, build context injection, cross-invocation continuity |
| Analyze | Knowledge frontier reports | Research seeds, debate zones, technology cliffs, LLM executive summary |
| Citations | Multi-source expansion | Forward/backward citations, shared-reference analysis, citation verification |
| Export | BibTeX, RIS, Markdown + OKF | 4 citation styles (APA, Vancouver, Chicago, MLA) + OKF v0.1 markdown bundle |
| Import | Zotero, BibTeX, Endnote | Web API + local SQLite for Zotero, XML/RIS for Endnote |
| Genealogy | Concept lineage + descendants | Evolution trees, academic offspring, paradigm shift detection, cross-domain migration |
| Fetch | PDF acquisition from OA sources | 5-stage fallback (arXiv, OpenAlex, Unpaywall, direct DOI), proxy support |
| Federated Search | Local + arXiv | Cross-source search with ingested-status annotation |
| Patent Search | USPTO PPUBS + ODP | Free (PPUBS) or API-key (ODP) patent search |
| Pipeline | Step chaining (incremental) | Presets (full/quick/embed) + custom steps; --full forces rebuild |
| Audit | Data quality scan | 15 severity-graded rules, PDF pre-validation, ingest quality gates |
setup ingest ingest-link fetch batch-fetch build embed closure
query search hybrid ask reason graph analyze survey evolve
landscape frontier paradigm citations check-citations export
export-okf import translate session ws cg rag pipeline
repair enrich audit backup restore metrics document fsearch
patent-search proceedings explore report seed list stats show
index queue delete lineage style check clean webui
Run drbrain --help for the full list, or see the
CLI Reference.
Install DrBrain skills so your coding agent can use them:
npx skills add https://github.com/UynajGI/DrBrain/skills
Skills follow the open AgentSkills.io standard and work with Claude Code, Codex, Cline, Cursor, Windsurf, Qwen Code, GitHub Copilot, and other AI coding tools.
drbrain setup walks you through the basics interactively (bilingual
EN / 中文):
drbrain check verifies your environment end-to-end. See
Configuration for every setting.
| Getting Started | From install to first query |
| CLI Reference | All commands with examples |
| Architecture | System design and reasoning modules |
| Configuration | Every setting, default, and provider template |
| Workflows | Structured reasoning workflow guide |
| Sessions | Persistent Session Agent deep dive |
| Embedding | Local, openai-compat, and none providers |
| Concept Graph Handover | Corpus-scale concept graph design and status |
| RAG Current State | LlamaIndex retrieval layer baseline and status |
| Troubleshooting | Common problems and recovery |
| Skills Reference | 27 agent skills and their CLI commands |
| Contributing | How to add commands, modules, and skills |
DrBrain's agent-first design is inspired by ScholarAIO — the pioneering "research infrastructure for AI agents." DrBrain takes a different technical path: symbol-driven knowledge graph reasoning on top of a corpus-scale hybrid retriever (BM25 + vector + tree + graph, RRF-fused) whose vectors live on semantically-complete tree nodes rather than full-text chunks. Tree-structured retrieval is inspired by PageIndex and RAPTOR.
Contributions are welcome — bug reports, feature requests, docs, and code all help. See CONTRIBUTING.md for the full guide.
Quick start for contributors:
git clone https://github.com/UynajGI/DrBrain.git && cd DrBrain
uv sync && uv pip install -e .
pre-commit install # optional: auto-lint on commit
uv run pytest -m "not integration" # fast tests
Before opening a PR, make sure these pass:
uv run ruff check . && uv run ruff format --check .
uv run mypy src/drbrain
uv run pytest -m "not integration"
We follow Conventional Commits
(feat:, fix:, docs:, refactor:, test:, chore:).
Have a question or idea? Open a discussion. Found a bug? File an issue.
MIT — see LICENSE.
118 commits
5 commits
Python
98.9%
Academic knowledge graph system — symbol-driven research discovery with lightweight vector retrieval
0
stars
123
commits
Python
primary language
Sep 11, 2026
updated
Your AI coding agent already reads code and writes code. DrBrain gives it a structured knowledge graph of academic papers — so it can search literature, trace causal chains, find research gaps, and infer new relationships through rule-based reasoning.
cat.git clone https://github.com/UynajGI/DrBrain.git
cd DrBrain
uv sync && uv pip install -e .
drbrain setup # interactive wizard (bilingual EN / 中文)
This creates ~/DrBrain/ as your library root
(%USERPROFILE%/DrBrain on Windows).
# Ingest → build → embed → closure (all incremental)
drbrain fetch "10.1038/nature14539" # grab a paper by DOI
drbrain build # 5-stage LLM extraction
drbrain embed # TransE graph embeddings
drbrain closure # rule-based inference
drbrain ask "What gaps remain in deep learning?"
# Or chain everything at once
drbrain pipeline --preset full
pipx install drbrainanduv tool install drbrainare coming in beta.
| Category | Feature | Details |
|---|---|---|
| Ingest | PDF → structured knowledge | MinerU parsing → 5-source metadata cross-validation (arXiv, CrossRef, S2, OpenAlex, DeepXiv) → LLM tree structuring |
| Build | 5-stage concept extraction (incremental) | Ontology extension → entity extraction (10-way concurrent) → relation extraction → coreference → iterative refinement |
| Query | BM25 + graph-enhanced search | Keyword search with multiplicative PageRank boost, directed graph traversal, hybrid ranking |
| RAG Retrieval | LlamaIndex hybrid engine | BM25 + vector + tree retrieval fused via RRF, rerank, drbrain hybrid one-shot query, drbrain rag index/eval |
| Knowledge Graph | Rule-based closure (incremental) | 8+4 inference rules, t-norm transitive grounding, TransE embeddings for link prediction |
| Concept Graph | Corpus-scale co-occurrence map | drbrain cg — concept graph build/embed/neighbors, UMAP map export, leakage-free trend prediction |
| Reasoning | Symbol-driven discovery | Causal chains, confidence propagation, counterfactual analysis, cross-domain isomorphism, hypothesis generation |
| Workflows | 7 structured reasoning pipelines | review, gap-analysis, impact, compare, frontier, lineage, paradigm |
| Sessions | Persistent reasoning context | DB-backed multi-turn sessions, build context injection, cross-invocation continuity |
| Analyze | Knowledge frontier reports | Research seeds, debate zones, technology cliffs, LLM executive summary |
| Citations | Multi-source expansion | Forward/backward citations, shared-reference analysis, citation verification |
| Export | BibTeX, RIS, Markdown + OKF | 4 citation styles (APA, Vancouver, Chicago, MLA) + OKF v0.1 markdown bundle |
| Import | Zotero, BibTeX, Endnote | Web API + local SQLite for Zotero, XML/RIS for Endnote |
| Genealogy | Concept lineage + descendants | Evolution trees, academic offspring, paradigm shift detection, cross-domain migration |
| Fetch | PDF acquisition from OA sources | 5-stage fallback (arXiv, OpenAlex, Unpaywall, direct DOI), proxy support |
| Federated Search | Local + arXiv | Cross-source search with ingested-status annotation |
| Patent Search | USPTO PPUBS + ODP | Free (PPUBS) or API-key (ODP) patent search |
| Pipeline | Step chaining (incremental) | Presets (full/quick/embed) + custom steps; --full forces rebuild |
| Audit | Data quality scan | 15 severity-graded rules, PDF pre-validation, ingest quality gates |
setup ingest ingest-link fetch batch-fetch build embed closure
query search hybrid ask reason graph analyze survey evolve
landscape frontier paradigm citations check-citations export
export-okf import translate session ws cg rag pipeline
repair enrich audit backup restore metrics document fsearch
patent-search proceedings explore report seed list stats show
index queue delete lineage style check clean webui
Run drbrain --help for the full list, or see the
CLI Reference.
Install DrBrain skills so your coding agent can use them:
npx skills add https://github.com/UynajGI/DrBrain/skills
Skills follow the open AgentSkills.io standard and work with Claude Code, Codex, Cline, Cursor, Windsurf, Qwen Code, GitHub Copilot, and other AI coding tools.
drbrain setup walks you through the basics interactively (bilingual
EN / 中文):
drbrain check verifies your environment end-to-end. See
Configuration for every setting.
| Getting Started | From install to first query |
| CLI Reference | All commands with examples |
| Architecture | System design and reasoning modules |
| Configuration | Every setting, default, and provider template |
| Workflows | Structured reasoning workflow guide |
| Sessions | Persistent Session Agent deep dive |
| Embedding | Local, openai-compat, and none providers |
| Concept Graph Handover | Corpus-scale concept graph design and status |
| RAG Current State | LlamaIndex retrieval layer baseline and status |
| Troubleshooting | Common problems and recovery |
| Skills Reference | 27 agent skills and their CLI commands |
| Contributing | How to add commands, modules, and skills |
DrBrain's agent-first design is inspired by ScholarAIO — the pioneering "research infrastructure for AI agents." DrBrain takes a different technical path: symbol-driven knowledge graph reasoning on top of a corpus-scale hybrid retriever (BM25 + vector + tree + graph, RRF-fused) whose vectors live on semantically-complete tree nodes rather than full-text chunks. Tree-structured retrieval is inspired by PageIndex and RAPTOR.
Contributions are welcome — bug reports, feature requests, docs, and code all help. See CONTRIBUTING.md for the full guide.
Quick start for contributors:
git clone https://github.com/UynajGI/DrBrain.git && cd DrBrain
uv sync && uv pip install -e .
pre-commit install # optional: auto-lint on commit
uv run pytest -m "not integration" # fast tests
Before opening a PR, make sure these pass:
uv run ruff check . && uv run ruff format --check .
uv run mypy src/drbrain
uv run pytest -m "not integration"
We follow Conventional Commits
(feat:, fix:, docs:, refactor:, test:, chore:).
Have a question or idea? Open a discussion. Found a bug? File an issue.
MIT — see LICENSE.
118 commits
5 commits
Python
98.9%