█

AI/TLDR

Buy me a coffee
Buy me a coffee

AIDE ML

An LLM agent that tree-searches ML code toward your metric

AutoML & Low-Code TrainingOpen source
Language
Python
License
MIT
$pip install -U aideml
IN SHORT

What is AIDE ML?

AIDE ML is the open-source reference implementation of AIDE (AI-Driven Exploration in the Space of Code), the algorithm Weco AI describes in its paper of the same name. It sits in the AutoML & Low-Code Training category of the Training & Fine-Tuning tools and is open-source, written in Python and licensed MIT.

Overview

AIDE ML is the open-source reference implementation of AIDE (AI-Driven Exploration in the Space of Code), the algorithm Weco AI describes in its paper of the same name. You point it at a directory of data, state a goal and an evaluation metric in plain English, and the agent writes Python solutions, runs them, reads the validation score and keeps improving the code until its step budget runs out. The best script and an interactive plot of everything it tried are written to a log folder.

The core idea is an agentic tree search over code. Each Python script is a node; LLM-generated patches that draft, debug or improve a script become its children, and the metric feedback decides which branches to keep exploring. OpenAI's MLE-bench, a set of 75 Kaggle competitions, used AIDE as a scaffold and reported that its tree search earned several times more medals than the best linear agent it compared against.

AIDE's HTML tree visualiser: a solution tree of code nodes for a Kaggle obesity-risk task beside the plan and Python code of the selected node
The tree visualiser: each node is a script the agent wrote; selecting one shows its plan and code.AIDE ML README ↗

The package is aimed at two audiences: researchers studying agent architectures, who can swap in new search heuristics, evaluators or LLM back-ends, and ML practitioners who want a strong baseline pipeline for a dataset quickly. It talks to OpenAI, Anthropic, Gemini or any local model that exposes an OpenAI-compatible API. Weco's commercial product generalises the same method to other code-optimisation jobs; this repository stays the lean, research-friendly version.

What it does

  • Natural-language task spec: a data directory, a goal and a metric are all the agent needs
  • LLM-guided tree search that drafts, debugs and improves scripts, pruning branches by validation score
  • HTML tree visualiser that shows every node in the search and the code attached to it
  • Streamlit web UI for uploading data, setting goal and metric, and watching logs and the best code live
  • Model-neutral: OpenAI, Anthropic, Gemini, or local models via an OpenAI-compatible base URL, including a fully local mode
  • Usable as a CLI, a Python library (`aide.Experiment`) or a Docker image

Getting started

AIDE ML is published on PyPI as `aideml` and needs Python 3.10 or newer plus an API key for the model that writes code (or a local OpenAI-compatible server).

Install and set a key

Install the package and export the key for your LLM provider.

bashbash
pip install -U aideml
export OPENAI_API_KEY=<your-key>

Run an optimisation

Point the `aide` command at a data directory and describe the goal and metric. The repository ships example tasks such as house prices and bitcoin price forecasting. When the run ends, `logs/<id>/best_solution.py` holds the best code found and `logs/<id>/tree_plot.html` lets you inspect the whole solution tree.

bashbash
aide data_dir="example_tasks/house_prices" \
     goal="Predict the sales price for each house" \
     eval="RMSE between log-prices"

Tune the search

Choose the coding model and the number of improvement steps with dotted flags; `agent.search.num_drafts` sets how many initial drafts are tried. To stay local, set `OPENAI_BASE_URL` to an OpenAI-compatible server such as Ollama and name the model for both code and feedback.

bashbash
aide agent.code.model="claude-4-sonnet" agent.steps=50 data_dir=... goal=... eval=...

export OPENAI_BASE_URL="http://localhost:11434/v1"
aide agent.code.model="qwen2.5" agent.feedback.model="qwen2.5" data_dir=... goal=... eval=...

Drive it from Python

The same search is available as a library: create an `Experiment` and run it for a number of steps, then read the best solution's validation metric and code.

pythonpython
import aide

exp = aide.Experiment(
    data_dir="example_tasks/bitcoin_price",
    goal="Build a time series forecasting model for bitcoin close price.",
    eval="RMSLE",
)
best_solution = exp.run(steps=2)
print(best_solution.valid_metric)
print(best_solution.code)

Or use the web UI

Clone the repository, install it in editable mode (which adds Streamlit) and start the app; paste an API key in the sidebar, upload data, set goal and metric and press Run AIDE.

bashbash
git clone https://github.com/WecoAI/aideml.git
cd aideml
pip install -e .
cd aide/webui
streamlit run app.py

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Get a strong baseline model for a tabular or time-series dataset without hand-writing the pipeline
Bar chart from the AIDE README comparing AIDE, MLAB and OpenHands on MLE-bench valid submissions, above-median scores, gold and any medal
MLE-bench results as charted in the AIDE ML README: AIDE against the MLAB and OpenHands scaffolds.AIDE ML README ↗
  • Replicate the AIDE paper or MLE-bench-style experiments on your own tasks
  • Prototype new agent search heuristics, evaluators or LLM back-ends on a small, readable codebase
  • Run an ML-engineering agent entirely on local models when data cannot leave the machine

How AIDE ML compares

AIDE ML alongside other open-source automl & low-code training tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Ludwig★ 11.8kLudwig is a low-code framework that lets you train, fine-tune, and deploy LLMs, multimodal, and tabular models using a YAML config instead of boilerplate Python.
AutoGluon★ 10.9kAn AutoML library that trains and ensembles models for tabular, time-series and multimodal data from three lines of Python, choosing the algorithms and hyperparameters itself.
PaddleX★ 6.3kA low-code toolkit that bundles PaddlePaddle's pre-trained models into ready-made pipelines for OCR, document parsing, detection, classification and time-series, callable from one CLI or Python API.
H2O LLM Studio★ 5.2kFramework and no-code graphical interface for fine-tuning open LLMs, with LoRA, 8-bit training, DPO/IPO/KTO and visual experiment comparison.
AIDE ML★ 1.6kAn LLM agent that tree-searches ML code toward your metric
Deep Researcher Agent★ 1.1kAn LLM agent that edits training code, launches GPU runs, monitors them without LLM calls and decides the next experiment, around the clock.