PaperFarm  by shatianming5

AI agents automate research and experiments in any repository

Created 3 weeks ago

New!

379 stars

Top 75.1% on SourcePulse

GitHubView on GitHub
Project Summary

PaperFarm enables AI agents to autonomously run experiments within any code repository, aiming to improve code quality and discover state-of-the-art results. It targets engineers and researchers seeking to automate complex experimentation workflows, offering a structured approach to harvesting better code and performance metrics while developers sleep.

How It Works

PaperFarm orchestrates a four-phase workflow: Scout, Prepare, Review, and Experiment. The Scout phase analyzes the codebase and defines a research strategy. Prepare resolves environment setup, dependencies, data, and smoke tests. Review allows for human inspection or auto-confirmation of the plan. The Experiment phase executes the research loop autonomously, managing hypotheses, running experiments, and evaluating results. This process leverages isolated Git commits for each experiment, with automatic rollback for failed runs, ensuring a safe and reproducible research environment.

Quick Start & Requirements

  • Primary install / run command: pip install PaperFarm followed by cd your-project and paperfarm run.
  • Non-default prerequisites and dependencies: Python 3.10+ is required. GPU support is leveraged for parallel workers. Various AI agents (e.g., Claude Code, Codex CLI, Gemini CLI) are supported and can be auto-detected or specified.
  • Links: Quick Start, Examples, Demo (paperfarm demo).

Highlighted Details

  • One-Command Workflow: paperfarm run bootstraps new workflows or resumes existing ones seamlessly.
  • Multi-Agent Support: Integrates with multiple AI coding agents, allowing flexibility in choosing the execution engine.
  • Interactive TUI Dashboard: Provides a real-time, multi-tab command center for monitoring experiments, metrics, and logs, with human-in-the-loop checkpoints.
  • Robust Safety Features: Each experiment is an isolated Git commit with auto-rollback, timeout watchdogs, crash counters, and experiment limits to prevent data loss and control resource usage.
  • Parallel Execution: Supports running experiments across multiple GPUs using isolated Git worktrees for efficient parallelization.
  • Headless Mode: Enables running experiments via JSON Lines output for scripting, CI integration, or external monitoring.

Maintenance & Community

The repository includes a CONTRIBUTING.md and CHANGELOG.md. No specific community channels (like Discord/Slack) or notable sponsorships are mentioned in the README.

Licensing & Compatibility

The project is licensed under the MIT License, which generally permits commercial use and integration into closed-source projects.

Limitations & Caveats

The effectiveness of PaperFarm is dependent on the capabilities of the configured AI agents and the clarity of the project's codebase for analysis. While the system includes safety features, complex or poorly defined research goals may require iterative refinement. The README does not detail known bugs or specific unsupported platforms beyond standard OS compatibility (Linux, macOS, Windows).

Health Check
Last Commit

5 days ago

Responsiveness

Inactive

Pull Requests (30d)
35
Issues (30d)
12
Star History
424 stars in the last 26 days

Explore Similar Projects

Feedback? Help us improve.