TowardAI describes 80-line ToolKernel code mode

pub.towardsai.net9 min read

The author examines "code mode," an approach for AI agents where models write Python code to query and process data locally rather than ingesting large tool outputs directly into their context. By building an 80-line Python implementation and a gateway called ToolKernel, the author found that code mode significantly reduced token consumption, cost, and error rates compared to direct tool calling on data-heavy tasks. Open article →