Skip to main content

Agent-based automated physics experiment report writing system

Project description

title

A Multi-Agent Collaborative System for Automated Physics Experiment Report Writing

Platform Python Built with PyQt6 License: MIT

English | 中文

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.

AutoReport main workspace

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.

AutoReport start window

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:

  1. 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.

  2. Register at MinerU for an API key, then authenticate:

    mineru-open-api auth
    
  3. 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.

AutoReport API configuration

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

Star History Chart

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autoreport_gui-1.0.tar.gz (6.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autoreport_gui-1.0-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file autoreport_gui-1.0.tar.gz.

File metadata

  • Download URL: autoreport_gui-1.0.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

Hashes for autoreport_gui-1.0.tar.gz
Algorithm Hash digest
SHA256 2c34d5807f8d32c566f97f1525ae84996decca6a2922bf833a11468707d18c1c
MD5 32c6da1baa7fac5b0b8298f9f25fcd48
BLAKE2b-256 5edc3db42cd42b8dfcfa81f2581d4be583ebb228bc25f9e65abc7d51ae6d4ce1

See more details on using hashes here.

File details

Details for the file autoreport_gui-1.0-py3-none-any.whl.

File metadata

  • Download URL: autoreport_gui-1.0-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

Hashes for autoreport_gui-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd240d012e4a915c64bd3df018861952d37aa4e567bdc50dfbc3b6ec808fefa8
MD5 a47f2c5ae9a353c1fbfb48a4f8338fab
BLAKE2b-256 6ef65b9ad046fadcf9d93b85a56263a3d537505b676b5c8f30a64ac435f612a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page