Learn common patterns and build real-world applications with these guides.
Tutorials
Understanding Agents
How agents use tools and run in loops
RAG Agent
Build a retrieval-augmented generation agent
Patterns
Coder
Manage Sessions
Create sessions, read state, and manage lifecycle from a plain script
Loop-Mode Sessions
Create a loop-mode session and inspect workflow state with getLoopState
Built-In Agents
Choose which built-in Coder agents are enabled for a session and set the default agent
Attach Skills
Save skills, group them into buckets, and attach them to a Coder session
Use Workspaces
Store reusable Coder selections in a workspace and attach them to sessions
Reconnect Sessions
Find live or wakeable sessions and prepare one for remote attach
Observe Sessions
Subscribe to a session's live event stream, page through its event history, and hydrate a client from the durable replay stream
More Patterns
Autonomous Research
Recursive research loop with native tool calling
Background Tasks
Run long-running tasks asynchronously
Chat with History
Persist conversation history
Cron with Storage
Schedule tasks that read and write data
Hono RPC + TanStack
Type-safe API calls between server and React frontend
LLM as a Judge
Use LLMs to evaluate agent outputs
Server Utilities
Common server-side utilities
Product Search
Build a semantic product search
Tailwind Setup
Configure Tailwind CSS for your frontend
Web Exploration
Headless browser in a sandbox for AI-guided browsing
Webhook Handler
Handle incoming webhooks
Integrations
Mastra
Deploy Mastra agents with tools, structured output, and multi-agent workflows
LangChain
ReAct agents, dynamic tools, and streaming with LangChain.js
OpenAI Agents SDK
Tool calling, handoffs, and streaming with the OpenAI Agents SDK
Claude Agent SDK
Conversational code intelligence with sandbox execution
Chat SDK
Multi-platform chatbots for Slack and Discord
Next.js
Add agents to an existing Next.js application
TanStack Start
Add agents to an existing TanStack Start application
Turborepo
Add Agentuity agents as a workspace package in a Turborepo monorepo with shared types