How tswoen/paper-agent works
Paper-Agent is a research-assistant workbench that turns a research topic into a traceable literature review. The principal workflow runs from session submission through search planning, multi-source retrieval, relevance reading and full-text indexing, layered analysis, outlining, and evidence-based section writing. The Vue workbench presents progress and results over an API/SSE session runtime; settings provide model and embedding configuration. The README documents these product stages and capabilities; some subsystem links below are therefore cited to it rather than inferred from unsampled implementations.
Main entry points: runtime.py Workflow Runtime · read_node.py Relevance Reading · session_runs.py Run Service · base.py LLM Providers
Components 22
Research Workbench
- Session Workbench
front/src/views/SessionWorkspaceView.vue - Topic Composer
front/src/components/session/SessionComposer.vue - Progress Timeline
front/src/lib/session-stream-aggregator.ts - Model Settings
front/src/views/SystemSettingsView.vue
Sessions and Runtime
- Session API
src/api/routers/sessions.py - Run Service
src/services/session_runs.py - Workflow Runtime
src/graph/runtime.py - Session Store
src/repositories/sessions/sqlite.py
Research Workflow
- Search Planning
src/agents/searchAgent.py - Relevance Reading
src/graph/read_node.py - Research Analysis
src/graph/analyse_node.py - Evidence Outline
src/graph/writing_outline_node.py - Review Writing
src/graph/writing_node.py
Sources and Indexing
- Paper Retrieval
src/paper_retrieval/service.py - Source Connectors
src/paper_retrieval/connectors - Full-text Processing
src/utils/read_utils/read_fulltext.py - Text Chunking
src/utils/read_utils/chunkers.py - Paper Vector Store
src/repositories/chroma/read_vector_store.py
Models and Settings
- LLM Providers
src/llm/base.py - Settings Service
src/services/settings.py - Settings Repository
src/repositories/settings/json.py
Other components
- Researcher
Connections 24
- Researcher → Session Workbench: uses
- Session Workbench → Topic Composer: renders
front/src/views/SessionWorkspaceView.vue - Topic Composer → Session API: submits topic
- Session API → Run Service: starts run
src/api/routers/sessions.py - Run Service → Workflow Runtime: executes
src/services/session_runs.py - Run Service → Session Store: persists events
- Run Service → Progress Timeline: streams progress
- Workflow Runtime → Search Planning: plans search
- Search Planning → Paper Retrieval: provides search intent
- Paper Retrieval → Source Connectors: queries sources
src/paper_retrieval/service.py - Source Connectors → Relevance Reading: returns papers
- Workflow Runtime → Relevance Reading: runs reading
src/graph/read_node.py - Relevance Reading → Full-text Processing: processes selected papers
src/graph/read_node.py - Full-text Processing → Text Chunking: chunks text
- Relevance Reading → Paper Vector Store: indexes papers
src/graph/read_node.py - Workflow Runtime → Research Analysis: runs analysis
- Workflow Runtime → Evidence Outline: generates outline
- Workflow Runtime → Review Writing: writes review
- Search Planning → LLM Providers: generates plan
src/agents/searchAgent.py - Relevance Reading → LLM Providers: assesses relevance
- Review Writing → LLM Providers: generates sections
- Model Settings → Settings Service: configures models
- Settings Service → Settings Repository: reads and saves
- Settings Repository → LLM Providers: supplies configuration
src/repositories/settings/json.py