agentskit.js
Cookbook

Cookbook

Copy-paste recipes for the things every agent app needs. Each recipe stands on its own.

Short. Self-contained. Production-ready. Drop a recipe into a real app, wire it to your stack, ship.

RecipeWhat it shows
Streaming chatuseChat + abort + back-pressure
Tools + memory togetherThe common "chat with state and actions" loop
Auth in tool callsScoping tool execution to the current user
Rate limitingToken bucket per user, per tool
Error boundaryGraceful failure for LLM + tool errors
Structured outputValidated JSON responses with zod
Multi-agent delegationPlanner → worker → reviewer
RAG in 15 linescreateRAG with a file loader

Tip

Every recipe is designed to paste into a real file. No bespoke imports, no "imagine that…" setup.

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →