On this page
Preview & research
Govern the model call.
Control routes, budgets and fallback behavior, then inspect execution evidence.
Select the execution path
An application can ask LeanCTX for prepared context and call its own model, or route execution through the Engine. Governed execution applies the configured identity, provider, model, tool and budget controls before the operation runs.
A coding assistant, for example, can receive an approved function excerpt while customer records are excluded. Its next model call must also use an allowed provider and remain within the task’s budget. Source access and execution permission are checked separately.
Define the allowed envelope
| Control | What it decides |
|---|---|
| Identity and project | Which principal is acting and under which scope |
| Source and processing policy | Which information and processing locations are permitted |
| Route | Which model or provider can serve this operation |
| Budget | Whether the projected and accumulated usage permits another attempt |
| Retry and fallback | Which failures may be retried and which alternate routes remain allowed |
| Approval | Whether an action needs an authorized decision before execution |
A fallback is not permission to send data to a forbidden provider. A retry is not a new budget. When the allowed route cannot complete, return an explicit failure or request the required approval.
Follow the operation lifecycle
Use the negotiated run, result, error, status, streaming and cancellation contracts. Unsupported operations fail explicitly; a transport connection does not imply that every capability is supported. Keep customer or deployment-held provider credentials out of returned context and receipts.
After a timeout or interrupted stream, inspect the recorded operation state before retrying. Transport failure alone does not prove that the provider did no work. Cancellation, completion and an accepted business outcome are separate states.
Read the evidence
Inspect the selected route, policy decision, usage, error and retry history. Distinguish provider-observed usage from estimates and unknown values. Include retries and output in task cost, then associate the accepted outcome with that evidence.
Governed audit records durable intent before dispatch and completion before disclosure where required by policy. Exported evidence retains its attribution and integrity metadata. Verify signed evidence against the configured external trust anchor rather than treating an unverified signature as proof.
See measurement and evaluation and budgets.
Operate the Enterprise Engine
The Enterprise Engine serves external applications through the shared Engine interfaces. Organizational operation includes SSO/SCIM, workload identity and revocation, roles and project boundaries, approved sources/providers/processing regions, budgets, approvals and audit retention.
Choose the deployment profile for managed operation, your VPC, on-premises or offline use. Entitlements, dependency availability, upgrades and recovery follow that profile.
A deployment’s SLA, support scope and commercial rights come from its agreement. Policy enforcement is not a security certification.
Keep application responsibility visible
Your application defines the business workflow and acceptance criteria. LeanCTX enforces the permissions given to the request and records what happened. It does not control calls that bypass the configured path, nor does a successful model response establish that the business task is complete.
Engine contract & references
Engine concepts describe responsibilities and behavior. Exact commands, package versions and platform contracts belong to their versioned references.
Versions & compatibility