Skip to main content

Tags

Tags allow you to categorize and filter traces for better organization and analysis. Add meaningful labels to your traces to group related activities, track performance by category, and quickly find specific interactions in your dashboard.

Basic Usage

Add tags as an array of strings when creating traces:

Tag Usage Patterns

Basic Categorization
Hierarchical Tags
Environment & Deployment
Dynamic Tagging

Basic Categorization

Simple tag usage for categorizing traces by function and priority.

JS/TS SDK
Python SDK
Vercel AI SDK
Example:
const trace = await sdk.trace({
name: "Customer Support Query",
agentId: "support-agent-v1",
input: { query: "How to reset password?" },
userId: "user-123",
conversationId: "conv-456",
tags: ["support", "password-reset", "high-priority"],
metadata: {
priority: "high",
source: "web-chat"
}
});

Start with basic functional tags to categorize your traces. Include priority levels and main feature areas for easy filtering and analysis.

Tag Usage

Python SDK

async with sdk.trace(
agentId="content-generator",
input={"topic": "AI documentation"},
userId="writer-123",
tags=["content", "documentation", "ai", "high-priority"],
metadata={
"department": "marketing",
"deadline": "2024-01-30"
}
) as trace:
# Your agent logic here
pass

Vercel AI SDK

const result = await generateText({
model: openai("gpt-4o-mini"),
prompt: "Write a product description",
experimental_telemetry: {
isEnabled: true,
metadata: {
agentId: "product-writer",
userId: "marketing-team",
tags: ["marketing", "product", "content", "ecommerce"],
},
},
});

VoltAgent Framework

const agent = new Agent({
name: "Code Review Assistant",
instructions: "Review code for best practices",
tags: ["code-review", "development", "quality-assurance", "automated"],
userId: "dev-123",
});

await agent.run("Review this React component");

Table of Contents