Use Fewer TokensBy StackOne

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.

Agent call trace Example
Count 5,000 Zendesk tickets
Live pagination50 calls
Deep Query2 calls
Modeled at 100 records per page Method ↗

Optimize your agent

Start with one task your agent runs.

Try an example
Runs in your browser

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
TechniqueYour own agentCoding agentsEnterprise assistantsWorkflow tools
Deep Query
Yes

Call the _s1query tool over MCP or the API

Yes

Through the Tool Gateway MCP

Yes

Through the Tool Gateway MCP

Depends

n8n's MCP Client Tool; Zapier and Make not confirmed

Load tools when needed
Yes

Tool Gateway MCP, or the SDK's own tool search

Yes

Claude Code and Cursor do it by default

Yes

One Tool Gateway MCP server exposes two tools

Yes

One MCP server with Advanced Tool Search in n8n

Turn off tools you don't use
Yes

Filter the tool list per step

Yes

Disable servers and tools you don't use

Yes

Copilot Studio and Gemini Enterprise cap tools per agent

Yes

Zapier suggests 3 to 5 actions per agent

Ask for fewer fields
Yes

source on any _s1query call

Yes

source on any _s1query call

Yes

source on any _s1query call

Depends

Where the workflow calls _s1query

Keep live questions live
Yes

Keep the live action next to the query tool

Yes

Keep the live action next to the query tool

Yes

Keep the live action next to the query tool

Yes

Keep the live action next to the query tool

Prompt caching
Yes

cache_control on the Claude API; automatic on OpenAI

Depends

The harness caches for you

Depends

The vendor caches for you

Depends

Depends on the model node

Let the agent run code over results
Yes

Programmatic tool calling on the Claude and OpenAI APIs; Pi codemode

Depends

Experimental in Claude Code, Codex and OpenCode

No

Not offered in enterprise assistants

No

Use a code step instead

Clear old tool results
Yes

Context editing and compaction on the Claude API

Yes

/compact and automatic compaction

Depends

Handled by the vendor

No

Runs are short

Cap tool output
Yes

Reshape results with toModelOutput in the Vercel AI SDK

Yes

MAX_MCP_OUTPUT_TOKENS, tool_output_token_limit

No

No setting exposed

Depends

Cap history and output in Make

Read web pages as text
Yes

Text snapshots, or filtered web search and fetch on the Claude API

Yes

agent-browser or Playwright CLI with a skill

Depends

The vendor's browsing tool decides

Depends

Fetch the page as text, not a screenshot

Keep instruction files short
Depends

Keep the system prompt short

Yes

CLAUDE.md under 200 lines; Cursor rules under 500

Depends

Keep agent instructions short

Depends

Keep the agent prompt short

Run side tasks on a smaller model
Yes

Route side tasks to a smaller model

Yes

model: haiku in a Claude Code subagent

No

The vendor picks the model

Depends

Pick the model per node

Measure what fills the window
Depends

Log input tokens per request

Yes

/context, /usage, /skill-doctor in Claude Code

No

No per-request view

Depends

Execution logs show each step

Lower the effort setting
Yes

The effort parameter on the Claude API

Yes

/effort in Claude Code

No

The vendor picks

Depends

Where the model node exposes it

Batch scheduled jobs
Yes

Message Batches API, 50% off

No

Interactive

No

Interactive

Depends

Scheduled runs only

Tool Policies
Yes

Per project in StackOne

Yes

Per project in StackOne

Yes

Per project in StackOne

Yes

Per 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.