Skip to main content

LeanLane (Python)

Stop AI agents from over-building — decision ladder, diff scoreboard, prune review, and cloud client. Local helpers need no API key; cloud uses Talocode.

Part of Talocode. Hosted at /v1/leanlane/*.

Package pip install talocode-leanlane
Import from leanlane import LeanLaneClient, decide, score_diff
npm @talocode/leanlane
Cloud https://api.talocode.site
Auth TALOCODE_API_KEY (cloud only)
Repo github.com/talocode/leanlane
License MIT

Why LeanLane?

Agents over-generate code: new packages, wrappers, and speculative frameworks. LeanLane forces a decide → score → review loop so you ship smaller, safer diffs.

Install

pip install -U talocode-leanlane

Quickstart

from leanlane import decide, score_diff, review_code, get_ruleset, LeanLaneClient
import os

print(decide(task="add a date picker to the form"))
print(score_diff(diff="""--- a/x.ts
+++ b/x.ts
@@
+import moment from 'moment'
+export class DatePickerFactory {}
"""))
print(review_code(text="abstract class BaseThing {} // for future use"))
print(get_ruleset(mode="full")[:200])

client = LeanLaneClient(api_key=os.environ.get("TALOCODE_API_KEY"))
# print(client.health())  # when cloud route is deployed

Auth / env

export TALOCODE_API_KEY=...
export TALOCODE_BASE_URL=https://api.talocode.site  # optional

API surface

Local

Function Purpose
decide(...) Ladder recommendation before coding
score_diff(diff=...) Over-build score A–F on unified diffs
review_code(text=...) Findings + delete-list
get_ruleset(mode=...) Always-on agent rules markdown

Cloud client (LeanLaneClient)

Method Route Credits
health() GET /v1/leanlane/health 0
pricing() GET /v1/leanlane/pricing 0
capabilities() GET /v1/leanlane/capabilities 0
decide(...) POST /v1/leanlane/decide 2
score(...) POST /v1/leanlane/score 5
review(...) POST /v1/leanlane/review 5
rules(...) POST /v1/leanlane/rules 1
skill(...) GET /v1/leanlane/skill 1

CLI

leanlane --help
leanlane decide --task "add date picker"
leanlane score --diff "..."

The Python console script is a thin client. For full MCP/git integration use the Node CLI: npm i -g @talocode/leanlane.

Related packages

Package Install
LeanLane (this) pip install talocode-leanlane
VerifyLane pip install talocode-verifylane
SearchLane pip install talocode-searchlane
Tera pip install talocode-tera
ContextLane pip install contextlane
StackLane pip install talocode

Talocode ecosystem

Product Role
LeanLane (this package) stop agent over-building
VerifyLane · pip install talocode-verifylane Deterministic code verification
PolicyLane Allow/deny + redaction
StyleLane Constitution packs
EvalLane Assertion eval suites
TraceLane Agent run tracing
RetryLane Retries & circuit breakers
PromptLane Prompt versioning
HandoffLane Schema handoffs
GateLane MCP gateway
SearchLane · pip install talocode-searchlane Agent web search
ContextLane · pip install contextlane Shared agent context
MemoryLane Agent memory
Tera · pip install talocode-tera Capability API
Codra · pip install talocode-codra Coding agent
StackLane · pip install talocode Keys, wallet, metering
Tradia · pip install tradia Trading agents
ScreenLane · pip install talocode-screenlane Screen context
XSearchLane · npm i @talocode/xsearchlane X search
XProLane · pip install talocode-xprolane X pro workflows
Agent Browser Browser automation
ClipLoop Clip / media loops
InvoiceLane Invoicing
GeoLane Geo utilities
DevTool · pip install talocode-devtool Dev tooling

More: github.com/talocode · talocode.site · docs.talocode.site

License

MIT © Talocode

Metadata

Release files for talocode-leanlane 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for talocode-leanlane 0.1.1
File Size Uploaded
talocode_leanlane-0.1.1.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for talocode-leanlane 0.1.1
File Interpreter ABI Platform
talocode_leanlane-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / talocode_leanlane-0.1.1.tar.gz

Download URL talocode_leanlane-0.1.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e9516a46e927376f637db0684dbb0c9bd30b3a4c301dd046dfacfa20110141e7
BLAKE2b-256 checksum
How to use checksums
049fb218a742df472ad0df2943160c72be1e8ba1d496ab73b5c0e1f3ab53c66d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / talocode_leanlane-0.1.1-py3-none-any.whl

Download URL talocode_leanlane-0.1.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07740141f17ad84d65c4c1d44c1d0f9c43663c51381ebdd5dfceffceaf4647ae
BLAKE2b-256 checksum
How to use checksums
5dc7844a7ca21575b709b17670da9112691b3b3a65b4217824985f9894123d11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page