- Optimizations
- Reduce context and token growth
- Reduce model cost
- Reduce unnecessary tool calls
- Reduce retries and repeated calls
- Fix findings without degrading evaluation results
Optimizations
Switch ROI, a Switch Trust capability, analyzes each agent’s recent traffic for cost waste and recommends optimizations for it. Each optimization is a short write-up for that agent, with a confidence level and, usually, an estimated savings in dollars over 30 days. On the Improvements tab, Verbosity shows Yes or No for whether the agent is a candidate, in place of a dollar figure. Weigh the confidence level before acting on a dollar figure. For context and retry optimizations, it’s lower when few sessions back the finding. Switch ROI re-runs each analysis about once a day, over the agent’s last 90 days of traffic. Traffic from before your change stays in that window for a while, so a later result reflects the fix gradually. When the waste is gone, the optimization’s write-up says so and it shows no savings. In Switch Trust, an agent’s optimizations appear on its Improvements tab. Switch ROI recommends each optimization, and you decide whether to apply it. Costs and savings are estimates, based on each model’s published price or the rate your organization has set for it.
Tools:
get_latest_roi_analyses for an agent’s current optimizations, list_roi_analyses for past results, get_roi_analysis for one in full, and list_roi_interactions for the traffic behind them.
Reduce context and token growth
Start from the agent’s context and verbosity optimizations.
To see the pattern in a real session, ask for the input, output, and cached tokens of each turn in the agent’s most expensive session. Input tokens that grow every turn, or cached tokens near zero, are the same patterns at turn level.
Verify: tokens and cost per session fall for comparable work, and evaluation results hold.
Tools:
get_latest_roi_analyses, list_llm_sessions, get_llm_session, get_interaction.
Reduce model cost
Start from the agent’s model optimization, then check it against real traffic.get_latest_roi_analyses, list_roi_interactions.
Reduce unnecessary tool calls
Start from the agent’s tool optimization, then compare the tools offered with the tools called.get_latest_roi_analyses, list_roi_interactions.
Reduce retries and repeated calls
Start from the agent’s retry optimization, then find the sessions it describes.
Verify: turns and duration per session fall, and evaluation results hold.
Tools:
get_latest_roi_analyses, list_llm_sessions sorted by turns or duration_ms, get_llm_session, get_interaction.
Fix findings without degrading evaluation results
Ask for the issues on a file before you change it, with the fix for each.complete: false, it stopped before checking every issue, so treat the result as unknown, not clean. Ask your coding agent to raise max_issues, up to 500, or narrow the search. Tools: find_issues_for_file, list_issues, get_issue, get_finding_detail, get_remediation_guidance.
Next steps
Optimize agents
Walk through the context and token playbook end to end
MCP tools
Every tool the server offers and what it returns

