Code, Agents, Tools, and Skills
Code and Agent Steps share outcome routing, but serve different responsibilities.
Capability boundaries
Code receives Stage State, writable Storage, human interaction, a cancellation signal and optional Project access. Agent Tools receive State, read-only Storage, a signal and optional Project access. Agent Tools cannot directly commit formal data or invoke human interaction.
Code normally reads business data from State and returns { outcome: "..." }. Agent final output is parsed by its original Zod Schema; host Tool input and output are also parsed and checked for JSON compatibility.
Execution environments
Service execution constructs models from project settings. External MCP execution hands the declared task to the connected client, with claimed ownership and serial Tool calls. The same host validates capabilities and results in both modes.
Capabilities belong to one current call. Await operations; do not retain access in module state or continue using it after return, cancellation or transition.
See Code and Agents and Tools and Skills.