Skip to content

bacharSalleh/leanlab

Repository files navigation

leanlab

PyPI CI Python License: MIT

A self-improving experiment lab for AI agents. Point leanlab at a metric and a team of Claude agents — a Worker, a Director, and a Critic — evolves ML / optimization experiments against a frozen evaluator, while you watch on a live dashboard.

Install

pipx install leanlab        # or:  pip install leanlab   ·   uvx leanlab

📦 On PyPI: pypi.org/project/leanlab

Requires Python 3.11+ and the claude CLI (the agents run on Claude Code).

Quick start

leanlab runs inside your own project — each lab lives in a .leanlab/<name>/ folder; the engine stays in the installed tool.

Evolve a number (ML, optimization, anything that prints a score):

cd ~/my-project
leanlab init iris          # describe the task; Claude drafts the lab + scorer
leanlab check iris         # verify it's wired correctly (free)
leanlab lock iris          # freeze the scorer
leanlab run iris --n 5     # the agents evolve experiments (uses Claude)
leanlab serve iris         # watch the live dashboard

The Worker invents an experiment each round, the Critic red-teams it, and the Director steers the next round — all scored by the frozen evaluator you locked.

Docs

MIT licensed — see LICENSE.

About

A self-improving lab for AI agents — evolve ML experiments against a frozen metric, or ship coding tasks through a spec → gate → review → merge loop with locked acceptance tests.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages