import { MCPAgent, MCPClient } from 'mcp-use'
const agent = new MCPAgent({
llm,
client,
maxSteps: 30
})
// Set metadata that will be attached to all traces
agent.setMetadata({
agent_id: 'customer-support-agent-01',
version: 'v2.0.0',
environment: 'production',
customer_id: 'cust_12345'
})
// Set tags for filtering and grouping
agent.setTags(['customer-support', 'high-priority', 'beta-feature'])
// Run your agent - metadata and tags are automatically included
const result = await agent.run("Process customer request")