
7/8/2026
What this post added
This post introduces Glean's 100% programmatic tool-calling agent harness, which uses code execution within a sandbox for orchestration, filtering, looping, and branching. This approach reduces token usage by 24% compared to previous methods by avoiding multiple LLM round-trips and serializing/deserializing tool inputs/outputs. Key technical details include using the shell as the only directly exposed tool, exposing other capabilities via a tools SDK, employing a sandbox filesystem for tool outputs, and using tool truncation with previews to manage context. The harness also leverages search and progressive disclosure to dynamically load tools and skills, appending search results to the conversation to preserve the prefix cache.