Context Gateway for AI Systems
One task.
A controlled path.
LeanCTX sits between AI and the systems it reads. It selects relevant context, applies supported controls, and records what the integration can observe.
Select, Control and Prove set the path. The four chapters below unpack ten connected capabilities; access and policy checks apply throughout the supported flow.
Find
Start with a question. Find the useful evidence.
LeanCTX turns a task into a focused search across the sources your workflow may access. It keeps source references attached, so you can inspect the evidence behind a match.
A coding workflowFor a code review: locate the checkout implementation and its tests.
- 01
Decide
Define the task.
Set the question, available sources and context budget. Give the next read a clear purpose.
- 02
Retrieve
Find relevant sources.
Search the sources available to your workflow. Relevant matches become candidates for the next context.
Control
Give the model what it needs. Apply your rules before delivery.
Read at the right depth, reduce unnecessary material and apply your configured boundaries. Source access and content inspection answer different questions: may this source be read, and may this result be delivered?
A coding workflowKeep the relevant function. Restrict customer-data directories and inspect supported text results with enabled filters.
- 03
Extract
Read the relevant detail.
Open the file structure, function or passage behind a match. Choose the read depth your question needs.
- 04
Compress
Reduce the noise.
Remove unnecessary detail from the prepared view. Use source references to read deeper when the task requires it.
- 05
Govern
Apply your rules.
Access boundaries and enabled filters check supported operations before delivery. These controls accompany the lifecycle rather than running only at this step.
Run
Take the next step. Within your constraints.
Your application can use the prepared context directly. When execution is routed through LeanCTX, the host checks the candidate against applicable route policies and budgets before allowing the supported call.
A coding workflowUse a permitted model route. Any fallback must meet the same applicable constraints.
- 06
Run
Execute through an allowed route.
Use prepared context in your own model call, or route supported execution through LeanCTX. In the governed path, the selected route must pass the applicable policy and budget checks.
Learn
Check the result. Keep a better starting point.
Inspect recorded usage and evaluate the actual task. Retain useful findings and supported state for the next session or handoff. A completed model call is evidence of execution; task checks establish whether the work succeeded.
A coding workflowReview the proposed change, run its tests and preserve the decisions the next task will need.
- 07
Evaluate
Measure what changed.
Inspect delivered context, observed usage and the basis of any cost estimate. Evaluate the task outcome separately, including the cost of failed attempts and retries.
- 08
Remember
Save useful findings.
Record decisions, findings and working state. Retrieve what the next session needs to continue.
- 09
Hand off
Prepare the handoff.
Pass a task, selected findings and source references to the next person or agent. The Python SDK exposes local handoffs in Preview; broader agent orchestration remains Research. The host owns agent launch, lifecycle and permissions.
- 10
Replay
Revisit the context decision.
Use the source and recorded state still available to investigate a result. Context replay does not guarantee an identical model answer.
Your first workflow
Start with one real task.
Connect your tool, prepare context from a familiar project and compare the result with its source. Add execution controls and continuity as your workflow needs them.
Start with LeanCTX
Make your next task a better-informed one.
Bring your tools. Keep your model. Put deliberate context between them.
Local-first. Model-agnostic. Your context.