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.
Project description
leanlab
Self-improving labs for AI agents. Point leanlab at a task and a team of Claude agents iterates toward a goal — evolving ML / optimization experiments against a frozen metric, or shipping coding tasks through a spec → gate → review → merge loop with locked acceptance tests.
Install
pipx install leanlab # or: pip install leanlab · uvx 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.
Metric lab — 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
Coding lab — ship a coding task with locked acceptance tests:
cd ~/my-repo # a git repository
leanlab spec "add a /health endpoint" # spec-writer drafts + locks the tests
leanlab build add-health # engineer → gate → reviewer → merge
leanlab board # live board: tasks, timeline, playbook
Let Claude Code drive it
cd ~/my-project && leanlab init --for-agent # installs a Claude Code skill
Then just ask Claude Code — "use leanlab to add a /health endpoint" — and it specs, builds, and merges through the honest test gate for you.
Docs
- docs/USAGE.md — every command, in order, with examples.
- docs/OVERVIEW.md — how it works: the loop, the two lab types, the coding-lab flow, and the project structure.
- CONTRIBUTING.md — local development (uv, tests, the React board).
MIT licensed — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file leanlab-0.2.2.tar.gz.
File metadata
- Download URL: leanlab-0.2.2.tar.gz
- Upload date:
- Size: 284.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e72d1d8ff0adb59c405052ad7a8dd418b07038f6a311b5b35123b1cb4415e32
|
|
| MD5 |
0d04d983c8dd36fcbf79dbec6cf6be8e
|
|
| BLAKE2b-256 |
39fa9271c9da003e3638a18244daa8824def96a7dcbc814c93ef09f1a19dc5e7
|
Provenance
The following attestation bundles were made for leanlab-0.2.2.tar.gz:
Publisher:
publish.yml on bacharSalleh/leanlab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leanlab-0.2.2.tar.gz -
Subject digest:
5e72d1d8ff0adb59c405052ad7a8dd418b07038f6a311b5b35123b1cb4415e32 - Sigstore transparency entry: 1970245940
- Sigstore integration time:
-
Permalink:
bacharSalleh/leanlab@af7f702ee74f209ab81a4a181f3470e290cc0bb7 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/bacharSalleh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af7f702ee74f209ab81a4a181f3470e290cc0bb7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file leanlab-0.2.2-py3-none-any.whl.
File metadata
- Download URL: leanlab-0.2.2-py3-none-any.whl
- Upload date:
- Size: 115.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
585e4c43b8121e97b7037532cdb5589278790d4cbb763d9200e63567e3c8332a
|
|
| MD5 |
8cf2f333b6ceefaa36e9cf446469ee37
|
|
| BLAKE2b-256 |
aab50851cc11ace91c48c358f651dc0b222ad8e97704c7470075d5c31444ef33
|
Provenance
The following attestation bundles were made for leanlab-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on bacharSalleh/leanlab
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
leanlab-0.2.2-py3-none-any.whl -
Subject digest:
585e4c43b8121e97b7037532cdb5589278790d4cbb763d9200e63567e3c8332a - Sigstore transparency entry: 1970246096
- Sigstore integration time:
-
Permalink:
bacharSalleh/leanlab@af7f702ee74f209ab81a4a181f3470e290cc0bb7 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/bacharSalleh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af7f702ee74f209ab81a4a181f3470e290cc0bb7 -
Trigger Event:
push
-
Statement type: