The hosted service: keys, dashboard and self-hosting
With an API key, the same spans go to AgentOps' dashboard, where traces are listed, drawn as trees and timelines, and costs added up. It can also be self-hosted.
import agentops
agentops.init(api_key="YOUR_AGENTOPS_KEY", default_tags=["production"])Remove the endpoints, pass the key or set AGENTOPS_API_KEY, and init exchanges the key for a token that the exporter adds to every request. The course never does this: each run would send your traces to an account, and the dashboard's views could not be checked here.
- Session list: traces, filterable by tags and end state.
- Tree and timeline: the spans you printed with
tree, with durations. - Messages: LLM prompts and completions, unless content tracing is off.
- Costs: token costs from LLM spans plus tool costs.
Keeping data in your own infrastructure
AgentOps' backend is open source and documented for Docker. With a self-hosted backend, endpoint and exporter_endpoint point at your servers, which is the same change this course makes. Because the SDK speaks OpenTelemetry, exporter_endpoint can also point at any OTLP collector your customer already runs.
- Read
AuthenticatedOTLPExporterand find the header it adds. - List what you would have to check with a customer's security team before turning the hosted service on.
- Find the Docker instructions in AgentOps' self-hosting documentation.
This is what real progress feels like.