The Cookbook contains self-contained, portable patterns you can copy into any AI chat application. Unlike the main docs which focus on ChatJS installation and configuration, these recipes work independently of ChatJS.Documentation Index
Fetch the complete documentation index at: https://chatjs.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Recipes by Category
Streaming
Patterns for handling real-time AI response streams.Resumable Streams
Continue AI responses after connection interruptions using Redis pub/sub
Tool Part
Connect backend tools to frontend UI components with loading states
Models
Patterns for the model system.Auto-Updating Models
Fetch model catalogs at runtime with fallback to a static snapshot
Data
Database patterns and state management.Next.js Chat Transition
Preserve first-message chat state while navigating through the App Router
Credit Tracking
Track and limit AI usage with credit budgets
Neon Branching
Isolated database environments for schema development
Auth
Authentication patterns for AI applications.Dev Auth Bypass
Auto-authenticate AI agents for browser testing
AI UX
User experience patterns for chat interfaces.Follow-up Questions
Generate contextual follow-up suggestions after AI responses
Chat Layout
Resizable split-panel layout with collapsible secondary panel
Development
Workflow patterns for local development.Git Worktrees
Parallel development environments without branch switching