Skip to main content

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

PyPI CI Python License: MIT

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

📦 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.

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

leanlab-0.2.3.tar.gz (309.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leanlab-0.2.3-py3-none-any.whl (120.9 kB view details)

Uploaded Python 3

File details

Details for the file leanlab-0.2.3.tar.gz.

File metadata

  • Download URL: leanlab-0.2.3.tar.gz
  • Upload date:
  • Size: 309.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for leanlab-0.2.3.tar.gz
Algorithm Hash digest
SHA256 6f31116da71d023ad12d70010f89bee8860dd44b8235924d86109122fde41bc1
MD5 20ffd35c04a10e98fc66b7b8cf759013
BLAKE2b-256 cbfe39b26942fe3b2d976104b50b8df7171de6c33e72d5182e2aaeadf2ac207b

See more details on using hashes here.

Provenance

The following attestation bundles were made for leanlab-0.2.3.tar.gz:

Publisher: publish.yml on bacharSalleh/leanlab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file leanlab-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: leanlab-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 120.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for leanlab-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6b38551e1d2be1a53fd69dd278070ef4b72c7d69a728f7905e7e084d8a1fea92
MD5 c4936a00654c85144af5d115e81519ea
BLAKE2b-256 7774ae6d1cffef6a2fca38f1e2753167326b9e0f18c8e65272a9e19158c85767

See more details on using hashes here.

Provenance

The following attestation bundles were made for leanlab-0.2.3-py3-none-any.whl:

Publisher: publish.yml on bacharSalleh/leanlab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page