The Go SDK is optimized for backend services that want strongly typed runtime telemetry plus a reusable transport for provider requests. This page is the basic setup path.Documentation Index
Fetch the complete documentation index at: https://whyops.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Proxy Transport
Read this next if you want OpenAI or Anthropic traffic to go through WhyOps using
ProxyHTTPClient().Runtime Events
Add tool spans, prompt-caching usage, hybrid patterns, and self-hosted settings.
SDK Overview
Compare Go with the TypeScript and Python packages.
Before you start
| You need | Why |
|---|---|
WHYOPS_API_KEY | Authenticates agent init, manual events, and proxied model traffic to WhyOps |
A stable AgentName | Keeps proxy traffic and runtime events attached to the same agent identity |
AgentMetadata with SystemPrompt | Lets WhyOps version the agent and show the correct configuration in the UI |
| Your provider key in the WhyOps dashboard | Lets WhyOps authenticate upstream when it forwards OpenAI or Anthropic traffic |
1. Install the module
- go get
- Module path
2. Create the WhyOps client once
If the agent has tools, include them in
AgentMetadata.Tools. If it has no tools, using an empty slice keeps the registered definition unambiguous.3. Initialize the agent during startup
4. Send your first runtime event
- User message
- LLM response
5. Move to proxy transport or richer runtime tracing
Go SDK Proxy Transport
Learn the Go-specific proxy flow:
ProxyHTTPClient() injects headers only, so your provider client must still point at the WhyOps proxy host.Go SDK Runtime Events
Add tool spans, prompt-caching usage, hybrid patterns, self-hosted overrides, and a full method map.