# Repository Briefing: microsoft/RD-Agent
> Source: https://repoforai.com/repo/microsoft/RD-Agent (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/microsoft/RD-Agent
- **Official Docs / Website**: https://rdagent.azurewebsites.net/
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A (85/100 · Maintenance 26/35 · Adoption 22/25 · Releases 17/20 · License 20/20)
- **Latest Release**: v1.0.0 (2026-09-23) — https://github.com/microsoft/RD-Agent/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Docker, CLI, API
- **Momentum**: 15,602 ★ total (+12 24h / +88 7d) · 2,091 forks
- **Topics**: `agent`, `ai`, `automation`, `data-mining`, `data-science`, `development`, `llm`, `research`
- **When to Use**: Best for: ML teams that want to compare candidate pipelines or reproduce paper models through repeated, measurable experiments on Linux, with room to review generated code and control budgets. Skip if: Your workflow is already deterministic, you need verified offline operation or full data-science UI coverage, or you cannot safely run generated code.

## Overview
```text
### Architecture & Core Mechanics
RD-Agent is a Python framework for iterative ML experiments. Its Research role proposes changes and its Development role implements them; execution results inform the next round. The two roles can use different models, as in the o3 Research and GPT-4.1 Development benchmark configuration. Scenario selection provides a concrete integration point: the data-science setup uses `DS_SCEN` to select `DataScienceScen` or `KaggleScen` rather than hard-coding one workflow into the CLI.

The package registers `rdagent.app.cli:app` as its CLI entry point. Its runtime dependencies include `pydantic-settings` for configuration, NumPy, pandas, and scikit-learn for data and ML work, and the Python `docker` package. LiteLLM is the default model backend, with separate chat and embedding configuration. The `web/` tree and `rdagent server_ui` provide a separate UI path for interaction and trace viewing; UI coverage does not extend to every scenario.

### Key Capabilities & Differentiators
The framework covers whole-pipeline data-science experiments, Kaggle feature engineering and tuning, Qlib-based factor and model iteration, and implementation of models from research reports. It also provides benchmark-driven fine-tuning through `rdagent llm_finetune`, with Qwen/Qwen2.5-7B-Instruct as an example base model. The demo workflows require chat completion, JSON mode, and embedding queries. Configuration examples cover OpenAI, Azure OpenAI, and experimental DeepSeek chat paired with embeddings served through a LiteLLM proxy.

MLE-bench draws on 75 Kaggle competitions. The reported o3 Research / GPT-4.1 Development configuration averaged 30.22% overall with a standard deviation of 1.5 percentage points across six seeds. Its Lite, medium, and high scores averaged 51.52%, 19.3%, and 26.67%, respectively. Those are results for a specific model pairing and evaluation setup, not expected scores for arbitrary LiteLLM backends or internal datasets.

### Trade-offs & Limitations
Compared with a fixed training pipeline, RD-Agent can explore proposed changes instead of merely rerunning predefined steps. The cost is a less predictable run: model calls and experiment executions accumulate across iterations, and generated code and evaluation outputs need review. Treat Docker as one layer of isolation, not as a complete security boundary; restrict mounts, credentials, and network access when running generated code.

The supplied MLE-bench comparison reports 22.4% overall for RD-Agent with o1-preview versus 16.9% for AIDE with o1-preview. The higher RD-Agent score of 30.22% uses the o3/GPT-4.1 pairing, so it does not isolate an architectural advantage. Before adopting either system, compare on representative tasks with equivalent budgets and log both model spend and experiment compute. Hosted endpoints move chat and embedding inference off the host; they do not remove the resource requirements of training or evaluation.

### Hardware & Deployment Guide
Use a Linux host with Python 3.10 or later; Python 3.10 and 3.11 are the tested versions identified in the setup material. Install with `pip install rdagent` or use `make dev` for a source checkout. Most scenarios need Docker accessible to the runtime account. Configure `CHAT_MODEL`, `EMBEDDING_MODEL`, and the required provider credentials in `.env`, then run `rdagent health_check`. The runner can be self-hosted, but hosted model endpoints require network access. Offline readiness is not established merely by installing the package.

The v0.8.0 release added RAG MCP integration at the proposal stage. In v1.0.0, localhost UI deployments require `UI_SERVER_AUTH_TOKEN`, and the General Model upload flow requires a report file instead of a URL or server-side path. Check both changes before migrating local deployments or upload automations. The `server_ui` interface currently excludes the `data_science` scenario.
```

## Key Capabilities
```text
- Experiment loop: Separate Research and Development roles can propose and implement changes with different chat models.
- Scenario configuration: `DS_SCEN` selects the data-science or Kaggle scenario; `DS_LOCAL_DATA_PATH` points to local data.
- Model access: LiteLLM is the default backend; chat and embedding models can use separate API bases.
- Benchmark evidence: The o3/GPT-4.1 configuration reports 30.22% ± 1.5 percentage points overall on MLE-bench across six seeds.
- Execution prerequisites: Linux is the documented runtime, and most scenarios require Docker.
- UI boundaries: `rdagent server_ui` provides trace viewing but excludes `data_science`; v1.0.0 requires `UI_SERVER_AUTH_TOKEN` for localhost deployments.
```

## Quick Start / Clone
```bash
pip install rdagent
```
