PulseAugur
EN
LIVE 18:01:43

LLM agents slash token use with new 'Code Mode' approach

A new approach called "Code Mode" aims to significantly reduce the number of tokens required by large language models when interacting with multiple tools. Instead of serializing all tool definitions and intermediate results into the model's context window, Code Mode allows the LLM to generate a single script that directly calls the necessary tools. This script is then executed in a secure sandbox, with only the final output returned to the model. This method has demonstrated a reduction of over 99% in context token usage for certain tasks, addressing the scalability issues of traditional tool-calling methods. AI

IMPACT Reduces LLM context window strain and computational cost for multi-tool agent tasks, potentially enabling more complex agent operations.

RANK_REASON The item describes a new technical approach for LLM agents to interact with tools more efficiently, rather than a release from a frontier lab.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

LLM agents slash token use with new 'Code Mode' approach

COVERAGE [1]

  1. dev.to — LLM tag TIER_1 English(EN) · Shridhar Shah ·

    Stop Streaming Tools Through Your LLM

    <p><em>The 2026 shift from tool-calling to Code Mode: let the agent write one script instead of narrating fifty tool calls — and watch context tokens drop ~99%.</em></p> <p><strong>TL;DR:</strong> The classic agent loop loads <em>every</em> tool definition into the context window…