Install
Async jobs and polling
Use shouldInstrument to wait until the response contains an outcome the agent can evaluate:
The default cacheMode: "safe" skips explicitly shared-cacheable responses instead of overwriting their
cache policy. Use cacheMode: "request" when only callers sending Agent-Feedback-Request: 1 should be
instrumented, or cacheMode: "private" when every included response is already private.
Server-rendered HTML
Include your server HTML path. JSON objects receive _agentFeedback; HTML receives an embedded machine
contract; arrays and scalars use headers.
Verify
Keep the plugin global and narrow include to product surfaces that customer agents actually use.
View the runnable Fastify example
View the async crawl example