Skip to main content

Install

This immutable hosted archive is the bootstrap path until the public Go module tag is available. The local replace keeps installation reproducible without depending on the Go proxy. The versioned .epode directory prevents files removed by a later SDK release from surviving an upgrade without invoking Go’s special vendor/ mode.

Configure once

Authentication must wrap and execute before Epode. Go middleware cannot observe a context created by an inner handler with r.WithContext, so never place the feedback middleware outside authentication. Account and user references must come from verified auth; the anonymous reference must be a product-owned first-party visitor ID. A session reference is safe only when server/product state already proves the journey. Never read these values from names, emails, prompts, caller fields, or agent arguments.

Server-rendered HTML

Finite HTML bodies on included routes receive the embedded contract. Responses larger than the capture limit, streams detected through Flush, and unsafe bodies pass through byte-for-byte. The default capture limit is 1 MiB. Set MaxResponseBodyBytes to another positive value when needed.

Route patterns and caching

In Include/Exclude patterns, * matches exactly one path segment and ** matches any depth (/docs/* matches /docs/guide but not /docs/deep/nested/page; use /docs/** for the latter). CacheMode controls how instrumentation interacts with HTTP caching. The default CacheSafe skips responses that declare a shared cache policy (public, max-age, s-maxage, immutable). Use CachePrivate only when replacing shared caching with private, no-store is intentional, or CacheRequest to instrument only requests that opt in with the Agent-Feedback-Request: 1 header. Request mode adds Vary: Agent-Feedback-Request to both variants so shared caches keep them separate. Eligible ordinary 2xx GET and HEAD responses also advertise a same-path-and-query Link for one authenticated Companion refetch; redirects and non-safe methods never advertise it.

Verify

Send one API and one HTML request, then confirm the response contract and the Setup telemetry status. Call Shutdown during graceful server shutdown so queued telemetry can flush.

Customer-agent coverage

Your Go middleware creates the HTTP/HTML feedback contract; it cannot make an independent customer agent act on it. For reliable Codex and Claude Code handling, customers install Epode Companion once for all Epode-instrumented products. This is a user-side plugin, not another company package or product key. View the runnable Go example