A design pattern for token-efficient agent-facing systems.
Every token an agent carries costs money and displaces reasoning capacity. LEAN is a recursive architectural pattern: expose the minimum by default, make depth available on demand, and apply this at every layer of the interaction.
Most systems are built for humans. They front-load everything: every tool registered at startup, every field in every response, every element on every page. When the consumer is an agent with a metered, finite context window, this is waste.
LEAN replaces "send everything, let the agent filter" with "send the minimum, let the agent expand."
- Default Minimal. The first response is the smallest useful representation, not the smallest possible one.
- Depth on Demand. Every minimal representation has a path to full detail. One request away, never forced.
- Reversible Depth. Agents can expand and contract. Release context when the task is done.
- Layer Independence. Working in detail at one layer doesn't force breadth at another.
- State Consistency. Expanding or contracting at any layer never corrupts state at other layers.
| Layer | Controls | LEAN Approach |
|---|---|---|
| Tool Availability | What tools are loaded | Start with a minimal tool set, activate more at runtime |
| Content Resolution | How much detail the agent sees | Orientation first, drill into full detail on demand |
| Element Resolution | How the agent finds specific targets | Semantic search returns matches, not catalogs |
| Response Resolution | What comes back after an action | Structural diffs, not full state re-sends |
Each layer reduces token consumption independently. The savings multiply because they apply to different parts of every interaction. An agent using LEAN across all four layers can consume 5-10x fewer tokens than an equivalent agent using a traditional tool server.
Early benchmarks from Charlotte (reference implementation):
- Layer 1 alone: ~48% reduction in tool definition overhead
- Over a 100-page, 550-call session: ~1.9 million tokens saved
- Layers 2-4: Structurally similar savings, formal benchmarks in progress
See the full spec, Appendix A, for methodology and validation data.
LEAN is not specific to any protocol, framework, or integration pattern:
- MCP servers — Tool profiles, tiered content responses, semantic search, structural diffs
- ACP manifests — Capability groups in
agents.jsonso agents load tool subsets, not the full catalog - ASM content — Site manifests that describe structure at the orientation level, letting agents drill into specifics
- Any agent-facing system — Anywhere a context window is a finite, metered resource
LEAN optimizes for long sessions, varied complexity, and tasks where most content doesn't need deep inspection. It adds latency (two round trips instead of one) for tasks where the agent always needs full detail. For exhaustive extraction, full-page audits, or five-call sessions, the overhead may not be worth it. The spec addresses these tradeoffs directly.
LEAN is part of a three-spec family for the agentic web:
| Spec | Full Name | Scope | Deliverable |
|---|---|---|---|
| ASM | Agent Site Manifest | Site-level | site block in agents.json |
| ACP | Agent Context Protocol | Service-level | services block in agents.json |
| LEAN | Layered Efficiency for Agentic Navigation | Design philosophy | Guides authoring of both |
ASM and ACP define what to publish. LEAN defines how to write it efficiently.
If you're building an MCP server:
- Group your tools by task type.
- Default to the smallest useful group.
- Add a meta-tool that activates/deactivates groups at runtime.
- You've implemented Layer 1 and captured the highest-leverage savings.
If you're writing an ACP manifest:
- Organize tools into capability groups.
- Write descriptions at minimum viable length. Be literal, not marketing.
- Include output schemas so agents don't guess.
- Read Section 4 of the ACP spec for agent-optimized writing guidelines.
If you're writing an ASM manifest:
- Describe site structure at the orientation level: sections, capabilities, navigation.
- Let agents drill into specific pages rather than front-loading every page's detail.
- Use
data-asm-*attributes to increase semantic density at the content layer.
spec/
LEAN-Spec-v0.3.md # The specification
examples/
mcp-startup-profiles/README.md # Layer 1 — Charlotte's tiered tool profiles
content-resolution-levels/README.md # Layer 2 — Charlotte's detail level system
README.md
LICENSE
Charlotte is the reference implementation of LEAN across all four layers. Charlotte is an open-source MCP server for browser automation that implements tiered tool profiles, three-level content resolution, semantic element search, and structural diffing.
LEAN is a living specification. Implementation experience, benchmark data, and feedback are welcome.
- Open an issue to report problems or suggest improvements.
- If you build a system that follows LEAN principles, we want to hear about it.
- Benchmark data from real-world agent workflows is especially valuable.
Wesley Shoffner, Clocktower & Associates