Techniques
Techniques to cut AI agent tokens and latency
Grouped by what they change: how the agent asks for data, which tools it loads, how much comes back, and what each token costs.
The four marks on each card show how well it fits, in this order: your own agent, coding agents, enterprise assistants, workflow tools. A full mark fits, a half mark fits partly, a dashed ring isn't confirmed.
Query instead of paging
Deep Query
Deep Query answers counts, filters and totals from a synced copy of a list action, so the agent gets one result instead of paging through every record.
Fitsfor Your own agentFitsfor Coding agentsFitsfor Enterprise assistantsNot confirmedfor Workflow tools StackOneKeep live questions live
Synced data reflects the last sync, so a question about the provider's state this minute, or a single record you already know, belongs on the live action.
Fitsfor Your own agentFitsfor Coding agentsFitsfor Enterprise assistantsFitsfor Workflow tools StackOneLet the agent run code over results
When a task chains many tool calls, the agent can write a short program that calls the tools and returns only the final result, so intermediate results stay out of context.
Fitsfor Your own agentPartlyfor Coding agentsNot availablefor Enterprise assistantsNot availablefor Workflow tools 6 harness settingsLoad fewer tools
Load tools when needed
Instead of sending every tool definition on every request, the agent sees a search tool and loads the few definitions a task needs.
Fitsfor Your own agentFitsfor Coding agentsFitsfor Enterprise assistantsFitsfor Workflow tools StackOne 11 harness settingsTurn off tools you don't use
Every enabled tool costs tokens on every request where definitions load up front, and a long tool list makes the right one harder to pick.
Fitsfor Your own agentFitsfor Coding agentsFitsfor Enterprise assistantsFitsfor Workflow tools 11 harness settingsKeep instruction files short
Instruction files such as CLAUDE.md and Cursor rules load into every session, so every line is paid for on every run.
Partlyfor Your own agentFitsfor Coding agentsPartlyfor Enterprise assistantsPartlyfor Workflow tools 3 harness settingsReturn less
Ask for fewer fields
A live list action returns whole records, so a question about two fields still reads every field.
Fitsfor Your own agentFitsfor Coding agentsFitsfor Enterprise assistantsNot confirmedfor Workflow tools StackOneClear old tool results
Long sessions keep every earlier tool result in context, and most of it is never read again.
Fitsfor Your own agentFitsfor Coding agentsPartlyfor Enterprise assistantsNot availablefor Workflow tools 6 harness settingsCap tool output
A single chatty tool response can fill the window.
Fitsfor Your own agentFitsfor Coding agentsNot availablefor Enterprise assistantsNot confirmedfor Workflow tools 3 harness settingsRead web pages as text
An agent that browses by screenshot or by reading raw HTML pays for every pixel and tag.
Fitsfor Your own agentFitsfor Coding agentsNot confirmedfor Enterprise assistantsNot confirmedfor Workflow tools 6 harness settingsPay less per token
Prompt caching
When every run opens with the same tools and system prompt, the model provider can cache that prefix and bill repeat reads at a fraction of the input price.
Fitsfor Your own agentPartlyfor Coding agentsPartlyfor Enterprise assistantsNot confirmedfor Workflow tools 3 harness settingsRun side tasks on a smaller model
Searching, reading files and summarising rarely need a frontier model.
Fitsfor Your own agentFitsfor Coding agentsNot availablefor Enterprise assistantsPartlyfor Workflow tools 3 harness settingsLower the effort setting
Reasoning effort sets how much the model thinks before answering.
Fitsfor Your own agentFitsfor Coding agentsNot availablefor Enterprise assistantsNot confirmedfor Workflow tools 4 harness settingsBatch scheduled jobs
Jobs nobody waits on, such as nightly reports, can go through a batch API at a discount in exchange for a slower turnaround.
Fitsfor Your own agentNot availablefor Coding agentsNot availablefor Enterprise assistantsNot confirmedfor Workflow tools 1 harness settingMeasure and govern
Measure what fills the window
Before changing anything, look at what fills the context window.
Partlyfor Your own agentFitsfor Coding agentsNot availablefor Enterprise assistantsPartlyfor Workflow tools 1 harness settingTool Policies
Tool Policies narrow which actions an agent can call and which fields it can read, per project.
Fitsfor Your own agentFitsfor Coding agentsFitsfor Enterprise assistantsFitsfor Workflow tools StackOne