Diff an agent version against another version or live state
Return the field-level diff of version {vid} against a comparison side resolved from ?against: prev (default — the chronologically next-lower version), live (the agent’s current post-promotion config), or another version id on the same agent. Each of the nine versioned fields (system_prompt, model, temperature, max_tokens, tools, knowledge_base_ids, safety_config, config, max_cost_per_conversation_cents) reports before, after, and changed, plus changed_count; a first-version source returns an all-unchanged diff with against: null instead of 404. Use it to power the review-and-confirm view before a promote. 404 when the agent, version, or explicit comparison version does not exist. Read-only.
Authorizations
Dashboard JWT token from Clerk
Headers
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.
true, false Response
Successful response.