Lore Agent
Scholar Agent
Los LLM de propósito general suelen ser inexactos y estar desactualizados en dominios especializados. Scholar Agent combina investigación en línea + acumulación de conocimiento local en un volante de inercia de conocimiento sostenible, haciendo que su IA sea más inteligente en su dominio con el tiempo. También construye una base de conocimiento legible por humanos para un aprendizaje rápido. Se integra perfectamente con Claude Code y VS Code Copilot a través de MCP.
Qué hace
Your question
│
▼
Online research (LLM web search + academic APIs)
│
▼
Structured synthesis (with citations, confidence, uncertainty)
│
▼
Local accumulation (Markdown knowledge cards + BM25 index)
│
▼
Next question: AI checks local first ── hit? ──► use directly, fast & accurate
│ miss
▼
Research again → accumulate → reindex ──► knowledge base keeps growingCada ronda se compone. Las tarjetas de conocimiento tienen una gestión completa del ciclo de vida: borrador → revisado → confiable → obsoleto → desaprobado.
Related MCP server: codememory
Pipeline de investigación académica
Scholar Agent incluye un pipeline integral de investigación de artículos académicos:
Búsqueda de artículos — Busque artículos en arXiv, DBLP y Semantic Scholar. Filtre por las principales conferencias (CVPR, ICCV, ECCV, ICLR, AAAI, NeurIPS, ICML, ACL, EMNLP, MICCAI)
Puntuación inteligente — Motor de puntuación de cuatro dimensiones (relevancia, actualidad, popularidad, calidad) que clasifica los artículos según sus intereses de investigación
Notas de análisis profundo — Generación automática de más de 20 secciones de notas en formato markdown estilo Obsidian con marcadores de posición
<!-- LLM: -->para completar con asistencia de IAExtracción de figuras — Extraiga imágenes de archivos fuente de arXiv y PDF (a través de PyMuPDF)
Recomendaciones diarias — Búsqueda diaria automatizada de artículos, puntuación, deduplicación y generación de notas de recomendación
Artículo → Tarjeta de conocimiento — Convierta los análisis de artículos en tarjetas de conocimiento que se retroalimentan al volante de inercia del conocimiento
Autoenlace de palabras clave — Escanee notas en busca de términos técnicos y cree
[[wiki-links]]automáticamente
Inicio rápido
Integrar en un proyecto existente
cd my-project && git clone https://github.com/zfy465914233/scholar-agent.git
bash scholar-agent/setup.sh
# Restart Claude Code to activateEsto creará la estructura de directorios, copiará las plantillas de configuración, instalará las habilidades y construirá el índice de conocimiento.
Usar como proyecto independiente
# Clone and install
git clone https://github.com/zfy465914233/scholar-agent.git
cd scholar-agent
pip install -r requirements.txt
# Build the knowledge index
python scripts/local_index.py --output indexes/local/index.jsonLas configuraciones de MCP están preconfiguradas:
Claude Code:
.mcp.jsonestá listo.cden el proyecto e inicie Claude Code.VS Code Copilot:
.vscode/mcp.jsonestá listo. Abra el proyecto, habilite el modo agente.
Herramientas MCP
Herramientas principales (siempre disponibles)
Herramienta | Descripción |
| Buscar en la base de conocimiento local |
| Guardar resultados de investigación estructurados como una tarjeta de conocimiento |
| Explorar todas las tarjetas de conocimiento |
| Captura rápida de un par de preguntas y respuestas como tarjeta de borrador |
| Ingerir una URL o texto sin formato en la base de conocimiento |
| Generar un gráfico de conocimiento interactivo (vis.js) |
Herramientas académicas (establezca SCHOLAR_ACADEMIC=1 para habilitar)
Herramienta | Descripción |
| Buscar en arXiv + Semantic Scholar con puntuación de 4 dimensiones |
| Buscar artículos de conferencias a través de DBLP + enriquecimiento S2 |
| Generar notas de análisis profundo en markdown (más de 20 secciones) |
| Extraer figuras de la fuente de arXiv / PDF |
| Convertir el análisis de un artículo en una tarjeta de conocimiento |
| Flujo de trabajo de recomendación diaria de artículos |
| Autoenlace de palabras clave como |
Flujo de trabajo recomendado
Para obtener la mejor calidad de análisis, siga este orden:
Descargar el artículo:
download_paper("2510.24701", title="Paper Title", domain="LLM")Extraer imágenes:
extract_paper_images("2510.24701")(detecta automáticamente el PDF local)Análisis profundo:
analyze_paper(paper_json)(detecta automáticamente el PDF local, extrae el texto completo)
Consejo: Descargar el PDF antes del análisis permite la extracción de texto completo, produciendo notas de alta calidad con datos específicos, fórmulas y resultados experimentales. Sin un PDF local, el análisis se basa solo en el resumen.
Configuración
.scholar.json
El archivo .scholar.json configura las rutas de conocimiento y los ajustes de investigación académica. Consulte .scholar.example.json para ver un ejemplo completo con comentarios.
Secciones clave:
knowledge_dir— Ruta al directorio de tarjetas de conocimientoindex_path— Ruta al índice de búsqueda BM25academic.research_interests— Sus dominios de investigación, palabras clave y categorías de arXivacademic.scoring— Pesos y dimensiones de puntuación de artículos
Variables de entorno
Copie .env.example a .env y configure:
Variable | Requerido | Descripción |
| No | Establecer en |
| No | Clave de API de Semantic Scholar (obtenga una gratis) |
| No | Clave de API de LLM para el pipeline de síntesis avanzada |
Estructura del proyecto
scholar-agent/
├── mcp_server.py # MCP server (13 tools)
├── setup_mcp.py # Embed into existing projects
├── pyproject.toml # Package configuration
├── .scholar.json # Project & academic configuration
├── schemas/ # Answer + evidence JSON schemas
├── scripts/
│ ├── academic/ # Academic research modules
│ │ ├── arxiv_search.py # arXiv + Semantic Scholar search
│ │ ├── conf_search.py # Conference paper search (DBLP)
│ │ ├── paper_analyzer.py # Deep-analysis note generation
│ │ ├── scoring.py # 4-dim paper scoring engine
│ │ ├── image_extractor.py # Figure extraction from PDFs
│ │ ├── note_linker.py # Wiki-link discovery + keyword linking
│ │ └── daily_workflow.py # Daily recommendation pipeline
│ ├── scholar_config.py # Configuration reader
│ ├── local_index.py # BM25 index builder
│ ├── local_retrieve.py # Knowledge retrieval
│ ├── close_knowledge_loop.py # Knowledge card builder
│ └── ... # Research, synthesis, governance, graph
├── knowledge/ # Knowledge cards (gitignored, user-generated)
├── indexes/ # Generated indexes (gitignored)
└── tests/ # 247 testsMás características
Investigación desde múltiples perspectivas — Investigación paralela desde 5 perspectivas (académica, técnica, aplicada, contraria, histórica)
Compatible con Obsidian — Markdown estándar + YAML frontmatter +
[[wiki-links]]CLI de gobernanza del conocimiento — Validar frontmatter, detectar tarjetas huérfanas, encontrar duplicados, gestionar el ciclo de vida
Tolerancia a fallos del proveedor — Cada fuente de búsqueda falla de forma independiente; vuelve a la recuperación local cuando está desconectado
Pruebas
python -m pytest tests/ -v247 pruebas, ~13s. No se necesitan servicios externos.
Licencia
MIT — consulte LICENSE.
Available Tools
12 toolsbuild_graphA
Build an interactive knowledge graph visualization.
Generates a self-contained HTML file showing all knowledge cards as nodes and their wiki-links as edges. Open the output file in a browser to explore the knowledge graph visually. Compatible with Obsidian vaults.
Returns the path to the generated graph.html file.
Inputs: no named parameters. Returns: result
capture_answerA
Capture a useful Q&A answer as a draft knowledge card.
Use this ONLY when a conversation produces a SUBSTANTIVE answer that is worth persisting — meaning it provides genuine technical insight, a non-obvious explanation, or actionable knowledge that cannot be found in standard references.
DO NOT use this tool for:
Single-sentence answers or brief definitions
Answers that could be found in any standard reference (Wikipedia, docs)
Trivial facts, simple yes/no responses, or content shorter than 150 characters
Paper or topic-level knowledge that requires source verification
If you have structured evidence and claims, prefer save_research instead — it produces higher-quality cards with proper source attribution.
The answer text MUST be at least 150 characters. Write a thorough explanation covering the key insight, context, and practical implications.
Inputs: query (required), answer (required), tags, language. Returns: result
fetch_urlA
Fetch a web URL and return its main content as markdown — first-hand retrieval (G5).
抓取网页正文(已做 HTML→正文提取)返回给调用方,用于在 save_research 之前把
knowledge card 建立在一手出处之上,而非凭记忆或摘要。同时把完整正文存本地
快照 knowledge/_snapshots/<sha1(url)>.md(含 captured_at),防止原链接失效
(招聘 JD、网页易下架)后无法回溯(G2)。
典型用法:fetch_url 抓一手 → 基于正文写带具体数字/机制的深度 answer → save_research 存卡。
Inputs: url (required), max_chars. Returns: result
import_paperpulse_noteA
Import a distilled paper note from PaperPulse SaaS directly into the local Scholar Agent knowledge base.
Inputs: paper_id (required), api_token. Returns: result
ingest_sourceA
Ingest a URL or raw text into the knowledge base as a draft card.
For URLs: fetches the page content, extracts text, and saves as a card. For text: saves the provided text directly as a card.
Use this when you want to add external documents, articles, or notes to the knowledge base without requiring structured JSON.
Inputs: source (required), tags, title, language. Returns: result
lint_knowledgeA
Run read-only content health checks over the local knowledge base.
Reports orphan cards, broken wiki-links, cards not updated within stale_days, and highly overlapping titles. This tool never edits files.
Inputs: stale_days. Returns: result
list_knowledgeA
List all knowledge cards in the local knowledge base.
Returns card metadata (id, title, topic, type) for browsing and discovery.
Inputs: topic. Returns: result
query_knowledgeA
Search the local knowledge base for relevant information.
Returns top-k knowledge cards matching the query, with scores and content. Use this to find existing knowledge before doing web research.
Inputs: query (required), limit, rerank. Returns: result
save_researchA
Save structured research results as a knowledge card in the local knowledge base.
The answer_json must conform to schemas/answer.schema.json: { "answer": "detailed answer text", "supporting_claims": [{"claim": "...", "evidence_ids": ["..."], "confidence": "high|medium|low"}], "inferences": ["..."], "uncertainty": ["..."], "missing_evidence": ["..."], "suggested_next_steps": ["..."], "sources": ["https://example.com/source1", "https://example.com/source2"], "visual_aids": [{"type": "mermaid|image_url|image_path", "content": "...", "caption": "...", "alt_text": "..."}] }
IMPORTANT quality requirements:
The "answer" field MUST be at least 200 characters of substantive content.
You MUST include at least 1 supporting_claim with evidence_ids and confidence.
Each claim text MUST be at least 20 characters — vague one-word claims are rejected.
DO NOT create cards with empty supporting_claims — every card needs evidence-backed claims.
Aim for 3+ supporting claims, inferences, uncertainty, and suggested_next_steps for high-quality cards.
DO NOT use this tool for trivial facts or one-sentence answers — those are not worth persisting.
ALWAYS include a "sources" array with the URLs you referenced during research. These are written to the card's frontmatter source_refs for provenance tracking.
evidence_ids in supporting_claims SHOULD cite the source URL (from "sources") — the card renders them as clickable
[host](url)source links. Opaque ids like "s1" stay as bare text and lose the link.For first-hand depth: call
fetch_urlon key sources BEFORE writing the answer, so it cites concrete numbers/mechanisms from the actual page (not memory). fetch_url also archives a local snapshot (knowledge/_snapshots/) so dead links stay traceable. save_research best-effort snapshots any listed sources in the background even without an explicit fetch_url.When language="zh" (default), the entire answer field MUST be written in Chinese (中文). When language="en", write in English.
When to include visual_aids (auto-judge by topic):
Processes / workflows / data flow → mermaid flowchart or sequence diagram
Architecture / system design → mermaid graph or class diagram
Comparisons or hierarchies → mermaid diagram or table
Spatial / geometric concepts → image_url or mermaid
Pure definitions or simple facts → omit visual_aids
When sources contain useful images (charts, diagrams, figures):
If a source page has a relevant diagram/chart with clear explanatory value, include it as visual_aids with type "image_url" and the image's absolute URL
Judge relevance: prefer diagrams explaining mechanisms, architecture overviews, comparison charts, result plots — skip decorative screenshots or generic stock photos
Always provide a descriptive caption explaining what the image shows
For method/procedural content (how-to, implementation, deployment, etc.), also include:
expected_output: Description of what a successful result looks like — output format, shape, key metrics, or acceptance criteria. Synthesize from the answer if sources don't explicitly provide this.
example: A minimal worked example (sample input → processing steps → expected output). Construct synthetically based on the answer if sources lack one. Write '[insufficient data — needs supplementation]' only if impossible to construct.
Visual aids placement (optional after_section field):
"answer" — insert after the main answer paragraph (default for architecture/pipeline diagrams)
"supporting_claims" — insert after claims (default for evidence figures/charts)
"inferences", "uncertainty", "missing_evidence", "suggested_next_steps" — after respective sections
Omit after_section to place at the end of the card (backward compatible)
Inputs: query (required), answer_json (required), domain, language, +1 more. Returns: result
scan_dead_linksA
Diagnose dead source URLs (404/410/connection failure) across knowledge cards.
Probes each unique source_refs URL once (HEAD first, GET fallback) and fans
the result out to every card that cites it. Paywalled domains are reported
as blocked; offline=True marks every URL skipped. Read-only — never
edits cards or snapshots.
Inputs: offline, timeout, concurrency. Returns: result
scan_stale_knowledgeA
Report knowledge cards whose source freshness exceeds domain thresholds.
Unlike lint_knowledge's updated_at check, this uses source_date/captured year with the domain-specific freshness policy used by card validation. This tool is read-only.
Inputs: no named parameters. Returns: result
validate_knowledgeA
Validate local knowledge cards without modifying files.
Runs card frontmatter validation plus body-density/source-freshness checks. Use this before relying on a knowledge base or after bulk imports.
Inputs: verbose. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools have distinct purposes (query, save, ingest, validate, fetch, list, lint, scan, build, import). However, save_research, capture_answer, and ingest_source all persist knowledge cards with different input formats, which could cause confusion despite detailed descriptions.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., query_knowledge, save_research, fetch_url). Verbs are descriptive and the pattern is predictable across all 12 tools.
12 tools is well-scoped for a knowledge management server. The set covers querying, saving, ingesting, validating, listing, linting, scanning dead links, building graphs, and importing notes—no bloat or deficiency.
The tool surface covers create (save, capture, ingest), read (query, list), and checking tools, but lacks update and delete operations for knowledge cards. This is a notable gap that could hinder full life cycle management.
Maintenance
Related MCP Connectors
The project brain for AI coding agents — memory, decisions, sprints, knowledge base via MCP.
A second brain for your AI agent. Shared memory for your team's AI agents, plus public and private knowledge bases — works with ChatGPT, Claude, Cursor and any MCP client.
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Ask your own documents and get answers that cite the source passage. Workspace knowledge bases over MCP for Cursor, Claude and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to retrieve and manage code context with hybrid search, project memory, and observability via MCP tools.30MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to locally search, query, and understand codebases with token-efficient context, dependency graphs, history, architecture diagrams, and metrics through MCP.15 npm3MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to persist and retrieve project knowledge using three MCP tools with local vector and full-text search.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to persistently store, semantically search, and recall project-specific and cross-project knowledge across sessions, with everything kept local in SQLite. It also exposes project context, guidelines, and preferences as MCP resources for agents to read and write directly.-