text
stringlengths
0
59.1k
In production, you have users and conversations. You'd like to track those as well:
```typescript
const result = await generateText({
model: openai("gpt-4o-mini"),
prompt: "What's the weather like in Berlin?",
tools: {
weather: {
// identical weather tool
},
},
experimental_telemetry: {
isEnabled: true,
metadata: {
agentId: "weather-assistant",
instructions: "You are a helpful weather assistant",
userId: "demo-user", // ← User tracking
conversationId: "weather-chat", // ← Conversation grouping
tags: ["weather", "demo", "production"], // ← Categorization
},
},
});
```
![Vercel AI SDK Integration Basic Exampla](https://cdn.voltagent.dev/docs/vercel-ai-observability-demo/vercel-ai-demo-with-metadata.gif)
At this point you have _enterprise-level_ monitoring:
- User behavior analysis
- Conversation flow tracking
- Tag-based filtering and analytics
- Critical data for support
## Multi-Agent Coordination
Most advanced section. When multiple agents collaborate:
```typescript
// Main agent: Planning
const { text: plan } = await generateText({
model: openai("gpt-4o-mini"),
prompt: "Write a plan for team meeting",
experimental_telemetry: {
isEnabled: true,
metadata: {
agentId: "planning-agent",
userId: "team-lead",
conversationId: "meeting-organization",
instructions: "You develop meeting plans and agendas",
tags: ["planning", "meetings"],
},
},
});
// Child agent: Execution
const { text: execution } = await generateText({
model: openai("gpt-4o-mini"),
prompt: `Execute this plan: ${plan}`,
experimental_telemetry: {
isEnabled: true,
metadata: {
agentId: "execution-agent",
parentAgentId: "planning-agent", // ← Parent relationship!
userId: "team-lead",
conversationId: "meeting-organization",
instructions: "You handle meeting logistics and execution",
tags: ["execution", "logistics"],
},
},
});
```
![Vercel AI SDK Integration Basic Exampla](https://cdn.voltagent.dev/docs/vercel-ai-observability-demo/vercel-ai-demo-with-multi-agent.gif)
**What does this give you?**
- You can see agent hierarchies
- Parent-child relationships
- Complex workflow tracking
- Cross-agent context
In the VoltOps dashboard you have _a whole diagram_ of how agents are talking to each other.
## What Do You See in the VoltOps Dashboard?
Now my favorite part. When you launch the VoltOps LLM Observability platform:
- **Real-time agent activity dashboard** - You can view what the agents are doing currently, in real time
- **Conversation flows** - Timeline of all conversations, tool usage
- **Performance analytics** - Response times, token usage, cost tracking
- **Error debugging** - Where it stopped, which tool was failing
- **User analytics** - Who uses it how often
There was a bug over the weekend in production. Usually I would spend hours debugging. Caught it in the VoltOps dashboard in 2 minutes - there was a timeout on a specific tool call. _Life saver_ indeed.
## How It All Works Together
Here's what happens behind the scenes when you add VoltOps observability to your Vercel AI calls:
<ZoomableMermaid