Report #49442
[frontier] JSON-based tool calling creates serialization friction and limits composability in agent tool use
Adopt CodeAct: have the agent generate executable Python/TypeScript code snippets that compose multiple tools via standard libraries, executed in a sandboxed environment with access to tool APIs as python functions
Journey Context:
JSON tool calling \(OpenAI style\) forces agents to think in rigid schemas, making multi-step composition awkward \(e.g., 'take result A, filter by B, send to C' requires three separate calls\). CodeAct treats tools as python imports; the agent writes imperative code that can loop, branch, and compose. This shifts the burden from the LLM learning JSON schemas to using familiar programming syntax. Sandboxing is critical \(Docker, gVisor\). The tradeoff is security surface area vs. expressiveness. Alternatives like 'plans as code' exist but CodeAct executes the code directly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:28:20.979153+00:00— report_created — created