Loading...
Code as Action (CodeAct)(CA)
Instead of emitting one JSON tool call per turn, the agent's action space is executable code that orchestrates tools with loops, conditionals, and variables. A single code block can call many tools, branch on results, and keep intermediate data in the runtime rather than passing every result back through the context window. Anthropic reports roughly a 98 percent token reduction on some multi-tool workflows when tools are called from code via MCP.
Loading technique guideโฆ
Code as Action (CodeAct)(CA)
Instead of emitting one JSON tool call per turn, the agent's action space is executable code that orchestrates tools with loops, conditionals, and variables. A single code block can call many tools, branch on results, and keep intermediate data in the runtime rather than passing every result back through the context window. Anthropic reports roughly a 98 percent token reduction on some multi-tool workflows when tools are called from code via MCP.
Loading technique guideโฆ