- Custom
Context.Tagservices with complex lifecycle - Programmatic graph construction
- Advanced type-level constraints on step dependencies
- Direct integration with existing Effect application code
Quick Comparison
The same workflow in TOON and Effect builder: TOON:When to Use Effect Builder
| Scenario | Recommendation |
|---|---|
| Prompt-centric workflow | Use TOON |
Custom services with Context.Tag and Layer | Use Effect builder |
| Programmatic step generation | Use Effect builder |
| Existing Effect application integration | Use Effect builder |
| Simple sequential steps | Use TOON |
| Complex branching with typed discriminants | Use Effect builder |
Mixing TOON and Effect
TOON and Effect builder workflows coexist in the same project. A TOON workflow can import Effect services through itsimports: block, and an Effect builder workflow can reference TOON components.
Both compile to the same internal graph and run on the same durable execution engine.
Next Steps
- Effect Installation — Install the builder stack and TypeScript setup.
- Effect Quickstart — Build a two-step workflow with
$.step(). - Builder API Reference —
$.step(),$.sequence(),$.parallel(), and all builder primitives. - Context — What data a step receives at runtime.
- Services —
Context.Tag,Layer, and dependency injection. - TOON Overview — The declarative alternative.