VoltAgent / ai-agent-examples
AI Agent examples with TypeScript
README
AI Agent Examples
<br/>
Each folder here contains a runnable example demonstrating how to build or integrate an AI Agent using VoltAgent.
These projects demonstrate RAG retrieval, typed tools, persistent memory, supervisor-subagent orchestration, workflows, MCP tool integration, and voice/UX integrations. Use them as reference implementations or starting points for your applications.
VoltAgent is a TypeScript-based framework for building AI agents with modern tooling. Get started with the tutorial to learn the fundamentals and build your first agent.
What You'll Build
- RAG & Retrieval — Vector search with Pinecone, Chroma, Qdrant, and Postgres.
- Typed Tools — Zod-validated tools, MCP servers, and external API integration.
- Memory Systems — Working memory, persistent storage, and context management.
- Multi-Agent Orchestration — Supervisor patterns, sub-agents, and workflows.
- Deployments — Next.js, Cloudflare Workers, Netlify Functions, and more.
Featured Examples
WhatsApp Order Agent
A WhatsApp chatbot that handles restaurant orders through natural language. Manages menu items from a database and processes orders with conversation context.
<br/>
<br/>
Bootstrap this example:
npm create voltagent@latest -- --example with-whatsapp
Run the agent:
npm run dev
YouTube to Blog Agent
Converts YouTube videos into Markdown blog posts. Uses a supervisor agent coordinating specialized sub-agents with MCP tools, shared working memory, and VoltOps observability.
<br/>
<br/>
Bootstrap this example:
npm create voltagent@latest -- --example with-youtube-to-blog
Run the agent:
npm run dev
AI Ads Generator Agent
Generates Instagram ads by analyzing landing pages with BrowserBase Stagehand. Extracts brand identity, messaging, and visual elements, then creates ads using Google Gemini AI.
<br/>
<br/>
Bootstrap this example:
npm create voltagent@latest -- --example with-ad-creator
Run the agent:
npm run dev
AI Recipe Generator Agent
A recipe recommendation system that creates cooking suggestions based on available ingredients, dietary preferences, time constraints, and skill level.
<br/>
<br/>
Bootstrap this example:
npm create voltagent@latest -- --example with-recipe-generator
Run the agent:
npm run dev
AI Research Assistant Agent
A multi-agent research workflow where specialized AI agents collaborate to research topics and generate reports. Features type-safe data flow and structured coordination patterns.
<br/>
<br/>
Bootstrap this example:
npm create voltagent@latest -- --example with-research-assistant
Run the agent:
npm run dev
All Examples
⭐ AI Agent Base Starter
A minimal AI agent project with a single agent, in-memory storage, and a development server. Shows the core framework structure and basic agent configuration.
npm create voltagent@latest -- --example base
AI Providers
⭐ AI Agent with Anthropic Claude
Integrates Claude models (Sonnet, Opus, Haiku) using the Vercel AI SDK. Shows configuration, streaming responses, and patterns for working with Anthropic's language models.
npm create voltagent@latest -- --example with-anthropic
Related docs: AI Providers
⭐ AI Agent with Google Gemini
Connects to Google's Gemini models for multimodal AI. Demonstrates image inputs, API configuration, and using Gemini's reasoning features in agent workflows.
npm create voltagent@latest -- --example with-google-ai
Related docs: AI Providers
⭐ AI Agent with Google Vertex AI
Integrates with Google Cloud's Vertex AI platform. Includes service account setup, model selection, and deployment patterns for GCP infrastructure.
npm create voltagent@latest -- --example with-google-vertex-ai
Related docs: AI Providers
⭐ AI Agent with Groq
Uses Groq's LPU architecture for low-latency inference. Supports Llama, Mixtral, and other open-source models for real-time applications.
npm create voltagent@latest -- --example with-groq-ai
Related docs: AI Providers
⭐ AI Agent with xAI Grok
Integrates xAI's Grok models. Shows API configuration, model parameters, and building agents with access to real-time knowledge.
npm create voltagent@latest -- --example with-xsai
Related docs: AI Providers
⭐ AI Agent with Amazon Bedrock
Accesses foundation models from Amazon, Anthropic, Cohere, and others through AWS Bedrock. Shows credential configuration and model selection for AWS deployments.
npm create voltagent@latest -- --example with-amazon-bedrock
Related docs: AI Providers
⭐ AI Agent with Vercel AI SDK
Uses the Vercel AI SDK for streaming, function calling, and multi-provider support. Shows edge-optimized deployments and streaming patterns for web applications.
npm create voltagent@latest -- --example with-vercel-ai
Related docs: AI Providers
RAG & Vector Search
⭐ AI Agent with Chroma Vector Database
Implements RAG with Chroma's open-source vector database. Compares automatic retrieval patterns versus tool-driven approaches, including document ingestion and semantic search.
npm create voltagent@latest -- --example with-chroma
Related docs: Chroma Integration, RAG Overview
⭐ AI Agent with Pinecone
RAG using Pinecone's managed vector database. Shows namespace management, metadata filtering, hybrid search, and scaling patterns for high-traffic applications.
npm create voltagent@latest -- --example with-pinecone
Related docs: Pinecone Integration
⭐ AI Agent with Qdrant
Implements RAG with Qdrant vector search. Shows retriever-on-every-turn versus LLM-decides-when-to-search patterns, including filtering and payload handling.
npm create voltagent@latest -- --example with-qdrant
Related docs: Qdrant Integration, RAG Overview
⭐ AI Agent with PostgreSQL pgvector
Uses PostgreSQL with pgvector extension for vector similarity search alongside relational data. Shows schema design and similarity search queries.
npm create voltagent@latest -- --example with-postgres
Related docs: PostgreSQL Integration, RAG Overview
⭐ AI Agent with Vector Search
Core semantic search implementation. Shows embedding generation, vector storage, and automatic context recall from past conversations and documents.
npm create voltagent@latest -- --example with-vector-search
Related docs: Vector Search, RAG Overview
⭐ RAG Chatbot AI Agent
A conversational AI agent grounded in your knowledge base. Features document citations, source attribution, and context-aware responses combining retrieval with generation.
npm create voltagent@latest -- --example with-rag-chatbot
Related docs: RAG Chatbot, RAG Overview
⭐ AI Agent with Retrieval API
Minimal example demonstrating VoltAgent's retriever API. Shows how retrievers connect to agents, embedding handling, and controlling retrieval timing in conversation flow.
npm create voltagent@latest -- --example with-retrieval
Related docs: Retrieval API, RAG Overview
Tools & MCP
⭐ AI Agent with Tools
Shows how to create tools using Zod schemas, with support for cancellation signals and streaming results. Includes tool definition, parameter validation, and error handling.
npm create voltagent@latest -- --example with-tools
Related docs: Agent Tools, Tools Overview
⭐ AI Agent with MCP Client
Connects to Model Context Protocol (MCP) servers to enable agents to discover and call standardized tools. Shows client-side integration, server discovery, and tool enumeration.
npm create voltagent@latest -- --example with-mcp
Related docs: MCP Integration
⭐ AI Agent as MCP Server
Implements an MCP server that exposes custom tools following the Model Context Protocol specification. Shows server implementation, tool registration, and authentication.
npm create voltagent@latest -- --example with-mcp-server
Related docs: MCP Server
⭐ AI Agent with Composio MCP
Accesses pre-built integrations through Composio's MCP server. Shows authentication, browsing available actions, and executing workflows for email, calendar, CRM, and other tools.
npm create voltagent@latest -- --example with-composio-mcp
Related docs: MCP Integration
⭐ AI Agent with Google Drive MCP
Enables agents to browse, read, and interact with Google Drive files through an MCP server. Shows Drive API integration, OAuth authentication, and permission handling.
npm create voltagent@latest -- --example with-google-drive-mcp
Related docs: MCP Integration
⭐ AI Agent with Hugging Face MCP
Accesses Hugging Face's models and datasets through MCP. Shows searching the Hugging Face Hub, loading models, running inference, and accessing datasets.
npm create voltagent@latest -- --example with-hugging-face-mcp
Related docs: MCP Integration
⭐ AI Agent with Peaka MCP
Integrates Peaka's data connectivity platform through MCP. Shows connecting to multiple data sources, executing queries, and retrieving data through a unified interface.
npm create voltagent@latest -- --example with-peaka-mcp
Related docs: MCP Integration
⭐ AI Agent with Zapier MCP
Triggers Zapier workflows from agents using Zapier's MCP integration. Shows authentication, discovering available Zaps, and executing automated workflows across apps and services.
npm create voltagent@latest -- --example with-zapier-mcp
Related docs: MCP Integration
⭐ AI Agent with Tavily Search
Augments agent responses with real-time web search results using Tavily's API. Shows search query formulation, result filtering, and integration of web knowledge into responses.
npm create voltagent@latest -- --example with-tavily-search
Related docs: Agent Tools
⭐ AI Agent with Playwright Browser Automation
Web automation tools using Playwright for browser control. Shows configuring headless browsers, navigating pages, extracting data, and handling dynamic content through agent-callable tools.
npm create voltagent@latest -- --example with-playwright
Related docs: Agent Tools
⭐ AI Agent with Client-Side Tools
Implements secure client-side tool execution in Next.js. Shows client-server architecture for tool calling, type safety across boundaries, and security considerations for client-initiated actions.
npm create voltagent@latest -- --example with-client-side-tools
Related docs: Agent Tools
⭐ AI Agent with Thinking Tool
Implements structured reasoning by providing agents with a dedicated "thinking" tool. Shows defining thinking steps, capturing reasoning traces, and improving response quality through deliberate cognitive processes.
npm create voltagent@latest -- --example with-thinking-tool
Related docs: Reasoning Tool
Memory & State
⭐ AI Agent with Working Memory
Implements per-conversation memory with read and update tools. Shows memory structure design, automatic fact extraction, and memory updates to enhance conversation continuity.
npm create voltagent@latest -- --example with-working-memory
Related docs: Working Memory
⭐ AI Agent with VoltAgent Managed Memory
Uses VoltAgent's managed memory service through a REST adapter. Shows configuration, authentication, and integrating cloud-hosted memory for deployments requiring reliability and automatic scaling.
npm create voltagent@latest -- --example with-voltagent-managed-memory
Related docs: Managed Memory
⭐ AI Agent with Turso Database
Persists agent memory using Turso's edge-distributed LibSQL database. Shows Turso configuration, schema design for memory storage, and edge replication for global performance with SQLite compatibility.
npm create voltagent@latest -- --example with-turso
Related docs: LibSQL Memory
⭐ AI Agent with Supabase
Integrates Supabase for authentication, database storage, and real-time subscriptions. Shows setting up Supabase client, implementing Row Level Security, and building database-backed tools with authentication.
npm create voltagent@latest -- --example with-supabase
Related docs: Supabase Memory
Multi-Agent & Workflows
⭐ Multi-Agent System with Sub-Agents
Implements a supervisor pattern where a main agent orchestrates multiple specialized sub-agents. Shows agent composition, task delegation, result aggregation, and coordination patterns for multi-agent systems.
npm create voltagent@latest -- --example with-subagents
Related docs: Sub-Agents
⭐ AI Agent with Workflows
Structured multi-step workflows using createWorkflowChain with support for human-in-the-loop approvals. Shows defining workflow stages, handling transitions, implementing approval gates, and managing long-running processes.
npm create voltagent@latest -- --example with-workflow
Related docs: Workflows Overview
⭐ AI Agent HTTP Server for Agent-to-Agent Communication
Exposes agents over HTTP APIs for agent-to-agent communication. Shows REST API design for agents, authentication, request/response handling, and patterns for building agent microservices.
npm create voltagent@latest -- --example with-a2a-server
Related docs: A2A Server
⭐ AI Agent for GitHub Repository Analysis
Agents that read, analyze, and summarize GitHub repositories. Shows GitHub API integration, code structure analysis, documentation extraction, and generating repository summaries.
npm create voltagent@latest -- --example github-repo-analyzer
Related docs: Agent Tools
Deployment & Frameworks
⭐ AI Agent with Next.js
Full-stack AI agent application using Next.js with React UI components, agent API routes, and streaming responses. Shows app router integration, server actions, streaming UI updates, and deployment patterns.
npm create voltagent@latest -- --example with-nextjs
Related docs: Deployment Overview
⭐ AI Agent with Nuxt
Vue-based front-end with Nuxt communicating with VoltAgent APIs. Shows Nuxt 3 setup, API integration, SSR considerations, and building interactive chat interfaces with Vue components.
npm create voltagent@latest -- --example with-nuxt
Related docs: Deployment Overview
⭐ AI Agent on Cloudflare Workers
Deploys agents on Cloudflare Workers using the Hono adapter. Shows Workers configuration, Hono integration, edge runtime limitations, and optimizations for serverless edge computing.
npm create voltagent@latest -- --example with-cloudflare-workers
Related docs: Cloudflare Workers
⭐ AI Agent on Netlify Functions
Deploys serverless agent APIs on Netlify's platform. Shows Netlify Functions setup, environment configuration, deployment workflows, and integration patterns for adding AI agent capabilities.
npm create voltagent@latest -- --example with-netlify-functions
Related docs: Netlify Functions
⭐ AI Agent with Custom REST Endpoints
Extends VoltAgent server with custom REST endpoints alongside standard agent routes. Shows route registration, middleware integration, custom handlers, and maintaining consistent API design.
npm create voltagent@latest -- --example with-custom-endpoints
Related docs: Custom Endpoints
Voice & Audio
⭐ AI Agent with ElevenLabs Text-to-Speech
Converts agent text responses to speech using ElevenLabs' text-to-speech API. Shows ElevenLabs integration, audio streaming, voice selection, and optimizing for low-latency voice generation.
npm create voltagent@latest -- --example with-voice-elevenlabs
Related docs: Voice Integration
⭐ AI Agent with OpenAI Text-to-Speech
Generates speech from agent responses using OpenAI's text-to-speech voices. Shows OpenAI TTS integration, audio format handling, streaming, and voice parameter customization.
npm create voltagent@latest -- --example with-voice-openai
Related docs: Voice Integration
⭐ AI Agent with xAI Audio
Implements voice output using xAI's audio models. Shows xAI audio API setup, voice configuration, and generating speech output with xAI's platform.
npm create voltagent@latest -- --example with-voice-xsai
Related docs: Voice Integration
Observability & Evaluation
⭐ AI Agent with Live Evaluations
Runs real-time evaluations against agents during development. Shows defining evaluation criteria, running assessments during testing, and iterating based on feedback.
npm create voltagent@latest -- --example with-live-evals
Related docs: Live Evaluations
⭐ AI Agent with Offline Evaluations
Builds regression test suites using batch datasets. Shows dataset creation, batch evaluation execution, scoring metrics, and integration with CI/CD pipelines for systematic testing.
npm create voltagent@latest -- --example with-offline-evals
Related docs: Offline Evaluations
⭐ AI Agent with Viteval Framework
Integrates ViteVal's evaluation framework to test and score agent prompts and responses. Shows ViteVal setup, metric definition, evaluation execution, and result analysis.
npm create voltagent@latest -- --example with-viteval
Related docs: Using with ViteVal
Advanced Patterns
⭐ AI Agent with Dynamic Parameters
Implements runtime parameter validation and injection using Zod schemas. Shows dynamic schema generation, parameter validation, conditional parameters, and runtime type checking.
npm create voltagent@latest -- --example with-dynamic-parameters
Related docs: Dynamic Agents
⭐ AI Agent with Dynamic Prompts
Builds prompts programmatically from templates and live data sources. Shows template systems, data interpolation, conditional prompt sections, and prompt versioning strategies.
npm create voltagent@latest -- --example with-dynamic-prompts
Related docs: Prompts
⭐ AI Agent with Output Guardrails
Implements output validation and schema enforcement. Shows output validators, content filtering, schema validation, and fallback strategies for failed validations.
npm create voltagent@latest -- --example with-guardrails
Related docs: Guardrails Overview
⭐ AI Agent with Lifecycle Hooks
Uses lifecycle hooks and middleware for cross-cutting concerns. Shows hook registration, execution order, state passing, and common patterns for authentication and observability.
npm create voltagent@latest -- --example with-hooks
Related docs: Agent Hooks
⭐ AI Agent with JWT Authentication
Secures agent endpoints with JWT token verification. Shows JWT validation, token extraction, role-based access control, and integration with auth providers for multi-tenant applications.
npm create voltagent@latest -- --example with-jwt-auth
Related docs: Authentication
Quick Start
Bootstrap any example with one command:
npm create voltagent@latest -- --example [example-name]
cd [example-name]
npm install
npm run dev
KiloClaw - Managed OpenClaw hosting
