Implement Code and Agents
Code
Default-export an ExecutableCode from a referenced source file. Business input lives in Stage State; Code receives only access; the Stage initializer receives the declared Loom inputs.
Use access.state, storage, interaction and optional project for business work. Await capability operations and return only the routing outcome.
Agent
Create agents/reviewer.md:
Bind it in an Agent Step fragment:
Create schema/review-result.ts with a default Zod Schema, such as z.strictObject({ outcome: z.literal("complete") }). Compiler checks the entry dependency graph. Declare Tools when the Agent needs business context.
The host constructs or hands off the Agent at runtime. Compiler packages its specification without creating a model. Final outputs must satisfy the advertised Schema input shape; the original parser validates them once.
See Tools/Skills, interaction, and SDK reference.