Skip to main content

Scholar Agent

Python 3.10+ License: MIT MCP Ready Tests PyPI

中文

AI that gets smarter in YOUR domain — every question compounds.
Online research + local knowledge accumulation + MCP integration for Claude Code & VS Code Copilot.


Demo

Scholar Agent Demo

Ask → Research → Accumulate → Next question hits local cache instantly

Knowledge Flywheel

Each round compounds. Knowledge cards have full lifecycle management: draft → reviewed → trusted → stale → deprecated.


Why Scholar Agent?

ChatGPT / Claude Obsidian + Plugins Zotero Scholar Agent
Domain knowledge accumulates No — every chat starts fresh Manual curation Bibliography only Automatic — every query compounds
Structured research with citations Sometimes Manual Partial Yes — structured synthesis + confidence scores
Academic paper pipeline Limited Via plugins Yes Search → Score → Analyze → Extract → Recommend
Works offline No Yes Partial Yes — local BM25 index, falls back gracefully
Human-readable knowledge base Chat history Markdown files PDF library Obsidian-compatible Markdown + wiki-links
Integrates with your IDE No No Partial MCP server for Claude Code, VS Code Copilot, OpenCode
Knowledge quality gates None None None Lifecycle management + quality scoring + validation

Quick Start

Install

pip install py-scholar-agent

Or from source:

git clone https://github.com/zfy465914233/scholar-agent.git
cd scholar-agent
pip install -e .

Setup

scholar-agent init

One command creates data directories, writes config, and registers MCP with Claude Code. You're done.

Modes

Mode Command Data Location Scope
Global (recommended) scholar-agent init ~/scholar/ Every project
Project-Local SCHOLAR_HOME=./scholar scholar-agent init my-project/scholar/ Current project only
Docker docker run -v ~/scholar:/data scholar-agent serve-mcp Container volume Isolated

What It Does

Knowledge Flywheel

Ask a question → Scholar Agent researches (web + academic APIs) → synthesizes a structured answer with citations → saves as a knowledge card → indexes it with BM25. Next time a similar question comes up, it hits the local index first — fast, accurate, and free.

Academic Research Pipeline

  • Paper Search — arXiv, DBLP, Semantic Scholar. Filter by 10+ top conferences
  • Smart Scoring — 4-dimensional engine (relevance, recency, popularity, quality)
  • Deep Analysis — 20+ section Obsidian-style notes with AI-assisted completion
  • Figure Extraction — From arXiv source archives and PDFs
  • Daily Recommendations — Automated search, scoring, deduplication
  • Paper → Knowledge Card — Feed analyses back into the flywheel
  • Keyword Auto-Linking — [[wiki-links]] across all notes

MCP Tools

Core (always available): query_knowledge · save_research · list_knowledge · capture_answer · ingest_source · build_graph

Academic (set SCHOLAR_ACADEMIC=1): search_papers · search_conf_papers · download_paper · analyze_paper · extract_paper_images · paper_to_card · daily_recommend · link_paper_keywords


CLI Reference

Command Description
scholar-agent init One-command setup: data dirs + config + MCP registration
scholar-agent serve-mcp Start the MCP server
scholar-agent doctor Show environment and config diagnostics
scholar-agent config show Show resolved configuration
scholar-agent install claude --write Register MCP with Claude Code
scholar-agent install vscode --write Register MCP with VS Code Copilot
scholar-agent install opencode --write Register MCP with OpenCode

Configuration

Environment Variables

Variable Required Description
SCHOLAR_ACADEMIC No Set to 1 to enable academic tools
SCHOLAR_HOME No Override data directory (default: ~/scholar/)
S2_API_KEY No Semantic Scholar API key (get one free)
LLM_API_KEY No LLM API key for advanced synthesis pipeline

Config File

See .scholar.example.json for a full example with comments. Key sections:

  • knowledge_dir — Knowledge cards directory
  • index_path — BM25 search index
  • academic.research_interests — Your domains, keywords, arXiv categories
  • academic.scoring — Paper scoring weights

For best paper analysis quality:

  1. Download: download_paper("2510.24701", title="Paper Title", domain="LLM")
  2. Extract images: extract_paper_images("2510.24701")
  3. Deep analysis: analyze_paper(paper_json)

Downloading the PDF first enables full-text extraction, producing notes with specific data, formulas, and experimental results.


Development

make dev       # Install with dev dependencies + pre-commit hooks
make lint      # Run ruff + mypy
make test      # Run test suite (276 tests, ~7s, fully offline)
make coverage  # Run tests with coverage report
make build     # Build distribution package
make docker    # Build Docker image

See CONTRIBUTING.md for detailed guidelines.

Features at a Glance

  • Multi-perspective research — 5 perspectives (academic, technical, applied, contrarian, historical)
  • Obsidian compatible — Markdown + YAML frontmatter + [[wiki-links]]
  • Knowledge governance — Validate frontmatter, detect orphans, find duplicates, manage lifecycle
  • Provider fault tolerance — Each source fails independently; graceful offline fallback
  • Cross-platform — macOS, Linux, Windows

License

MIT — see LICENSE.

Metadata

Release files for py-scholar-agent 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-scholar-agent 0.1.0
File Size Uploaded Provenance Actions
py_scholar_agent-0.1.0.tar.gz 206.1 kB With provenance Details for py_scholar_agent-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-scholar-agent 0.1.0
File Interpreter ABI Platform Actions
py_scholar_agent-0.1.0-py3-none-any.whl Python 3 none any Details for py_scholar_agent-0.1.0-py3-none-any.whl

Total release size: 408.7 kB

Release files / py_scholar_agent-0.1.0.tar.gz

Download URL py_scholar_agent-0.1.0.tar.gz
Size 206.1 kB
Tags Source
SHA-256 checksum
How to use checksums
016bfb09ead7dd3d6d427c1048a66d5c3b6296bf394e49f2f7144919e79afb3c
BLAKE2b-256 checksum
How to use checksums
d395ed2c217d71d64d57207a74208b392a4e7194694a21564ceb907e0794e3ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

Release files / py_scholar_agent-0.1.0-py3-none-any.whl

Download URL py_scholar_agent-0.1.0-py3-none-any.whl
Size 202.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0449e5b30908ff832ce71cd6e82040b398bce3c7ed487f057cbd49dc7c3c60d1
BLAKE2b-256 checksum
How to use checksums
efa84cecffbd03e4b630bc5e11ff76a5a9853f171f12c13e5146d61276d09047
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

Security for py-scholar-agent 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for py_scholar_agent-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page