Deterministic Compilation Thesis
Agents are probabilistic. Software execution should be deterministic. Uni-CLI is the layer that compiles an agent's intent into a small, typed, repairable command.
This page explains Uni-CLI's design. Claims here are tied to Uni-CLI's own code, catalog, and benchmark harness.
Core Thesis
An agent starts with intent. A software surface requires exact actions. The system boundary is the compiler:
Where:
is the user's intent. is the current execution context. is the concrete action sequence. is correct when achieves under the observed context.
In Uni-CLI,
Adapter Contract
An adapter is intentionally small:
argsnames the accepted inputs.pipelinedeclares the deterministic steps.outputdefines the fields returned to the agent.errorsare normalized into a v2AgentEnvelope.
The current public catalog has 235 sites, 1448 commands, 1039 adapters, and 59 pipeline steps. Those numbers are generated from the repo by scripts/count-stats.ts, not hand-maintained marketing copy.
Self-Repair
Self-repair is a bounded search problem. A failing adapter returns structured feedback:
The repair function is:
The verification function is:
The loop is useful only when each iteration reduces ambiguity. That is why Uni-CLI errors include adapter_path, step, retryable, suggestion, and alternatives. A generic error asks the agent to search the whole problem space; a Uni-CLI error points to one file and one failing step.
Tool-Surface Tradeoff
Every agent tool surface balances three constraints:
- Coverage: how many intents can be executed.
- Accuracy: how often the selected operation does exactly what the user meant.
- Performance: how little context, latency, and runtime state the operation consumes.
Uni-CLI optimizes the hot path for accuracy and performance, then expands coverage through adapters. The strategy is:
- Discover or operate a surface once.
- Compile the reliable path into an adapter.
- Reuse the adapter as a command.
- Repair the adapter when upstream behavior changes.
That gives agents a narrow deterministic path for repeated work without losing the ability to add new surfaces.
Information Budget
The public benchmark target is not an abstract claim. It is a budget:
Where
- representative response bodies: 357-415 tokens;
- representative invocation strings: 7-11 tokens;
- representative total budgets: 364-423 tokens;
- full catalog output: 73242 tokens because it intentionally lists all 235 sites and 1448 commands.
The operational rule follows directly: agents should search and describe first, then execute the smallest matching command. Full catalog output is available, but it should be explicit.
Public Design Rules
Uni-CLI's public contract follows five rules:
- Search first. Natural-language intent maps to a small set of commands.
- Run narrow. Use the smallest transport that can finish the task.
- Return structure. Success and failure share the same v2 envelope shape.
- Repair locally. The error tells the agent where to patch and how to verify.
- Publish measured numbers. Counts and benchmark tables come from scripts, fixtures, and CI-verifiable commands.
Direction
The goal is to make CLI-native execution the default interface between agents and software. Protocol servers and editor integrations remain useful compatibility layers, but the fastest and most inspectable path is a command an agent can search, execute, compose, and repair.
Last reviewed: 2026-04-26.