How hlh-syd/moji-paper-agent works
墨记 is a Chinese research-paper writing agent. Its main workflow starts with registering and profiling a research workspace, optionally building a project understanding, then generating an outline, writing sections with retrieved evidence, reviewing the completed paper, and exporting a DOCX. Separate capabilities include multi-user isolation, chat, multimodal reference-paper retrieval, knowledge-base construction, and observability. The README documents the product workflow and capabilities; source excerpts and the index support selected internal relationships, while many web/API implementation details were not sampled.
Main entry points: web_api.py Web API · outline_generator.py Outline Generator · section_writer.py Section Writer · rag_anything_engine.py Multimodal RAG
Components 21
Research and Writing
- Project Profiler
src/project_indexer.py - Project Understanding
src/project_analyst.py - Domain Adaptation
src/domain.py - Outline Generator
src/outline_generator.py - Section Writer
src/section_writer.py - Conversation Manager
src/conversation_manager.py
Evidence and Knowledge
- Reference Manager
src/reference_manager.py - Reference Parser
src/reference_parser.py - Multimodal RAG
src/rag_anything_engine.py - Vector Store
src/vector_store.py - Knowledge Builders
ingestion - Vision Agent
src/vision_agent.py
Application Platform
- Web Workbench
static/js/app.js - Web API
src/web_api.py - LLM Manager
src/llm_manager.py - RBAC Authentication
src/auth.py - Workspace Storage
src/workspace_store.py
Quality and Operations
- Paper Review
src/paper_checks.py - Paper Actions
src/paper_actions.py - Observability
src/observability.py
Other components
- Researcher
Connections 27
- Researcher → Web Workbench: uses
README.md - Web Workbench → Web API: requests
README.md - Web API → Project Profiler: registers projects
README.md - Web API → Project Understanding: starts understanding
README.md - Web API → Outline Generator: generates outlines
README.md - Web API → Section Writer: generates sections
README.md - Web API → Paper Review: runs review
README.md - Web API → Paper Actions: exports papers
README.md - Project Profiler → Domain Adaptation: detects domain
README.md - Project Understanding → Outline Generator: informs writing
README.md - Domain Adaptation → Outline Generator: sets structure
README.md - Outline Generator → Section Writer: guides sections
README.md - Section Writer → Paper Review: supplies draft
README.md - Paper Review → Paper Actions: enables export
README.md - Web API → Reference Parser: parses references
src/web_api.py - Web API → Multimodal RAG: routes RAG
src/web_api.py - Section Writer → Multimodal RAG: retrieves evidence
src/section_writer.py - Multimodal RAG → Reference Manager: uses papers
- Web API → Conversation Manager: serves chat
src/web_api.py - Conversation Manager → LLM Manager: uses models
src/conversation_manager.py - Outline Generator → Vector Store: retrieves knowledge
src/outline_generator.py - Knowledge Builders → Vector Store: indexes documents
ingestion/build_writing_kb.py - Web API → RBAC Authentication: enforces access
README.md - Web API → Workspace Storage: manages workspace
src/web_api.py - Web API → Observability: records traces
README.md - Web API → Vision Agent: invokes vision
src/web_api.py - Multimodal RAG → LLM Manager: uses model functions