Quickstart
Install the package, initialize the agent, and make the first proxied model call.
Proxy Helpers
Review the key flow and patched-client behavior.
Runtime Events
Review the event methods before composing hybrid flows.
Hybrid tracing
- Sync
- Async
Prompt caching-aware usage
cacheReadTokens for tokens served from cache and cacheCreationTokens for tokens written into cache when your runtime exposes those values.
Self-hosted overrides
Event IDs you should understand
Common mistakes
- Calling
trace()methods without stabletrace_idvalues across the same workflow. - Mixing manual
llm_response()events with proxied model responses for the same model turn when you only wanted one representation. - Forgetting to reuse
span_idacross tool request and response events. - Overriding URLs request-by-request instead of setting
proxy_base_urlandanalyse_base_urlonce on theWhyOpsclient.