Models & Execution

The right route.Within your rules.

Bring supported model and tool calls under explicit control. Define permitted routes, limit execution budgets and keep fallback decisions inside the same boundaries.

Task & constraintsPolicy & budgetPermitted routes

The approach

A suggestion is not an authorization.

Routing can select a suitable candidate. The enforcing host still validates permissions and budgets before execution. Optional optimization never gets to rewrite those rules.

Permitted routes

Choose from what is actually allowed.

A task can have several suitable models or tools. Start with the permitted candidates, apply the request constraints and record the selected route. A cheaper or faster proposal cannot make a forbidden destination valid.

Candidate
The model, provider or capability considered for the request.
Admission
Validate identity, policy and budget before execution. Required approvals bind the actor, operation, source revision and expiry.
Execution
Run the admitted operation with explicit status, streaming and cancellation. Unknown outcomes are reconciled before a retry.
Illustrative routing decision

Review a code change

Prepared context · configured policy

Explore an example outcome

Policy before execution

Permitted destination + applicable budget

An admitted route.

The candidate satisfies the example’s route policy and execution limit. The supported call can proceed.

Use the permitted primary route

A permitted alternative.

The primary route is unavailable. The replacement is checked against the same rules before execution.

Use the admitted fallback

A visible stop.

No candidate satisfies the policy or available budget. The example stops instead of choosing a forbidden destination.

Withhold execution

Example states, not a live request or provider benchmark. Controls apply to supported routed calls.

Fallback

A second route. The same limits.

If a route is unavailable or unsuitable, evaluate an allowed alternative under the same policy. If none fits, return an explicit failure rather than silently widening access or spending beyond the configured boundary.

Re-check
Apply permissions and limits to the replacement candidate too.
Explain
Keep the selection or refusal reason available for inspection.
Stop
No permitted alternative means no automatic escape from policy.

Budgets & delegation

Bound the work. Including the next step.

Keep context size, execution limits and organizational spending policies distinct. When supported work is delegated, its scope, budget and cancellation conditions must remain explicit. LeanCTX fits into your agent host; it is not an employee workspace or autonomous team manager.

Request budget
Define the applicable local limits for the supported operation.
Bounded delegation
Pass an explicit task and scope without inventing new source permissions.
Enterprise controls
Apply organizational budgets, approvals and identity policies through the compatible Enterprise service.

Outcome feedback

Improve from evidence. Keep authority separate.

Use recorded usage and accepted outcomes to compare routing choices. The deterministic reference path remains useful on its own. Optional learned proposals can inform a choice, while the host retains the final policy and budget decision.

Reference
A deterministic selection path that does not require private intelligence.
Proposal
Optional optimization suggests; it does not grant authority.
Evidence
Verify outcomes separately from completion signals and caller claims.

In your workflow

Bound the work. Keep ownership clear.

Execution can involve more than one agent. Coordination, delegation and transport serve different jobs; none may expand the task’s authority.

Roles, messages & claims

The agent bus records coordination messages and scoped work claims. It is distinct from the execution scheduler and does not grant access to a source.

Explore this capability

Bounded delegation

Represent dependencies, leases, budgets and cancellation in the work graph. Delegated work inherits its applicable limits instead of gaining open-ended authority.

Explore this capability

Delivery versus acceptance

Transporting a task or result is not proof of accepted execution. Keep failed delivery, cancellation and verified task outcome distinguishable.

Explore this capability

Reference and optional optimization

A deterministic reference remains usable. Optional learned proposals can inform selection, while the host retains policy and budget authority.

Explore this capability

Questions & answers

Execution and routing questions.

Does every model call pass through LeanCTX?

No. Execution controls apply to supported calls routed through the active integration. In context-only mode, your application receives prepared context and makes its own model call.

Does routing guarantee the cheapest successful model?

No. Suitability and cost depend on the task, configuration and available evidence. Compare equivalent work, include retries and failures, and check the accepted result.

Does LeanCTX replace my agent framework?

No. Your application owns the user experience and agent lifecycle. LeanCTX supplies supported context, policy, execution and evidence capabilities through its negotiated interfaces.

Next: Cost & Outcomes

Inspect the decision. Evaluate the result.

Connect the selected route with recorded usage and a separately verified task outcome.

Start with LeanCTX

Put one workflow under your rules.

Choose a supported integration. Define its permitted routes and limits, then inspect the result of a representative task.

Local-first. Model-agnostic. Your context.