SuperAPI AI Directory

PaperBanana

PaperBanana is a multi-agent AI framework designed to create publication-ready academic illustrations. It retrieves refe…

Open website

About this tool

PaperBanana is a reference-driven multi-agent framework for automatically generating academic illustrations. It works like a creative team composed of specialized agents, transforming raw scientific content into publication-quality diagrams and statistical plots through an orchestrated pipeline. The framework leverages in-context learning from reference examples and iterative refinement to produce scientific illustrations that are both aesthetically pleasing and semantically accurate.

Purpose PaperBanana is aimed at AI researchers and scientists, with the goal of automating the generation of conceptual diagrams and data statistical plots in academic papers, accelerating the iteration and visual expression of academic research. The project is declared to be a fully open-source project, intended to serve all researchers, and currently has no commercialization plans.

Main Capabilities The framework consists of a structured pipeline of five specialized agents:

  • Retriever Agent: Identifies the most relevant reference images from a curated reference gallery to guide downstream agents.
  • Planner Agent: Through in-context learning, transforms method content and communicative intent into a complete textual description.
  • Stylist Agent: Uses automatically synthesized style guidelines to refine the description into a version that meets academic aesthetic standards.
  • Visualizer Agent: Uses advanced image generation models to transform textual descriptions into visual output.
  • Critic Agent: Forms a closed-loop optimization mechanism with the Visualizer, improving through multiple rounds of iteration.

Framework features include: reference-driven (learning from curated examples through generative retrieval), iterative refinement (the Critic-Visualizer loop progressively improves quality), style-aware (automatically synthesized aesthetic guidelines ensure academic quality), and flexible modes (multiple experimental modes adapt to different scenarios).

Interactive demo capabilities include: parallel generation (generate up to 20 candidate images simultaneously), pipeline visualization (track the evolution of each stage from Planner → Stylist → Critic), high-resolution refinement (upscale to 2K/4K via an image generation API), and batch export (download all candidate images as PNG or ZIP).

Extensible design includes: modular agents (each agent can be configured independently), task support (handles both conceptual diagrams and data statistical plots), evaluation framework (built-in multi-metric evaluation against ground truth), and asynchronous processing (batch processing with configurable concurrency).

How to Use Try online: no installation required, you can directly access PaperBanana on Hugging Face Spaces. Enter an API key (OpenRouter or Google Gemini), configure the required parameters (pipeline mode, number of candidates, aspect ratio, etc.), paste the method section text and figure caption, and click Generate.

Run the Gradio app locally: Gradio's Figure Size setting maps 1-3cm and 4-6cm to 1k, 7-9cm and 10-13cm to 2k, and 14-17cm to 4k, for image generation calls to Gemini and OpenRouter; OpenAI gpt-image requests continue to use their existing fixed-size API path.

Run the Streamlit demo locally: two main workflows are provided.

  1. Generate Candidates tab: paste the method section content (Markdown recommended) and provide a figure caption; configure settings (pipeline mode, retrieval settings, number of candidates, aspect ratio, number of Critic rounds); click Generate Candidates and wait for parallel processing; view the results in a grid, the evolution timeline, and download individual images or a batch ZIP.
  2. Refine Image tab: upload a generated candidate image or any chart; describe the desired modifications or request upscaling; select resolution (2K/4K) and aspect ratio; download the refined high-resolution output.

Run from the command line: available options include --dataset_name (default PaperBananaBench), --task_name (diagram or plot, default diagram), --split_name (default test), --exp_mode, --retrieval_setting (auto, manual, random, or none, default auto).

Experiment modes:

  • vanilla: direct generation, no planning or refinement
  • dev_planner: Retriever → Planner → Visualizer
  • dev_planner_stylist: Retriever → Planner → Stylist → Visualizer
  • dev_planner_critic: Retriever → Planner → Visualizer → Critic (multiple rounds)
  • dev_full: completeagent pipeline
  • demo_planner_critic: demo mode (Retriever → Planner → Visualizer → Critic, no Stylist), no evaluation
  • demo_full: demo mode (full pipeline), no evaluation

Installation steps Step1: Clone the repository. Step2: Configuration. API keys can be configured from a YAML configuration file or environment variables. It is recommended to copy configs/model_config.template.yaml to configs/model_config.yaml to externalize all user configuration; this file is git-ignored to protect keys. In model_config.yaml, fill in the two model names (defaults.main_model_name and defaults.image_gen_model_name), and set at least one API key under api_keys—for example, only google_api_key (Gemini) or only openrouter_api_key (OpenRouter); there is no need to have both. If both are configured, OpenRouter is preferred for routing when available. Note: if you need to generate many candidate images simultaneously, an API key that supports high concurrency is required. Step3: Download the dataset. First download PaperBananaBench and place it in the data directory (e.g., data/PaperBananaBench/). The framework is designed to run normally even without the dataset, bypassing the Retriever Agent's few-shot learning capability. If you need the original PDFs, you can download them from PaperBananaDiagramPDFs. Step4: Install the environment. Use uv to manage Python packages. Create and activate a virtual environment: uv venv, then source .venv/bin/activate (.venv\Scripts\activate on Windows). Install Python 3.12: uv python install 3.12. Install dependencies: uv pip install -r requirements.txt.

Applicable scenarios Suitable for scientific research that requires generating conceptual diagrams or data statistical charts for academic papersResearchers, supporting computer science and other fields (the reference set is being expanded to support more fields). It is also suitable for developers who wish to study or reproduce multi-agent academic illustration generation methods.

Limitations and Notes The project states that this is not an officially supported Google product and does not participate in Google's Open Source Software Vulnerability Reward Program. The core method was developed by the author during an internship at Google, and the related specific workflow has been patented by Google; this does not affect open-source research, but it limits third parties from using similar logic for commercial applications. The project currently has no commercialization plans. The official notes point out that although solid progress has been made, there is still a long way to go in terms of more reliable generation and more diverse, complex scenarios.

Community Support Around the release of this repository, several reproduction efforts have appeared in the community, including llmsresearch/paperbanana, efradeca/freepaperbanana, and elpsykongloo/PaperBanana-Pro (a continuously updated Chinese-enhanced version with a more stable pipeline and a friendlier experience). In addition, there are other efforts exploring the same topic, such as ResearAI/AutoFigure-Edit, OpenDCAI/Paper2Any, and BIT-DataLab/Edit-Banana.

Update Log 2026-03-24: PaperBanana is now hosted on Hugging Face Spaces. 2026-03-11: Released as a ClawHub skill, installable via clawhub install paperbanana. 2026-03-11: The Streamlit UI adds model selection, supporting the selection of the main model (VLM) and the image generation model, with preset options and custom input. 2026-03-11: Added OpenRouter support, allowing models from providers such as OpenAI and Anthropic to be used through a unified API. 2026-03-11: Added a Contributors section, supporting the all-contributors bot.

To-do items include: supporting manual selection of examples, providing a friendlier interface, uploading code for generating statistical charts, uploading code for improving existing charts based on style guides, and expanding the reference set to support more fields beyond computer science.