# lean-mode

Cheap-model subagent (quick_run) with a dollar cap, auto-escalation when the cheap model fails, and an honest cost receipt.

- Type: Plugin
- Version: 0.1.0
- Updated: 22 Nov 2026
- Publisher: Aoyama
- Category: Tools

[Contact us](https://www.ulpi.io/en/support#contact)

## What it does

Cheap-model subagent (quick_run) with a dollar cap, auto-escalation when the cheap model fails, and an honest cost receipt. Each child call starts with 4-10k prompt tokens vs the parent's 100-300k.

Tested on Ulpi v0.23.0. MIT licensed.

Disclosure — the model can start cheap-model subagents with quick_run and may set the model id, budget and timeout per call; the dollar cap is soft, works only for models priced under lean.prices, and is off by default. When the parent's toolsets cannot be narrowed, and on every escalation, the child runs with all of the parent's toolsets (skills included) on the parent model.

No network calls, shell commands or credentials of its own.

## What you need first

- Requires the operator to configure lean: in config.yaml with a cheap model, parent model, prices and presets.

## Tools it adds

The tools an agent gets once this plugin is installed.

- `quick_run`

## How to set it up

Run metadata (tokens, cost estimate, model, child session id, result hash; no message content) is logged to plugin-data/lean-mode/runs.jsonl.

## Review notes

What an owner reads and accepts before the install is approved.

- Ulpi has not reviewed this version: it is listed in the public plugin catalog, and the install still fetches it at its pinned commit, checks its shape and scans it before you approve

## More in Tools

- [leash](https://www.ulpi.io/en/marketplace/plugins/leash): Lean OWASP Top 10 pentest toolkit run by the agent against your own dev app: scope-gated recon (TCP scan, same-origin crawl).
- [Ledger](https://www.ulpi.io/en/marketplace/plugins/ledger): Tamper-evident flight recorder: every tool call (arguments redacted), a SHA-256 of every result, and every approval decision are appended to a local hash-chained.
- [ledger-guard](https://www.ulpi.io/en/marketplace/plugins/ledger-guard): Deterministic double-count and arithmetic checker for stacked sales/event goal ledgers.

[All listings →](https://www.ulpi.io/en/marketplace) · [Publisher's guide →](https://www.ulpi.io/en/docs) · [Report a problem →](https://www.ulpi.io/en/security#report)
