# Paper2Agent
**Repository Path**: mirrors_trending/Paper2Agent
## Basic Information
- **Project Name**: Paper2Agent
- **Description**: Paper2Agent is a multi-agent AI system that automatically transforms research papers into interactive AI agents with minimal human input.
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2025-09-29
- **Last Updated**: 2025-10-04
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Paper2Agent: Reimagining Papers As AI Agents
## π Overview
`Paper2Agent` is a multi-agent AI system that automatically transforms research papers into interactive AI agents with minimal human input. Here are some [Demos](#-demos) of the Paper2Agent-generated agent.
## π Quick Start
### Basic Usage
Automatically detects and runs all relevant tutorials from a research paperβs codebase.
> **β οΈ Prerequisites**: Complete the [installation & setup](#οΈ-installation--setup) below before running Paper2Agent.
>
> **β±οΈ Runtime & Cost**: Processing time varies from 30 minutes to 3+ hours based on codebase complexity. Estimated cost: ~$15 for complex repositories like AlphaGenome using Claude Sonnet 4 (one-time cost).
```bash
cd Paper2Agent
bash Paper2Agent.sh \
--project_dir \
--github_url
```
### Advanced Usage
#### Targeted Tutorial Processing
Process only specific tutorials by title or URL:
```bash
bash Paper2Agent.sh \
--project_dir \
--github_url \
--tutorials
```
#### Repository with API Key
For repositories requiring authentication:
```bash
bash Paper2Agent.sh \
--project_dir \
--github_url \
--api
```
### Parameters
**Required:**
- `--project_dir `: Name of the project directory to create
- Example: `TISSUE_Agent`
- `--github_url `: GitHub repository URL to analyze
- Example: `https://github.com/sunericd/TISSUE`
**Optional:**
- `--tutorials `: Filter tutorials by title or URL
- Example: `"Preprocessing and clustering"` or tutorial URL
- `--api `: API key for repositories requiring authentication
- Example: `your_api_key_here`
### Examples
#### TISSUE Agent
Create an AI agent from the [TISSUE](https://github.com/sunericd/TISSUE) research paper codebase for uncertainty-calibrated single-cell spatial transcriptomics analysis:
```bash
bash Paper2Agent.sh \
--project_dir TISSUE_Agent \
--github_url https://github.com/sunericd/TISSUE
```
#### Scanpy Agent for Preprocessing and Clustering
Create an AI agent from the [Scanpy](https://github.com/scverse/scanpy) research paper codebase for single-cell analysis preprocessing and clustering:
```bash
# Filter by tutorial title
bash Paper2Agent.sh \
--project_dir Scanpy_Agent \
--github_url https://github.com/scverse/scanpy \
--tutorials "Preprocessing and clustering"
# Filter by tutorial URL
bash Paper2Agent.sh \
--project_dir Scanpy_Agent \
--github_url https://github.com/scverse/scanpy \
--tutorials "https://github.com/scverse/scanpy/blob/main/docs/tutorials/basics/clustering.ipynb"
```
#### AlphaGenome Agent
Create an AI agent from the [AlphaGenome](https://github.com/google-deepmind/alphagenome) research paper codebase for genomic data interpretation:
```bash
bash Paper2Agent.sh \
--project_dir AlphaGenome_Agent \
--github_url https://github.com/google-deepmind/alphagenome \
--api
```
## βοΈ Installation & Setup
### Prerequisites
- **Python**: Version 3.10 or higher
- **Claude Code**: Install following instructions at [anthropic.com/claude-code](https://www.anthropic.com/claude-code)
### Installation Steps
1. **Clone the Paper2Agent Repository**
```bash
git clone https://github.com/jmiao24/Paper2Agent.git
cd Paper2Agent
```
2. **Install Python Dependencies**
```bash
pip install fastmcp
```
3. **Install and Configure Claude Code**
```bash
npm install -g @anthropic-ai/claude-code
claude
```
## π€ How to Create a Paper Agent?
To streamline usage, we recommend creating Paper Agents by connecting Paper MCP servers to an AI coding agent, such as [Claude Code](https://www.anthropic.com/claude-code) or the [Google Gemini CLI](https://google-gemini.github.io/gemini-cli/) (it's free with a Google account!).
We are also actively developing our own base agent, which will be released soon.
### Automatic Launch
After pipeline completion, Claude Code will automatically open with your new MCP server loaded.
### Manual Launch with Local MCP Server
To restart your agent later:
```bash
cd
fastmcp install claude-code /src/_mcp.py \
--python /-env/bin/python
```
### Manual Launch with Remote MCP Server Hosted on Hugging Face
To create a paper agent in Claude Code with the Paper MCP server of interest, use the following script with your own working directory, MCP name, and server URL:
```bash
bash launch_remote_mcp.sh \
--working_dir \
--mcp_name \
--mcp_url
```
For example, to create an AlphaGenome Agent, run:
```bash
bash launch_remote_mcp.sh \
--working_dir analysis_dir \
--mcp_name alphagenome \
--mcp_url https://Paper2Agent-alphagenome-mcp.hf.space
```
β
You will now have an **AlphaGenome Agent** ready for genomics data interpretation. You can input the query like:
```
Analyze heart gene expression data with AlphaGenome MCP to identify the causal gene
for the variant chr11:116837649:T>G, associated with Hypoalphalipoproteinemia.
```
To reuse the AlphaGenome agent, run
```bash
cd analysis_dir
claude
```
### Verification
Verify your agent is loaded:
```bash
claude mcp list
```
or use `\mcp` inside Claude Code. You should see your repository-specific MCP server listed.
## π Output Structure
After completion, your project will contain:
```
/
βββ src/
β βββ _mcp.py # Generated MCP server
β βββ tools/
β βββ .py # Extracted tools from each tutorial
βββ -env/ # Isolated Python environment
βββ repo/
β βββ / # Cloned repository with original code
βββ claude_outputs/
β βββ step1_output.json # Tutorial scanner results
β βββ step2_output.json # Tutorial executor results
β βββ step3_output.json # Tool extraction results
β βββ step4_output.json # MCP server creation results
βββ reports/
β βββ tutorial-scanner.json # Tutorial discovery analysis
β βββ tutorial-scanner-include-in-tools.json # Tools inclusion decisions
β βββ executed_notebooks.json # Notebook execution summary
β βββ environment-manager_results.md # Environment setup details
βββ tests/
β βββ code// # Test code for extracted tools
β βββ data// # Test data files
β βββ results// # Test execution results
β βββ logs/ # Test execution logs
βββ notebooks/
β βββ /
β βββ _execution_final.ipynb # Executed tutorial
β βββ images/ # Generated plots and visualizations
βββ tools/ # Additional utility scripts
```
### Key Output Files and Directories
| File/Directory | Description |
|----------------|-------------|
| `src/_mcp.py` | Main MCP server file that Claude Code loads |
| `src/tools/.py` | Individual tool modules extracted from each tutorial |
| `-env/` | Isolated Python environment with all dependencies |
## π¬ Demos
Below, we showcase demos of AI agents created by Paper2Agent, illustrating how each agent applies the tools from its source paper to tackle scientific tasks.
### 𧬠AlphaGenome Agent for Genomic Data Interpretation
Example query:
```
Analyze heart gene expression data with AlphaGenome MCP to identify the causal gene
for the variant chr11:116837649:T>G, associated with Hypoalphalipoproteinemia.
```
https://github.com/user-attachments/assets/34aad25b-42b3-4feb-b418-db31066e7f7b
### πΊοΈ TISSUE Agent for Uncertainty-Aware Spatial Transcriptomics Analysis
Example query:
```
Calculate the 95% prediction interval for the spatial gene expression prediction of gene Acta2 using TISSUE MCP.
This is my data:
Spatial count matrix: Spatial_count.txt
Spatial locations: Locations.txt
scRNA-seq count matrix: scRNA_count.txt
```
https://github.com/user-attachments/assets/2c8f6368-fa99-4e6e-b7b5-acc12f741655
### π§« Scanpy Agent for Single-Cell Data Preprocessing
Example query:
```
Use Scanpy MCP to preprocess and cluster the single-cell dataset pbmc_all.h5ad.
```
## π Connectable Paper MCP Servers
* AlphaGenome: https://Paper2Agent-alphagenome-mcp.hf.space
* Scanpy: https://Paper2Agent-scanpy-mcp.hf.space
* TISSUE: https://Paper2Agent-tissue-mcp.hf.space
## π Citation
```
@misc{miao2025paper2agent,
title={Paper2Agent: Reimagining Research Papers As Interactive and Reliable AI Agents},
author={Jiacheng Miao and Joe R. Davis and Jonathan K. Pritchard and James Zou},
year={2025},
eprint={2509.06917},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2509.06917},
}
```