AI Personal Learning
and practical guidance
豆包Marscode1

AgentLaboratory: an open-source tool that utilizes intelligent agents to complete the entire process of scientific research

General Introduction

AgentLaboratory is an open source tool hosted on GitHub and developed by Samuel Schmidgall. It utilizes intelligent agents driven by Large Language Models (LLMs) to help researchers with the full process of scientific research, including literature review, experimental design, and report writing. The goal of this tool is to make research more efficient, not to replace human creativity. After the user enters a research idea, the tool automates repetitive tasks such as searching for papers or generating code. It is suitable for academic researchers, students and engineers. The project supports multilingual documentation and was last updated in March 2025 with the addition of the AgentRxiv framework, which allows agents to share research results with each other.

AgentLaboratory:利用智能代理完成科研全流程的开源工具-1


 

Function List

  • Literature review: Automatically collects papers from databases such as arXiv and organizes related content.
  • Experimental design: Generate research plans and runnable Python code.
  • Report Writing: Converts study results into LaTeX format to generate a full report.
  • AgentRxiv framework: Support agents to upload and access research results for collaborative progress.
  • Copilot Mode: When turned on, the tool interacts with the user in real time to adjust the study.
  • Multi-language support: Provides documentation and operator interface in Chinese, English and other languages.

 

Using Help

The installation and use of AgentLaboratory requires some basic steps, but is simple to follow. The following is a detailed description of how to install and use it, so you can get started quickly.

Installation process

  1. Download Project Code
    Open a terminal and enter the following command to clone the code base:
复制复制复制复制复制复制复制复制复制复制
复制
git clone git@github.com:SamuelSchmidgall/AgentLaboratory.git

Once the download is complete, a AgentLaboratory Folder.

  1. Creating a Python Environment
    Go to the project folder and create and activate the virtual environment. Python 3.12 is officially recommended:
复制复制复制复制复制复制复制复制复制
复制
cd AgentLaboratory
python -m venv venv_agent_lab
source venv_agent_lab/bin/activate  # Linux/Mac
venv_agent_lab\Scripts\activate  # Windows

When activated, the terminal displays (venv_agent_lab)The

  1. Installation of dependencies
    Runs in a virtual environment:
复制复制复制复制复制复制复制复制
复制
pip install -r requirements.txt

This will install the required Python libraries. If you run into problems, check out GitHub's Issues page.

  1. Install pdflatex (optional)
    If you need to generate reports in LaTeX format, install pdflatex:
复制复制复制复制复制复制复制
复制
sudo apt install pdflatex  # Linux

Don't have permission? You can use the parameter <code>--compile-latex "false"</code> Skip this step.

  1. Setting the API Key
    Tools require OpenAI or DeepSeek the API key. Once obtained, set the environment variable:
复制复制复制复制复制复制
复制
export OPENAI_API_KEY="你的密钥"  # Linux/Mac
set OPENAI_API_KEY="你的密钥"  # Windows

Or specify the key directly at runtime.

operational tool

After the installation is complete, run the following command to start it:

复制复制复制复制复制
复制
python ai_lab_repo.py --yaml-location "experiment_configs/MATH_agentlab.yaml"

To research a specific topic, such as "machine learning optimization", enter:

复制复制复制复制
复制
python ai_lab_repo.py --api-key "sk-xxx" --llm-backend "gpt-4o" --research-topic "机器学习优化"

The tool will start processing automatically.

Main Functions

  1. Enter a research topic
    After launching, the tool will prompt if no theme is specified:
复制复制复制
复制
请为 AgentLaboratory 输入一个实验想法:

Type it in and press enter, the tool starts working.

  1. View Literature Review
    The tool collects papers from databases such as arXiv and generates results that are saved in the output folder, such as <研究主题>_literature.md. Open the file to see the contents.
  2. Run the experiment code
    tool generates Python code in a path similar to output/<研究主题>_code.py. Running:
复制复制
复制
python output/机器学习优化_code.py

The results of the experiment can be viewed.

  1. Generating reports
    When the experiment is complete, the tool generates a LaTeX file with the path as follows output/<研究主题>_report.tex. If pdflatex is installed, it will be automatically compiled to PDF.
  2. Using Copilot Mode
    compiler <code>experiment_configs/MATH_agentlab.yaml</code> file, which will copilot-mode set up as true, and then run it. The tool will ask your opinion in real time.
  3. AgentRxiv Features
    Add parameters at runtime <code>--agentrxiv "true"</code>, the agent uploads the results to the AgentRxiv framework for use by other agents.

Tips for use

  • Write detailed notes: in <code>ai_lab_repo.py</code> (used form a nominal expression) task_notes_LLM Add notes in, such as experiment objectives or hardware information, to help the agent understand the requirements.
  • Select Model: Use of --llm-backend Specify the model, e.g. <code>--llm-backend="o1-mini"</code>. Powerful models such as o1 Better results, but more costly.
  • Loading progress: If interrupted, it is possible to start from the state_saves Checkpoints before the folder is loaded.
  • Chinese operation: Setting in the configuration file language: "中文"The tool generates content in Chinese.

caveat

  • Ensure that the network is working and that the tool requires access to an external database.
  • The file will be saved in the output folder, regular cleanup is recommended.
  • If you encounter an error, check the API key or model settings.

With these steps, you can accomplish research tasks efficiently with AgentLaboratory.

 

application scenario

  1. Dissertation Writing
    The researcher enters the topic and the tool generates a literature review and a first draft, saving access time.
  2. experimental verification
    Engineers enter experimentation goals, and tools provide code and plans to quickly test ideas.
  3. Teamwork
    With AgentRxiv, multiple researchers share results and accelerate project progress.

 

QA

  1. Programming experience required?
    Not required. Just copy the commands step by step and use them. But knowing Python gives you more flexibility to tweak the code.
  2. Is it expensive?
    The project is free, but API calls may be charged, depending on the model you pick and the amount of usage.
  3. Can it be used offline?
    No. The tool requires network access to the database and API. The tool requires network access to the database and API.
May not be reproduced without permission:Chief AI Sharing Circle " AgentLaboratory: an open-source tool that utilizes intelligent agents to complete the entire process of scientific research
en_USEnglish