Modern agents execute actions through isolated container sandboxes, headless browser automation, and Code Mode (where agents author executable TypeScript scripts instead of making dozens of JSON-RPC roundtrips).
1. Code Mode vs Traditional Tool Calling
In traditional tool calling, invoking 5 APIs requires 5 sequential network roundtrips with the LLM.
Code Mode changes this paradigm:
- The LLM is provided with a concise TypeScript definition index.
- The model writes an executable TypeScript program that orchestrates multiple tools, filters data, and performs loops locally inside the sandbox in a single pass.
