microsoft/RD-Agent
Research and development (R&D) is crucial for the enhancement of industrial productivity, especially in the AI era, where the core aspects of R&D are mainly focused on data and models. We are committed to automating these high-value generic R&D processes through R&D-Agent, which lets AI drive data-driven AI. 🔗https://aka.ms/RD-Agent-Tech-Report
What is RD‑Agent?
RD‑Agent (R&D‑Agent) is an open‑source Python framework from Microsoft that lets large‑language‑model (LLM) agents automate end‑to‑end research‑and‑development pipelines. It bundles together two complementary agents:
- R‑agent (Research) – proposes ideas, reads papers or reports, designs new features or factor models.
- D‑agent (Development) – takes the proposals and implements them: writes code, runs experiments, trains models, and evaluates results.
The system is built around LLM‑driven reasoning (ChatCompletion, JSON‑mode, embeddings) and a multi‑agent orchestration loop that iterates until a target objective is met. It ships with a set of ready‑made “scenarios” that showcase the loop in concrete domains:
| Scenario | Goal | Demo link |
|---|---|---|
| Quantitative‑Finance (RD‑Agent(Q)) | Jointly optimise factor models and trading strategies using Microsoft QLib | Live demo |
| Data‑Science / Kaggle | Automatic feature engineering, model selection and submission for Kaggle competitions | Live demo |
| Research Copilot | Parse research papers or financial reports and turn them into runnable model code | Live demo |
| Medical Prediction | Build and iterate predictive models for clinical time‑series data | Live demo |
| FT‑Agent | Self‑supervised fine‑tuning of LLMs for a downstream benchmark | (see rdagent/app/finetune/llm) |
Why it matters
- Benchmark‑first – The authors evaluate RD‑Agent on MLE‑bench (75 Kaggle‑style tasks) and on a new Agent² RL‑Bench that measures an agent’s ability to engineer post‑training RL pipelines. RD‑Agent currently holds the top spot on MLE‑bench.
- Modular, extensible design – New domains can be added by writing a small “scenario” module that defines the state, actions, and evaluation metric. The core loop stays the same.
- Pluggable LLM back‑ends – Supports any model reachable through LiteLLM (OpenAI, Azure OpenAI, DeepSeek, SiliconFlow, etc.) and can be swapped via a simple
.envfile. - Open‑source & reproducible – Distributed on PyPI (
pip install rdagent), with Docker support, CI badges, type‑checking (mypy), linting (ruff), and full documentation.
Quick start (Linux only)
# 1. Create a conda env
conda create -n rdagent python=3.10 && conda activate rdagent
# 2. Install the package
pip install rdagent # or `make dev` from source
# 3. Configure LLM credentials (example for OpenAI)
cat <<EOF > .env
CHAT_MODEL=gpt-4o
EMBEDDING_MODEL=text-embedding-3-small
OPENAI_API_KEY=YOUR_KEY
OPENAI_API_BASE=https://api.openai.com/v1
EOF
# 4. Verify the setup
rdagent health_check
# 5. Run a demo – e.g., quantitative‑trading loop
rdagent fin_quant
The command launches a background Docker container (for Qlib) and starts the R‑/D‑agent loop. Results can be inspected in a web UI (rdagent server_ui) that visualises each iteration’s proposal, code, and performance metrics.
Where to learn more
- Live demo & videos – https://rdagent.azurewebsites.net (factor loop, model loop, research copilot, etc.)
- Documentation – https://rdagent.readthedocs.io/en/latest/
- Technical report – https://aka.ms/RD-Agent-Tech-Report (arXiv 2505.14738)
- Benchmarks – MLE‑bench leaderboard and Agent² RL‑Bench paper (arXiv 2604.10547)
- Community – Discord (invite link in README) and a WeChat group for Chinese‑language users.
TL;DR: RD‑Agent is a Microsoft‑maintained, Linux‑only Python library that lets LLMs act as autonomous R&D assistants. It already beats other agents on a large ML‑engineering benchmark and ships with ready‑to‑run scenarios for finance, data science, and research‑paper automation.
Related
- Project
- Project
- Project
- Project
- Project