Install
Configure once
Wrap the completed ASGI app, then put your product authentication/tenant middleware outside Epode so it executes first. Identity extractors are synchronous accessors over verified or product-owned state, not authentication hooks:account_id and user_id must come from verified authentication; first_party_visitor_id must be a stable
product-owned pre-login reference. journey_id must come from server/product state that already proves
continuity. Never populate any of them from a name, email, prompt, raw header, query/body value, or agent argument.
Server-rendered HTML
The same wrapper injects the machine-readable contract into finite HTML responses on included routes. JSON objects retain their existing shape and add_agentFeedback.
Route patterns and caching
Ininclude/exclude patterns, * matches one path segment and ** matches any depth. cache_mode
mirrors the Node SDK: the default "safe" skips responses that declare a shared cache policy, "private"
replaces shared caching with private, no-store deliberately, and "request" instruments only requests
that opt in with the Agent-Feedback-Request: 1 header. Request mode adds
Vary: Agent-Feedback-Request so shared caches keep ordinary and opted-in responses 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.