█

AI/TLDR

Buy me a coffee
Buy me a coffee

SIA (Self-Improving AI)

A self-improvement loop where LLM agents rewrite a task agent, generation after generation, against your evaluator

Autonomous Coding AgentsOpen source
Language
Python
License
MIT
IN SHORT

What is SIA (Self-Improving AI)?

SIA (Self-Improving AI) is an open-source Python framework from Hexo Labs that tries to make any AI system — a model or an agent — better at one benchmark task without a human in the loop. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in Python and licensed MIT.

Overview

SIA (Self-Improving AI) is an open-source Python framework from Hexo Labs that tries to make any AI system — a model or an agent — better at one benchmark task without a human in the loop. It is the official implementation of the paper "SIA: Self Improving AI with Harness & Weight Updates" (Hebbar et al., 2026), and it ships as the `sia-agent` package with a `sia` command-line tool.

SIA orchestration flow: task description, dataset and eval.py feed a Meta Agent that creates the task-specific agent, which runs in the task environment while an Improvement Agent reads its execution log and rewrites it
Control flow between the Meta, Target and Improvement agents over successive generations.SIA README ↗

A run coordinates three agents. A Meta-Agent reads the task description and writes an initial Target Agent (`target_agent.py`) tailored to the task. The Target Agent attempts the task and logs what it did. A Feedback / Improvement Agent then reads those execution logs and the evaluation score, writes an `improvement.md` explaining what to change, and rewrites the Target Agent for the next generation. The loop repeats for as many generations as you ask for, and every generation's code, logs and rationale are kept on disk under `runs/`.

The signal the loop optimises is a task evaluator: after each generation SIA runs the task's `evaluate.py`, which scores the output against held-out data the agents never see, and feeds the metrics into the next feedback prompt. SIA bundles four tasks (`gpqa`, `lawbench`, `longcot-chess`, `spaceship-titanic`), can bootstrap a task directly from any MLE-Bench competition, and accepts your own task directory. The agents can run on the Claude Agent SDK, on OpenHands (Anthropic, OpenAI, Gemini, OpenRouter and other providers) or on pydantic-ai, chosen through JSON profiles rather than code changes.

What it does

  • Three-agent loop: a Meta-Agent writes the task agent, a Feedback Agent reviews its logs and score and rewrites it each generation
Bar chart of TriMul GPU kernel speedup versus baseline for Codex, Claude Code, SIA harness-only and SIA weights-plus-harness
TriMul kernel optimisation speedups as reported in the SIA README.SIA README ↗
  • Automatic scoring after every generation via the task's `evaluate.py`, against private held-out data the agents cannot see
  • Four bundled tasks, a `--task_dir` option for your own tasks, and a helper that builds a task from any MLE-Bench competition
  • Swappable agent backends — Claude Agent SDK, OpenHands or pydantic-ai — configured through provider and profile JSON files, including OpenAI-compatible endpoints
  • `sia web` dashboard showing each generation's agent code, prompts, improvement plans, scores and trajectories, live while a run is in progress
  • Optional `--sandbox docker` mode that runs agent-generated code in a container with no network access

Getting started

SIA is on PyPI as `sia-agent` and needs Python 3.11 or newer. Pick the extra that matches the LLMs you want to use, then run one of the bundled tasks to watch the loop before writing your own evaluator.

Install with the Claude agent backend

The `claude` extra uses the Claude Agent SDK and runs Claude models only.

bashbash
python3 -m venv .venv && source .venv/bin/activate
pip install 'sia-agent[claude]'
export ANTHROPIC_API_KEY="..."

Or install the multi-provider backend

The `openhands` extra works with Anthropic, OpenAI, Gemini and other providers. With a single OpenRouter key, the bundled OpenRouter profiles route both agents through OpenRouter.

bashbash
pip install 'sia-agent[openhands]'
export OPENROUTER_API_KEY="..."
sia run --task gpqa --meta-agent-profile openrouter-meta --target-agent-profile openrouter-target

Run the self-improvement loop on a bundled task

Each generation lands in `runs/run_{run_id}/gen_{n}/` with `target_agent.py`, `agent_execution.json` and, from generation 2, `improvement.md`. A live dashboard starts at http://127.0.0.1:8000 unless you pass `--no-web`. The default `--sandbox none` gives agent-generated code host access, so use `--sandbox docker` for untrusted tasks or models.

bashbash
sia run --task gpqa --max_gen 5 --run_id 1

Browse past runs

The visualizer renders everything under `runs/`: per-generation code, meta and feedback prompts, improvement plans, an accuracy-across-generations chart and execution trajectories.

bashbash
sia web --runs-dir ./runs --port 8080

Bring your own task

A task directory holds `data/public/task.md` (the description SIA reads), the inputs the agent may see, an `evaluate.py` exposing `evaluate()`, and held-out data in `data/private/`. Alternatively, build one from an MLE-Bench competition via the Kaggle API.

bashbash
sia run --task_dir ./my-task --max_gen 5 --run_id 1

# or bootstrap from MLE-Bench
python -m sia.prepare_mlebench_dataset -c "spaceship-titanic"
sia run --task_dir ./tasks/spaceship-titanic --max_gen 5 --run_id 1

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

When to use it

  • Push an agent's score on a benchmark you can grade automatically, without hand-iterating on its prompts and code
  • Run an automated ML-engineering loop on a Kaggle-style problem bootstrapped from MLE-Bench
Bar chart of 1/MAE on OpenAI's MLE-Bench Hard task comparing agents such as AIDE, R&D-Agent and MLEvolve with three SIA generations
MLE-Bench Hard results as reported in the SIA README (higher is better).SIA README ↗
  • Compare how different models perform as the target or meta agent by swapping JSON profiles on the same task
  • Study self-improving agents with a full record of every generation's code, rationale and score

How SIA (Self-Improving AI) compares

SIA (Self-Improving AI) alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
opencode★ 230kOpenCode is an open source AI coding agent that runs in your terminal, with built-in build and plan agents and an optional desktop app.
Claude Code★ 158kAnthropic's agentic coding tool for the terminal, IDE and GitHub: it understands your codebase, executes routine tasks, explains code and handles git workflows from natural-language commands.
Orca★ 147kOpen-source desktop workspace that runs Claude Code, Codex, OpenCode and other CLI coding agents in parallel, each in its own git worktree, with a mobile companion app.
OpenAI Codex★ 137kOpenAI's cloud and CLI coding agent that writes features, fixes bugs, and proposes code changes across a repo, running tasks in parallel.
Pi★ 125kMinimal terminal coding agent harness with four built-in tools, extended through TypeScript extensions, skills and prompt templates instead of forks.
Gemini CLI★ 109kAn open-source command-line AI agent from Google that connects your terminal to Gemini models for reading code, editing files, running shell commands, and searching the web.
autoresearch★ 101kKarpathy's minimal harness that hands a coding agent a single-GPU LLM training script and lets it run fixed five-minute experiments, keeping or discarding each change on its own.
SIA (Self-Improving AI)★ 2.2kA self-improvement loop where LLM agents rewrite a task agent, generation after generation, against your evaluator