Escape the limitations of no-code builders and the complexity of starting from scratch.
VoltAgent is an open-source TypeScript framework for creating and managing AI agents. It provides modular components to build, customize, and scale agents with ease. From connecting to APIs and memory management to supporting multiple LLMs, VoltAgent simplifies the process of creating sophisticated AI systems. It enables fast development, maintains clean code, and offers flexibility to switch between models and tools without vendor lock-in.
npm create voltagent-app@latest -- --example with-research-assistantThis example demonstrates how to build an AI-powered research assistant using VoltAgent's workflow system. It creates a multi-agent system where different AI agents collaborate to research topics and generate comprehensive reports.
- Multi-Agent Workflow: Shows how to orchestrate multiple agents working together to accomplish complex research tasks.
- Exa MCP Integration: Leverages Exa's search capabilities via Model Context Protocol for gathering research data.
- Intelligent Query Generation: The assistant agent formulates effective search terms for comprehensive research coverage.
- Professional Report Writing: The writer agent synthesizes research findings into well-structured analytical reports.
- Type-Safe Data Flow: Demonstrates workflow chaining with Zod schemas for runtime validation and TypeScript integration.
- Node.js (v18 or later recommended)
- pnpm (or npm/yarn)
- An OpenAI API key (or setup for another supported LLM provider)
- An Exa API key (sign up at https://exa.ai/)
-
Create Environment File: Create a
.envfile in theexamples/with-research-assistantdirectory:# .env OPENAI_API_KEY=your_openai_api_key_here EXA_API_KEY=your_exa_api_key_here
Replace
your_openai_api_key_herewith your actual OpenAI API key andyour_exa_api_key_herewith your Exa API key. -
Get an Exa API Key:
- Visit https://exa.ai/
- Sign up for an account
- Navigate to your dashboard to obtain your API key
- Copy the API key for use in your configuration
-
Configure the Exa MCP Server: The MCP configuration in
src/index.tsautomatically uses your environment variable:const mcpConfig = new MCPConfiguration({ servers: { exa: { type: "stdio", command: "npx", args: ["-y", "mcp-remote", `https://mcp.exa.ai/mcp?exaApiKey=${process.env.EXA_API_KEY}`], }, }, });
Start the agent in development mode:
npm run dev
# or pnpm dev / yarn devYou should see logs indicating the MCP connection and tool fetching, followed by the standard VoltAgent startup message.
- Open the VoltAgent VoltOps Platform:
https://console.voltagent.dev - Find the workflow named
Research Assistant Workflow - Click on the workflow to interact with it
- Try research topics like:
- "Latest developments in quantum computing"
- "Impact of AI on healthcare in 2024"
- "Sustainable energy storage solutions"
- "Future of remote work technologies"
The research workflow follows these steps:
- Research Phase: The assistant agent takes your topic and generates distinct search queries to gather comprehensive information
- Writing Phase: The writer agent analyzes the research materials and composes a structured two-paragraph analysis
The workflow demonstrates:
- Sequential data flow between agents
- Type-safe input/output handling
- Integration with external tools via MCP
- Different LLM models for different tasks (GPT-4o-mini for research, GPT-4o for writing)