Cookbook
End-to-end working examples: full code, real scenarios, multiple Crux primitives composed together.
The Cookbook is for "show me a complete working thing." Every recipe is a full example (input, output, all the supporting code) solving a real scenario. Recipes typically combine 2–4 Crux primitives so you can see how the pieces compose.
If you want narrative how-to with "when to use" guidance, browse the Guides. If you want a function signature, check the Reference. If you want a complete answer to "how do I build X with Crux," start here.
Categories
Basics
Chat with memory, structured extraction, streaming with tools: the everyday recipes.
Agents
Research pipeline, multi-agent debate, swarm routing: multi-agent compositions in action.
Workflows
Plan-with-approval, long-running flows, task worker pools: orchestration patterns.
RAG
Semantic RAG with Upstash, episodic recall: retrieval-augmented patterns.
Production
Eval-driven prompts and observability stack: running Crux in production.
How recipes are organized
Every recipe follows the same shape so you can scan the file and decide if it solves your problem:
- What this recipe builds: one paragraph + screenshot/output if applicable
- Primitives used: quick list of Crux features the recipe combines
- When to reach for this pattern: the situation that pushes you toward this recipe
- Full code: copy-pasteable, organized into the files you'd actually have
- How it works: walk-through of the key parts
- Variations: common adjustments (cheaper model, different store, error handling)
Recipes assume you've already done the Getting Started walkthrough for your framework.