# Use Fewer Tokens

> The AI agent token optimizer: describe what your agent does and get the fixes that cut its tokens and wait time, ranked for your harness, with the exact setting and its source. By StackOne.

Optimizer: https://usefewertokens.com/ (runs in the browser). The same optimizer on the StackOne blog: https://www.stackone.com/blog/ai-agent-token-optimizer/

Last checked: 30 Nov 2026, against the vendor's own pages.

Every page in one file: https://usefewertokens.com/llms-full.txt

## Harness guides
### Building my own agent
- [Reduce token usage in the Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/)
- [Reduce token usage in the OpenAI Agents SDK](https://usefewertokens.com/harnesses/openai/)
- [Reduce token usage in Vercel AI SDK](https://usefewertokens.com/harnesses/vercel-ai-sdk/)
- [Reduce token usage in LangChain and LangGraph](https://usefewertokens.com/harnesses/langchain/)
- [Reduce token usage in Mastra](https://usefewertokens.com/harnesses/mastra/)
- [Reduce token usage in Pi](https://usefewertokens.com/harnesses/pi/)
- [Reduce token usage in Flue](https://usefewertokens.com/harnesses/flue/)

### Using a coding agent
- [Reduce token usage in Claude Code](https://usefewertokens.com/harnesses/claude-code/)
- [Reduce token usage in Cursor](https://usefewertokens.com/harnesses/cursor/)
- [Reduce token usage in Codex](https://usefewertokens.com/harnesses/codex/)
- [Reduce token usage in OpenCode](https://usefewertokens.com/harnesses/opencode/)

### Using an enterprise assistant
- [Reduce token usage in ChatGPT](https://usefewertokens.com/harnesses/chatgpt/)
- [Reduce token usage in Microsoft Copilot Studio](https://usefewertokens.com/harnesses/copilot-studio/)
- [Reduce token usage in Gemini Enterprise](https://usefewertokens.com/harnesses/gemini-enterprise/)
- [Reduce token usage in Glean](https://usefewertokens.com/harnesses/glean/)
- [Reduce token usage in Claude](https://usefewertokens.com/harnesses/claude-ai/)

### Using a workflow tool
- [Reduce token usage in n8n](https://usefewertokens.com/harnesses/n8n/)
- [Reduce token usage in Zapier](https://usefewertokens.com/harnesses/zapier/)
- [Reduce token usage in Make](https://usefewertokens.com/harnesses/make/)

## Techniques
### Query instead of paging
- [Deep Query](https://usefewertokens.com/techniques/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.
- [Keep live questions live](https://usefewertokens.com/techniques/keep-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.
- [Let the agent run code over results](https://usefewertokens.com/techniques/code-execution/): 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.

### Load fewer tools
- [Load tools when needed](https://usefewertokens.com/techniques/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.
- [Turn off tools you don't use](https://usefewertokens.com/techniques/fewer-tools/): 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.
- [Keep instruction files short](https://usefewertokens.com/techniques/instruction-files/): Instruction files such as CLAUDE.md and Cursor rules load into every session, so every line is paid for on every run.

### Return less
- [Ask for fewer fields](https://usefewertokens.com/techniques/field-selection/): A live list action returns whole records, so a question about two fields still reads every field.
- [Clear old tool results](https://usefewertokens.com/techniques/context-editing/): Long sessions keep every earlier tool result in context, and most of it is never read again.
- [Cap tool output](https://usefewertokens.com/techniques/output-caps/): A single chatty tool response can fill the window.
- [Read web pages as text](https://usefewertokens.com/techniques/browser-snapshots/): An agent that browses by screenshot or by reading raw HTML pays for every pixel and tag.

### Pay less per token
- [Prompt caching](https://usefewertokens.com/techniques/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.
- [Run side tasks on a smaller model](https://usefewertokens.com/techniques/smaller-subagents/): Searching, reading files and summarising rarely need a frontier model.
- [Lower the effort setting](https://usefewertokens.com/techniques/effort/): Reasoning effort sets how much the model thinks before answering.
- [Batch scheduled jobs](https://usefewertokens.com/techniques/batch/): Jobs nobody waits on, such as nightly reports, can go through a batch API at a discount in exchange for a slower turnaround.

### Measure and govern
- [Measure what fills the window](https://usefewertokens.com/techniques/audit-commands/): Before changing anything, look at what fills the context window.
- [Tool Policies](https://usefewertokens.com/techniques/tool-policies/): Tool Policies narrow which actions an agent can call and which fields it can read, per project.

## Also by StackOne
- MCP clients scorecard: https://mcpclients.dev/
- Deep Query: https://www.stackone.com/platform/deep-query/
- How to reduce AI agent token usage: https://www.stackone.com/blog/reduce-ai-agent-token-usage/
