agentskit.js
Recipes

Recipes

Copy-paste solutions for common scenarios. Each recipe is end-to-end and runs as written.

Recipes are short, complete, runnable. Each one is a single page that contains everything you need: install, code, run.

Pick the closest match to what you're building, copy, adjust the API key, run.

RecipeWhat you getTime
Chat with RAGA streaming React chat answering from your own docs5 min
PDF Q&AAsk questions about a local PDF8 min
Code reviewerAn agent that reviews a diff and posts comments10 min
Discord botA Discord bot that talks back, with tools12 min
Multi-agent research teamPlanner + researcher + writer15 min
Cost-guarded chatChat that aborts when it costs too much (UI-level)5 min
Cost guardEnforce a dollar budget with the costGuard observer5 min
Persistent memoryChat that remembers across sessions5 min
Confirmation-gated toolDangerous tool that asks before acting5 min
Custom adapterWrap any LLM API as an AgentsKit adapter10 min
Wrap a non-streaming endpointFake streaming for one-shot providers5 min
Edit + regenerate messagesLet users edit prompts and re-run specific turns5 min
Eval suite for an agentScore an agent's quality in CI10 min

Conventions used in recipes

  • Replace KEY with your actual API key (use process.env.X_API_KEY in real code)
  • Code is TypeScript; recipes work in plain JavaScript by removing types
  • Each recipe declares its npm install line at the top
  • Recipes don't depend on each other — every page stands alone
✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page