You can add tags when initializing AgentOps, whicreh is the most common approach:
Copy
import agentops# Initialize AgentOps with tagsagentops.init( api_key="YOUR_API_KEY", default_tags=["production", "customer-service", "gpt-4"])
Alternatively, when using manual trace creation:
Copy
# Initialize without auto-starting a sessionagentops.init(api_key="YOUR_API_KEY", auto_start_session=False)# Later start a trace with specific tags (modern approach)trace = agentops.start_trace(trace_name="test_workflow", default_tags=["development", "testing", "claude-3"])
Legacy approach using agentops.start_session(default_tags=["development", "testing", "claude-3"]) is deprecated and will be removed in v4.0. Use agentops.start_trace() instead.