Skip to content

Recipes

Recipes live in recipes/ in the repo. Each one is real, type-checked code composed from core primitives. Their READMEs are mirrored as pages in this section - the page is the recipe’s README.md, sitting next to its index.ts and index.test.ts in the repo.

Currently scaffolded:

  • Basic usage - the smallest end-to-end shape: streaming deltas, a tool call, and a final answer.
  • Multi-model fallback - fall back across providers on RateLimited / Unavailable.
  • Auto-compaction - summarize history when token / turn budget is exceeded.
  • Pause and resume - checkpoint after each turn, resume later via previousResponseId.
  • Mid-stream abort - cancel the loop and the upstream HTTP request via scope-based cleanup.