AI agent token optimizer
Use fewer
tokens.
Find the tool calls and context your agent can cut. Describe one task to get a plan for the harness you use.
Optimize your agent
Start with one task your agent runs.
Methodology
Where the numbers
come from.
Tool calls and record counts
In the Zendesk example, reading 5,000 tickets at 100 per page takes 50 calls. The modeled Deep Query path takes 2 calls against synced data to return the count. Native filters, the provider’s actual page size and how fresh the answer must be can change the comparison. Deep Query benchmarks ↗
Harness-specific recommendations
The optimizer checks your task against StackOne’s published connector actions and your harness’s supported settings. It distinguishes settings to enable, settings already on, and changes that need verification. Each recommendation includes its rationale.
Token estimates and privacy
Token estimates come from published measurements and arithmetic. To measure your savings, rerun the same task and compare token counts at the same answer quality. Your task is processed locally. Shared reports carry the harness, matched apps and actions, and workload settings.
Technique reference
What works for your agent?
Check each technique against your agent type. Expand a cell for the setting or limitation.
Compare 16 optimization techniques
| Technique | Your own agent | Coding agents | Enterprise assistants | Workflow tools |
|---|---|---|---|---|
| Deep Query | YesCall the _s1query tool over MCP or the API | YesThrough the Tool Gateway MCP | YesThrough the Tool Gateway MCP | Dependsn8n's MCP Client Tool; Zapier and Make not confirmed |
| Load tools when needed | YesTool Gateway MCP, or the SDK's own tool search | YesClaude Code and Cursor do it by default | YesOne Tool Gateway MCP server exposes two tools | YesOne MCP server with Advanced Tool Search in n8n |
| Turn off tools you don't use | YesFilter the tool list per step | YesDisable servers and tools you don't use | YesCopilot Studio and Gemini Enterprise cap tools per agent | YesZapier suggests 3 to 5 actions per agent |
| Ask for fewer fields | Yessource on any _s1query call | Yessource on any _s1query call | Yessource on any _s1query call | DependsWhere the workflow calls _s1query |
| Keep live questions live | YesKeep the live action next to the query tool | YesKeep the live action next to the query tool | YesKeep the live action next to the query tool | YesKeep the live action next to the query tool |
| Prompt caching | Yescache_control on the Claude API; automatic on OpenAI | DependsThe harness caches for you | DependsThe vendor caches for you | DependsDepends on the model node |
| Let the agent run code over results | YesProgrammatic tool calling on the Claude and OpenAI APIs; Pi codemode | DependsExperimental in Claude Code, Codex and OpenCode | NoNot offered in enterprise assistants | NoUse a code step instead |
| Clear old tool results | YesContext editing and compaction on the Claude API | Yes/compact and automatic compaction | DependsHandled by the vendor | NoRuns are short |
| Cap tool output | YesReshape results with toModelOutput in the Vercel AI SDK | YesMAX_MCP_OUTPUT_TOKENS, tool_output_token_limit | NoNo setting exposed | DependsCap history and output in Make |
| Read web pages as text | YesText snapshots, or filtered web search and fetch on the Claude API | Yesagent-browser or Playwright CLI with a skill | DependsThe vendor's browsing tool decides | DependsFetch the page as text, not a screenshot |
| Keep instruction files short | DependsKeep the system prompt short | YesCLAUDE.md under 200 lines; Cursor rules under 500 | DependsKeep agent instructions short | DependsKeep the agent prompt short |
| Run side tasks on a smaller model | YesRoute side tasks to a smaller model | Yesmodel: haiku in a Claude Code subagent | NoThe vendor picks the model | DependsPick the model per node |
| Measure what fills the window | DependsLog input tokens per request | Yes/context, /usage, /skill-doctor in Claude Code | NoNo per-request view | DependsExecution logs show each step |
| Lower the effort setting | YesThe effort parameter on the Claude API | Yes/effort in Claude Code | NoThe vendor picks | DependsWhere the model node exposes it |
| Batch scheduled jobs | YesMessage Batches API, 50% off | NoInteractive | NoInteractive | DependsScheduled runs only |
| Tool Policies | YesPer project in StackOne | YesPer project in StackOne | YesPer project in StackOne | YesPer project in StackOne |
FAQ
Common questions.
When should an agent use Deep Query?
Counts, totals and grouped questions over many synced records are good candidates. A query can return the aggregate before individual records enter the agent’s context. For a single known record or a question about the provider’s current state, keep the live read. Deep Query documentation ↗
Will fewer tool calls always save tokens?
One tool call can still return a large payload. Compare tool-definition tokens, returned fields and record counts separately. Run the same question before and after the change and check that the answer is still correct.
Do I need to connect an account?
No account or API key is required. Describe the task and name the apps it uses. The optimizer uses published connector actions and harness capabilities to produce its estimate.