R&D-Agent
Microsoft's open-source R&D agent framework that proposes ideas, writes code, runs experiments and iterates across data and model development.
- Source repo
- microsoft/RD-Agent
- Stars
- ★ 15k
- Last updated
- 15d ago
- License
- MIT
- Primary language
- Python
- FA score
- 44/100 · Major gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformOpenAI APIClaude API (Partial support)
- Cost
- Free software; you pay for model usage
- Setup effort
- High · needs real infrastructure
- You'll need
- Typical use
- Quant researchers who want new factors generated and backtested on Qlib automatically, with factor and model co-optimization instead of manual trial and error.
- Not a fit if
- Teams on Windows or macOS (Linux only today)
- Individuals wanting a one-command setup running in minutes
- Source review
- 44/100 · Major gaps 1 safety controls not found
What does this agent do, and when should you use it?
R&D-Agent is an open-source LLM agent framework from Microsoft that automates the highest-value parts of data-driven R&D: proposing ideas (the "R") and implementing them (the "D"). It reads real-world material such as papers and financial reports, extracts model structures or features, turns them into runnable Python code, executes them in an isolated environment and feeds the resulting metrics and logs into the next iteration. The repository ships several operational scenarios — quantitative finance on Qlib, Kaggle/data-science competitions, general paper-to-model reproduction and autonomous LLM fine-tuning (FT-Agent) — each with its own CLI entry point such as rdagent fin_quant, rdagent data_science, rdagent general_model or rdagent llm_finetune. A LiteLLM backend lets you plug in multiple model providers, and results can be inspected through a Streamlit log viewer or a separate authenticated web UI. It requires Linux, Docker and your own model API keys, so expect real setup work before the first successful run.
The framework runs a research-then-development loop: the research side reads papers, reports or prior experiment results and proposes new model structures or feature hypotheses; the development side implements them as Python code, executes training or backtesting inside Docker, and collects metrics, logs and errors as input for the next round. Commands map to concrete pipelines: rdagent fin_quant co-evolves factors and models on Qlib, rdagent fin_factor and rdagent fin_model evolve only factors or only models, rdagent fin_factor_report extracts factors from a folder of financial reports, rdagent general_model takes a paper URL and reproduces the described model, rdagent data_science targets Kaggle or local competition data with feature engineering and tuning, and rdagent llm_finetune drives benchmark-oriented fine-tuning with data processing, training, evaluation and feedback refinement. Configuration lives in a .env file (CHAT_MODEL, EMBEDDING_MODEL and provider keys), and rdagent health_check verifies Docker, port availability and model connectivity.
- Quant researchers who want new factors generated and backtested on Qlib automatically, with factor and model co-optimization instead of manual trial and error.
- Data scientists entering a Kaggle or internal tabular competition who want an agent to handle feature engineering and model tuning while they review execution traces.
- ML engineers who receive a new paper and need a runnable prototype of the described model structure quickly.
- Financial analysis teams that need to extract candidate factors from a batch of earnings reports and turn them into backtestable code.
- Teams doing benchmark-driven fine-tuning of open models, using FT-Agent for data processing, training and evaluation loops.
- Researchers reproducing agent results on benchmarks such as MLE-bench and comparing different LLM combinations.
How do you install or deploy this agent?
Confirm the environment first: Linux only, with Docker installed and the current user able to run docker run hello-world without sudo.
conda create -n rdagent python=3.10
conda activate rdagent
pip install rdagentTo work from source instead:
git clone https://github.com/microsoft/RD-Agent
cd RD-Agent
make devThen run the health check:
rdagent health_check --no-check-envHow do you use this agent?
Create a .env file in the project directory with your chat and embedding models (LiteLLM is the default backend). An OpenAI-compatible example:
cat << EOF > .env
CHAT_MODEL=gpt-4o
EMBEDDING_MODEL=text-embedding-3-small
OPENAI_API_BASE=<your_unified_api_base>
OPENAI_API_KEY=<replace_with_your_openai_api_key>
EOFValidate the configuration:
rdagent health_checkStart a scenario, for example the joint factor-and-model quant loop:
rdagent fin_quantOr a data-science / Kaggle run:
rdagent data_science --competition tabular-playground-series-dec-2021Inspect logs and traces:
rdagent ui --port 19899 --log-dir log/ --data-scienceWhat are this agent's strengths and limitations?
- Published MLE-bench numbers with variance: the o3(R)+GPT-4.1(D) configuration reaches 30.22% overall, reported over six seeds and broken down by competition difficulty.
- Several real industrial scenarios with distinct CLI entry points: quant (fin_quant/fin_factor/fin_model), data science (data_science), paper reproduction (general_model) and fine-tuning (llm_finetune).
- LiteLLM as the default backend supports OpenAI, Azure OpenAI, DeepSeek and more, so you can pair a stronger research model with a cheaper development model.
- Backed by a peer-reviewed trail: overall tech report, R&D-Agent-Quant at NeurIPS 2025, FT-Dojo at ICML 2026 and the Agent² RL-Bench preprint.
- Two inspection surfaces — a Streamlit log viewer and an authenticated web UI started with rdagent server_ui — for watching execution traces live.
- Linux only today; Windows and macOS users cannot follow the documented install path directly.
- Most scenarios depend on Docker to execute generated code, and first-run setup involves model keys, an embedding provider and port checks — a non-trivial configuration burden.
- The software is free but you supply and pay for LLM API usage; the quant paper's sub-$10 figure is scenario-specific, not a general cost guarantee.
- The web UI explicitly does not support the data_science scenario, which still requires the Streamlit rdagent ui.
- The README notes that internal commit history was not preserved, so some early contributions are missing from the public timeline.
How does this agent compare with similar options?
The README benchmarks directly against AIDE (o1-preview), the previously best public MLE-bench result: R&D-Agent's o1-preview configuration scores 48.18% on Low==Lite and 22.4% overall versus AIDE's 34.3% and 16.9%, and the o3(R)+GPT-4.1(D) mix lifts those to 51.52% and 30.22%. On the quant side, the README reports RD-Agent(Q) achieving roughly 2× the ARR of benchmark factor libraries at under $10 while using over 70% fewer factors.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| R&D-Agent This agent | 44 · Major gaps | CLIFree + model costs | ★ 15k | 15d ago | Python | OpenAI API |
| Doc-to-LoRA (D2L) | 32 · Major gaps | Library / SDKFree | ★ 841 | 5mo ago | Python | — |
| ALTA Research Trading Workbench | 83 · Good | Web app | ★ 1.1k | 1mo ago | Python | — |
| TradingAgents for A-Shares | 52 · Major gaps | Library / SDKFree + model costs | ★ 3.9k | 5d ago | Python | OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
README requires Docker and instructs users to run docker without sudo; the Agent executes LLM-generated code inside containers, a high-privilege execution surface. No sandbox isolation, resource quotas, or human confirmation steps for generated code are described, so least_privilege and user_confirmation score 1. Data flow: only LLM API key and embedding service configuration is explained; there is no systematic disclosure of which third-party endpoints receive papers, financial reports, or Kaggle data, so data_flow_transparency and sensitive_data_handling score 1. Dependency security has Dependabot, CodeQL badges, and CI constraints, but requirements.txt is largely unpinned (only litellm>=1.73 and pydantic-ai-slim pinned), scoring 2. External effects (file writes, training runs, paid API calls) have no rollback or undo mechanism described, so rollback is 0. Source attribution is clear: MIT copyright to Microsoft, SECURITY.md provides MSRC reporting channel, source_attribution scores 2.
README and pyproject agree on Python >=3.10 (CI tests 3.10/3.11) and Linux-only, but the OS Independent classifier conflicts with the Linux-only statement, so self_consistency scores 1. Dependencies load dynamically from requirements.txt with a clear install path, dependency_availability scores 2. autorl_bench tests show failed evaluations raise RuntimeError instead of silently returning 0.0 and pass through an error field, giving concrete evidence for failure_messages, scoring 2.
README lists quant, data science, Kaggle, paper reproduction, and LLM fine-tuning scenarios, audience_and_scenarios scores 2. However, input boundaries, required data formats, cost ceilings, and failure modes per scenario are not systematically defined, so capability_boundaries scores 1. Triggers are CLI subcommands (rdagent fin_quant etc.) with parameters and prerequisites scattered across docs, trigger_precision scores 1. Environment fit is Linux + Docker only with no Windows/macOS guidance, environment_fit scores 1.
README is well structured with news, quick start, configuration, run, and UI monitoring, information_architecture scores 2. Install steps (conda, pip, make dev, health_check) are concrete, install_notes scores 2. Naming stability: many CLI subcommands and scenario names, some marked experimental/deprecated, naming_stability scores 1. Examples are rich (multiple demo commands and video links), examples_and_faq scores 2. Known limitations mention only Linux-only and Web UI not supporting data_science, known_limitations scores 1. LICENSE is full MIT text, license scores 3. Version is generated dynamically via setuptools-scm with no explicit CHANGELOG, versioning_changelog scores 1. Maintenance responsibility has Microsoft org ownership, SECURITY.md, CI, and issue links, maintenance_responsibility scores 2.
Outputs are code, factors, models, and logs that users must evaluate and integrate themselves, output_usability scores 1. The project targets automated R&D with papers and MLE-bench results supporting its value proposition, but static files cannot verify actual gains, marginal_value scores 1. Cost: README mentions RD-Agent(Q) under $10, but overall LLM call and training costs are not quantified, cost_benefit scores 1.
README cites arXiv papers, a tech report, and MLE-bench detailed run links, so claim_traceability has external pointers but no corresponding data files in the repo, scoring 1. Cross-source corroboration: MLE-bench numbers can be compared against papers/external links, but in-repo tests and docs do not reproduce them, cross_source_corroboration scores 1. Fact/inference separation: README mixes benchmark results with vision statements without marking which are reproduced facts, fact_inference_separation scores 1.
- Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
- The Agent executes LLM-generated code inside Docker; README does not describe sandbox isolation, resource quotas, or human confirmation, so harden containers and permission boundaries before deployment.
- Most dependencies in requirements.txt are unpinned; supply-chain reproducibility and security rely on Dependabot and constraint files, so pin versions for production use.
- MLE-bench and quant return figures in README come from external papers and links; no reproducible data is in the repo, and static review cannot verify them.
- The Web UI requires UI_SERVER_AUTH_TOKEN; README warns local services can be reached by malicious websites, so use a long random token and keep the default 127.0.0.1 binding.
- The project is marked Development Status Alpha; CLI subcommands and scenario names may change, so check changes before upgrading.