Table of Contents
Fetching ...

CellAgent: An LLM-driven Multi-Agent Framework for Automated Single-cell Data Analysis

Yihang Xiao, Jinyi Liu, Yan Zheng, Xiaohan Xie, Jianye Hao, Mingzhi Li, Ruitao Wang, Fei Ni, Yuxiao Li, Jintian Luo, Shaoqing Jiao, Jiajie Peng

TL;DR

This work tackles the complexity and high skill barrier of single-cell RNA-seq data analysis by introducing CellAgent, an LLM-driven multi-agent framework that automates end-to-end workflows. It organizes three biological expert roles—Planner, Executor, and Evaluator—within a hierarchical planning and a self-iterative optimization loop to ensure high-quality, human-intervention-free results. Across batch correction, cell type annotation, and trajectory inference, CellAgent achieves robust performance, including a 92% task completion rate and superior metrics on multiple datasets, often surpassing single-model baselines. The approach significantly reduces the manual workload in scRNA-seq analysis and opens avenues for broader adoption of AI-assisted science while highlighting areas for future enhancements such as diversified self-evaluation strategies and tool integration.

Abstract

Single-cell RNA sequencing (scRNA-seq) data analysis is crucial for biological research, as it enables the precise characterization of cellular heterogeneity. However, manual manipulation of various tools to achieve desired outcomes can be labor-intensive for researchers. To address this, we introduce CellAgent (http://cell.agent4science.cn/), an LLM-driven multi-agent framework, specifically designed for the automatic processing and execution of scRNA-seq data analysis tasks, providing high-quality results with no human intervention. Firstly, to adapt general LLMs to the biological field, CellAgent constructs LLM-driven biological expert roles - planner, executor, and evaluator - each with specific responsibilities. Then, CellAgent introduces a hierarchical decision-making mechanism to coordinate these biological experts, effectively driving the planning and step-by-step execution of complex data analysis tasks. Furthermore, we propose a self-iterative optimization mechanism, enabling CellAgent to autonomously evaluate and optimize solutions, thereby guaranteeing output quality. We evaluate CellAgent on a comprehensive benchmark dataset encompassing dozens of tissues and hundreds of distinct cell types. Evaluation results consistently show that CellAgent effectively identifies the most suitable tools and hyperparameters for single-cell analysis tasks, achieving optimal performance. This automated framework dramatically reduces the workload for science data analyses, bringing us into the "Agent for Science" era.

CellAgent: An LLM-driven Multi-Agent Framework for Automated Single-cell Data Analysis

TL;DR

This work tackles the complexity and high skill barrier of single-cell RNA-seq data analysis by introducing CellAgent, an LLM-driven multi-agent framework that automates end-to-end workflows. It organizes three biological expert roles—Planner, Executor, and Evaluator—within a hierarchical planning and a self-iterative optimization loop to ensure high-quality, human-intervention-free results. Across batch correction, cell type annotation, and trajectory inference, CellAgent achieves robust performance, including a 92% task completion rate and superior metrics on multiple datasets, often surpassing single-model baselines. The approach significantly reduces the manual workload in scRNA-seq analysis and opens avenues for broader adoption of AI-assisted science while highlighting areas for future enhancements such as diversified self-evaluation strategies and tool integration.

Abstract

Single-cell RNA sequencing (scRNA-seq) data analysis is crucial for biological research, as it enables the precise characterization of cellular heterogeneity. However, manual manipulation of various tools to achieve desired outcomes can be labor-intensive for researchers. To address this, we introduce CellAgent (http://cell.agent4science.cn/), an LLM-driven multi-agent framework, specifically designed for the automatic processing and execution of scRNA-seq data analysis tasks, providing high-quality results with no human intervention. Firstly, to adapt general LLMs to the biological field, CellAgent constructs LLM-driven biological expert roles - planner, executor, and evaluator - each with specific responsibilities. Then, CellAgent introduces a hierarchical decision-making mechanism to coordinate these biological experts, effectively driving the planning and step-by-step execution of complex data analysis tasks. Furthermore, we propose a self-iterative optimization mechanism, enabling CellAgent to autonomously evaluate and optimize solutions, thereby guaranteeing output quality. We evaluate CellAgent on a comprehensive benchmark dataset encompassing dozens of tissues and hundreds of distinct cell types. Evaluation results consistently show that CellAgent effectively identifies the most suitable tools and hyperparameters for single-cell analysis tasks, achieving optimal performance. This automated framework dramatically reduces the workload for science data analyses, bringing us into the "Agent for Science" era.
Paper Structure (27 sections, 4 equations, 4 figures)

This paper contains 27 sections, 4 equations, 4 figures.

Figures (4)

  • Figure 1: Schematic of the CellAgent Framework.a, Example of user input received by the CellAgent, comprising single-cell data and user-provided text information. b, Upon receiving user input, the Planner role first parses user intent and decomposes the task into subtasks. c, Illustration of final results, including results of individual subtasks and the final task outcome. d, Detailed view of the CellAgent's processing flow for subtasks. The current subtask and historical code memory are inputted to an Executor, which initially retrieves tools and outputs available tools for this step. Subsequently, corresponding documentation for these tools is acquired, and the Executor derives solutions (text analysis and code generation) based on the documentation. These codes are executed in the code sandbox, and if exceptions are encountered, solutions are regenerated until successful execution of this task. Then, the Evaluator assesses the results of the current task and allows the Executor to optimize solutions. Ultimately, based on its evaluation of results under multiple solutions, the Evaluator aggregates results to obtain the final outcome of this step.
  • Figure 2: Batch Correction.a, The performance of CellAgent and other batch correction algorithms on batch correction, bio-conservation, and overall scores, along with their programming languages. b, Violin plot shows the distribution of overall score between CellAgent and other methods across all datasets. c, The ranking of CellAgent and other methods across different datasets. d, UMAP plots show the performance of CellAgent on the heart datasets, using batch labels and cell type labels for coloring respectively.
  • Figure 3: Cell Type Annotationa, The mean accuracy of cell type annotation results with labeled cell types, derived from samples of five distinct human tissues and mouse tissues. b, The accuracy of cell type annotation for the 17 clusters of human PBMC dataset. c, Detailed cell-type annotations of the human PBMC dataset with the CellAgent and expert-annotated cell type Annotations. d, Visualize the expression of LILR4A gene (PDCs marker) and CD79A gene(B cells marker) across clusters using UMAP plots and violin plots.
  • Figure 4: Trajectory Inference.a, Comparison of the performance between CellAgent and other trajectory inference algorithms on gold standard datasets, along with their programming languages. b, Radar charts display the performance of CellAgent and other methods on the metrics, which are not covered in a. c, CellAgent's output on the “aging hsc kowalczyk” dataset. one UMAP plot depicting trajectories colored by original cell types, another colored by cell type clusters optimized based on milestones within the trajectory, and the last colored by pseudo time. d, Heatmap of gene expression, with additional emphasis on the expression of milestones within the trajectory. The cell order in the heatmap is optimized according to the trajectory.