Skip to content

VoltAgent/ai-agent-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

AI Agent Examples


npm downloads Discord Twitter Follow

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

A WhatsApp chatbot that handles restaurant orders through natural language. Manages menu items from a database and processes orders with conversation context.


WhatsApp AI Agent Screenshot

Bootstrap this example:

npm create voltagent@latest -- --example with-whatsapp

Run the agent:

npm run dev

📖 Full tutorial

Converts YouTube videos into Markdown blog posts. Uses a supervisor agent coordinating specialized sub-agents with MCP tools, shared working memory, and VoltOps observability.


YouTube to Blog Agent Screenshot

Bootstrap this example:

npm create voltagent@latest -- --example with-youtube-to-blog

Run the agent:

npm run dev

📖 Full tutorial

Generates Instagram ads by analyzing landing pages with BrowserBase Stagehand. Extracts brand identity, messaging, and visual elements, then creates ads using Google Gemini AI.


AI Instagram Ad Generator Screenshot

Bootstrap this example:

npm create voltagent@latest -- --example with-ad-creator

Run the agent:

npm run dev

📖 Full tutorial

A recipe recommendation system that creates cooking suggestions based on available ingredients, dietary preferences, time constraints, and skill level.


Recipe Generator Agent Screenshot

Bootstrap this example:

npm create voltagent@latest -- --example with-recipe-generator

Run the agent:

npm run dev

📖 Full tutorial

📹 Video walkthrough

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.


Research Assistant Agent Screenshot

Bootstrap this example:

npm create voltagent@latest -- --example with-research-assistant

Run the agent:

npm run dev

📖 Full tutorial

📹 Video walkthrough

All Examples

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Resources

Releases

No releases published

Packages

No packages published