Skip to main content

Token Optimization and Analytics

Token Optimization and Analytics helps admins understand where token usage comes from and reduce unnecessary cost or context.

Willow has two related product surfaces:

SurfaceWhere it livesWhat it does
Token Usage AnalyticsMonitor > TokensShows token usage, context footprint, recommendations, MCP context, toolkit context, skill size, and tool response optimization opportunities.
Token OptimizationAdmin > SettingsControls the tool output format Willow sends to the model, such as Default, JSON Compact, CSV, YAML, or TOON.

Use Token Usage Analytics to find the largest sources of token usage. Use Token Optimization settings and the recommended actions to reduce them.

How the pieces fit together

AI agents consume tokens in several places:

SourceWhy it matters
MCP contextMCP servers expose tool descriptions and input schemas. Large servers can add a lot of initial context before the agent calls any tool.
Toolkit contextToolkits expose curated subsets of tools. Smaller, focused toolkits reduce the initial context shown to agents.
Skill contextSkills are loaded into every AI conversation. Oversized skills raise the baseline cost of every session.
Tool responsesTool outputs can be large. Response mappings and output-format settings reduce the number of tokens returned to the model.

The normal workflow is:

  1. Enable Token Usage Analytics.
  2. Review recommendations in Monitor > Tokens.
  3. Inspect high-context MCP servers, toolkits, and skills.
  4. Create smaller toolkits, move long skill content into references, or tighten tool responses.
  5. Adjust output-format settings if tool responses are a major source of usage.

Pages in this section

On this page