Agent-based automated physics experiment report writing system
Project description
Overview
A multi-agent collaborative automated physics experiment report writing system. Users provide experimental data and reference materials, then agents collaboratively generate LaTeX reports through theoretical derivation, data analysis, visualization, and typesetting.
Features
Core Capabilities
- Multi-Agent Collaboration — Main Agent orchestrates, with four sub-agents (Data Analysis, Plotting, Theory, Report) each specializing in their domain
- Directory Permission Isolation — Each agent can only write to designated directories, preventing cross-contamination
- Waitlist/Todolist Tracking — Structured task delegation with linked waitlist-todolist chains and auto-notification on completion
- Checkpoint Rollback — Automatically creates checkpoints at key nodes; roll back to any historical state
- Interactive Adjustment — Users can message any agent at any time for intervention and optimization
UI/UX (Claude Code Style)
- Streaming Responses — Real-time agent output, word-by-word streaming
- Switchable Agent Panel — A single agent chat panel with a dropdown selector to switch among Main / Data Analysis / Plotting / Theory / Report
- Recent Projects Cache — VSCode-style recent projects list, cached in
~/.autoreport/recent_projects.json - File Explorer — VSCode-style file tree with 22px row height, 16px icons, concise labels (Data, References, Theory, Plots, Outline, Tex)
- Context Chip Bar — Visual indicator for file/line selections with toggle to include/exclude from messages
- Chat Interface — Claude Code-style conversation display with proper Markdown rendering and grouped tool calls
- Slash Commands —
/clear,/new,/help,/compact,/init
Developer Tools
- @ File References — Type
@in chat to fuzzy-search and insert file references as Markdown links - Selected Line Context — Text selections in preview pane are automatically appended to agent messages
- Sub-Agent Debug Mode — Disconnect from Main Agent channel, test individual agents independently
LLM Integration
- Multi-Provider Support — Anthropic, OpenAI, DeepSeek, etc. Runtime model switching
- Provider Presets — 50+ provider templates from cc-switch
- Context Auto-Compact — Automatically trims conversation history when approaching context window limits
Main Workspace
The main workspace combines the project file tree, document preview, and agent chat timeline in one window. Users can inspect generated LaTeX/PDF output while continuing to interact with the agent team.
Quick Start
Prerequisites: Python >= 3.12, uv package manager, TeX distribution, at least one LLM Provider API key.
Install from PyPI:
pip install autoreport-gui
autoreport
Or with uv:
uv pip install autoreport-gui
autoreport
Install from source:
git clone https://github.com/xjsongphy/AutoReport && cd AutoReport
uv sync
Run:
autoreport
The start window lets users open an existing experiment folder, create a new project, configure API providers, or resume a recent project.
First launch prompts for API configuration. Pre-configure via environment variables:
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export DEEPSEEK_API_KEY="sk-..."
autoreport
MinerU Integration
AutoReport uses mineru-open-api CLI for PDF parsing (PDF, images, DOCX, PPTX, XLSX → Markdown).
Setup:
-
Install mineru-open-api:
curl -fsSL https://cdn-mineru.openxlab.org.cn/open-api-cli/install.sh | sh
See mineru-open-api docs for details.
-
Register at MinerU for an API key, then authenticate:
mineru-open-api auth -
The app auto-detects availability on startup and shows a warning if not installed.
Supports batch processing (max 200MB / 600 pages per file), text/image/table/formula extraction.
Configuration
Configuration file: autoreport.config.yaml
The API configuration dialog manages provider presets, active provider selection, API keys, base URLs, and default models.
agents:
defaults:
model: "anthropic/claude-sonnet-4.5"
temperature: 0.1
max_tool_iterations: 200
Debug Mode
autoreport --debug-agent data_analysis
autoreport --debug-agent data_analysis --debug-agent plotting
Valid agents: data_analysis, plotting, theory, report
Project Structure
my_experiment/
├── Data/ # Raw experimental data (user input) + analysis results
│ └── Processed/ # Data Analysis Agent output only
├── References/ # Reference materials (PDF, images), custom templates
├── Theory/ # Theory Agent output only
├── Plots/ # Plotting Agent plots and generated images
│ ├── Fig/ # Generated figures
│ └── Scripts/ # Plotting scripts
├── Outline/ # Main Agent report outline and routing notes
└── Tex/ # Report Agent LaTeX source and compiled output
Agent Permissions
| Agent | Write Directory | Read Scope |
|---|---|---|
| Main Agent | Outline/ |
All directories |
| Data Analysis | Data/Processed/ |
All directories |
| Plotting | Plots/ |
All directories |
| Theory | Theory/ |
All directories |
| Report | Tex/ |
All directories |
| User | Data/, References/ |
All directories |
Architecture
autoreport/
├── app.py # Entry point: CLI parsing, LoopManager startup
├── config/ # Pydantic-based config (YAML loading, API key validation)
├── core/
│ ├── loops/ # Agent runtime: LoopManager, AgentLoop, MessageBus
│ ├── providers/ # LLM provider abstraction (factory, base classes)
│ ├── prompts/ # Progressive prompt loading (identity → full instructions)
│ ├── tools/ # Tool system (registry, file tools, exec tools, PDF tool, skill tool)
│ ├── checkpoints.py # Operation-log checkpoints with reversible file operations
│ ├── conversations.py # Multi-session conversation store
│ ├── file_search.py # Fuzzy file search for @ references
│ ├── preset_sync.py # cc-switch preset synchronization
│ └── recent_projects.py# Recent projects cache
├── gui/ # PyQt6 interface (main window, dialogs, widgets)
│ └── widgets/ # Reusable components (file tree, preview, agent panel)
├── interfaces/ # GUI-backend protocol (protocol definitions, message types)
├── resources/ # Built-in resources
├── templates/ # Built-in templates (agent prompts, report templates)
│ ├── agents/ # Agent prompt files (Markdown)
│ └── reports/ # LaTeX report templates
├── external/ # Git-ignored synced content (presets, skills)
│ ├── cc-switch/ # Provider presets from cc-switch repo
│ └── skills/ # Skill Markdown files
└── utils/ # Logging configuration (loguru)
Development
# Run tests
uv run pytest -v
# Lint
uv run ruff check autoreport tests
uv run ruff check --fix autoreport tests
# Run with coverage
uv run pytest --cov=autoreport --cov-report=html
UI Icons
Agent type icons are from Tabler Icons — 6000+ free SVG icons, MIT License.
Reference Projects
- DeepCode — API config (YAML secrets + env fallback), multi-provider support, error handling
- cc-switch — Provider presets (50+ providers)
- nanobot — AgentLoop architecture, tool definitions, compact/command system
- codex — UI design patterns, streaming implementation
- openclaw — Personal AI assistant, skills system, multi-channel agent design
- VS Code — Editor UI/UX patterns, panel layout, command and extension architecture
- Claude Code — Agent chat panel UI/UX (bubble messages, grouped tool calls, streaming,
@references, slash commands) - PKUMpLtX — Built-in LaTeX report template (PKU Modern Physics Laboratory, revtex4-2 based)
Star History
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autoreport_gui-1.2.tar.gz.
File metadata
- Download URL: autoreport_gui-1.2.tar.gz
- Upload date:
- Size: 6.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2831e25bb6b0989e1073c9f250a64e4e586d4e462e0a227458f79ae8e297a9e
|
|
| MD5 |
04bcad597b86fdfe7962041c6a1354dd
|
|
| BLAKE2b-256 |
7b88753422cf2324a4a178a91eda504984a9b7d43bb8c87ed6fd10aba470e44f
|
File details
Details for the file autoreport_gui-1.2-py3-none-any.whl.
File metadata
- Download URL: autoreport_gui-1.2-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7bf19e1fb8e5942c85c53c206bcafc6e0efe176d7a6fe75ffa13d0179a27466
|
|
| MD5 |
507eca34c9086102892f3165ad76ca5a
|
|
| BLAKE2b-256 |
9248f198349b6eb925cd1cbdc6b500fa2732dc2a0b018824689fe32bf1114fa6
|