text
stringlengths
0
59.1k
[Vegetarian] [Vegan] [Gluten-free]
[Contains nuts] [Quick: under 30 min]
Always include:
- Difficulty level
- Serving size adjustments
- Common mistakes to avoid
- Pairing suggestions`,
model: openai("gpt-4o-mini"),
tools: await mcpConfig.getTools(),
});
// Create logger
const logger = createPinoLogger({
name: "with-mcp",
level: "info",
});
new VoltAgent({
agents: {
agent,
},
logger,
});
```
## How This AI Agent Works
**1. MCP Integration**: The recipe AI agent leverages MCP to connect with Exa's search API, enabling access to vast recipe databases and culinary knowledge.
**2. Intelligent Analysis**: Your AI agent analyzes available ingredients and cooking constraints to find the most suitable recipes in real-time.
**3. Personalization**: The agent adapts recommendations based on dietary preferences, cooking skill level, and time constraints.
**4. Comprehensive Output**: This AI agent provides not just recipes but complete cooking guidance including tips, substitutions, and nutritional information.
## Learn More
- [MCP Documentation](https://voltagent.dev/docs/getting-started/mcp-docs-server/)
- [VoltAgent Core Documentation](https://voltagent.dev/docs/)
- [Exa API Documentation](https://docs.exa.ai)
<|endoftext|>
# source: VoltAgent__voltagent/website/recipes/youtube-to-blog.md type: docs
---
id: youtube-to-blog
slug: youtube-blog-agent
title: YouTube to Blog Agent
description: Convert YouTube videos into Markdown blog posts with VoltAgent and MCP.
repository: https://github.com/VoltAgent/voltagent/tree/main/examples/with-youtube-to-blog
---
This VoltAgent example to show how a supervisor coordinates subagents that depend on [MCP tools](https://voltagent.dev/docs/agents/tools/#mcp-model-context-protocol), shared [working memory](https://voltagent.dev/docs/agents/memory/overview/), and [VoltOps LLM observability](https://console.voltagent.dev/). The supervi...
Here is what the Agent does:
- Loads YouTube tooling over MCP with Server-Sent Events
- Delegates transcript retrieval and writing to two focused agents
- Stores transcript context in LibSQL-backed working memory
- Records execution traces through the VoltOps observability adapter
- Serves every agent through VoltAgent’s Hono server integration
### Setup
<Info title="Before you begin, prepare these accounts and services:">
- VoltOps LLM Observability account at [console.voltagent.dev](https://console.voltagent.dev/login)
- OpenAI API key from [platform.openai.com](https://platform.openai.com/api-keys)
- Access to a [YouTube MCP server](https://smithery.ai/server/@jkawamoto/mcp-youtube-transcript). Community servers may throttle requests, so keep an alternate provider ready.
</Info>
#### Get the example code
I use the VoltAgent CLI to scaffold the project:
```bash
npm create voltagent-app@latest -- --example with-youtube-to-blog
cd with-youtube-to-blog
```
You can browse the full source on GitHub in the [`examples/with-youtube-to-blog`](https://github.com/VoltAgent/voltagent/tree/main/examples/with-youtube-to-blog) directory.
#### Configure environment variables
Create or copy a `.env` file with the required credentials:
```env
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key
# MCP Provider Configuration
YOUTUBE_MCP_URL=https://your-youtube-mcp-host/sse
# VoltOps Observability (optional)
VOLTAGENT_PUBLIC_KEY=your_public_key
VOLTAGENT_SECRET_KEY=your_secret_key
```
If you self-host VoltOps or LibSQL, add connection variables such as `LIBSQL_DATABASE_URL` and `LIBSQL_AUTH_TOKEN`. Without extra configuration the LibSQL adapters create local SQLite files inside the project directory.
#### Start the development server