Skip to main content

Install

Configure once

The authentication wrapper is intentionally outermost so it establishes the verified account or user and product-owned visitor/journey context before Epode resolves the extractors. Never populate those values from names, emails, prompts, caller fields, or agent arguments. Register AgentFeedbackFlask immediately after creating the app, before other app-wide after_request handlers. It registers one response hook and wraps app.wsgi_app. Through Flask’s public response API, it marks only non-streamed, non-passthrough response sequences whose bodies are already materialized. JSON objects receive _agentFeedback, HTML receives embedded machine-readable JSON, and arrays or scalar JSON use the Agent-Feedback response header. The generic AgentFeedbackWSGI adapter remains available for Django WSGI, Bottle, Pyramid, and custom WSGI applications. It inspects only exact built-in list and tuple bodies whose declared size is at most 1 MiB and matches their materialized bytes. Custom iterables and generators, including ones with a known length, retain their identity, laziness, first-byte timing, and close(). Lazy start_response(..., exc_info) calls are delegated to the WSGI server so its replacement and re-raise rules remain intact. With cache_mode="request", only callers sending Agent-Feedback-Request: 1 receive a contract. The middleware adds Vary: Agent-Feedback-Request to ordinary and opted-in responses so a shared cache cannot hide the opted-in request. Eligible finite 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.

Server-rendered HTML

Included finite HTML pages receive the same machine-readable contract as the other adapters, and Epode recalculates Content-Length. Streaming or unknown-size HTML remains byte-for-byte untouched.

Verify

Decode the base64url header only in a trusted agent runtime. Do not expose or reuse the company product key.

Customer-agent coverage

Your WSGI middleware creates the response-header 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 WSGI example