Complete a run and get the computed diff
cURL
curl --request POST \ --url https://api.example.com/api/platform/diffRun \ --header 'Content-Type: application/json' \ --data ' { "runId": "<string>" } '
{ "runId": "<string>", "status": "<string>", "diff": {} }
POST /api/platform/diffRun
startRun
curl -X POST https://api.agentdiff.dev/api/platform/diffRun \ -H "X-API-Key: ad_live_sk_..." \ -H "Content-Type: application/json" \ -d '{ "runId": "run-xyz789" }'
"completed"
inserts
updates
deletes
{ "runId": "run-xyz789", "status": "completed", "diff": { "inserts": [ { "__table__": "messages", "message_id": "1732645891.000200", "channel_id": "C01GENERAL99", "user_id": "U01AGENBOT9", "message_text": "Hello World!", "created_at": "2025-11-26T15:31:31" } ], "updates": [ { "__table__": "channels", "before": { "last_message_at": null }, "after": { "last_message_at": "2025-11-26T15:31:31" } } ], "deletes": [] } }
{ "__table__": "messages", "message_id": "...", "channel_id": "...", "message_text": "Hello!" }
{ "__table__": "channels", "before": { "message_count": 5 }, "after": { "message_count": 6 } }
{ "__table__": "messages", "message_id": "1234567890.000100" }
evaluateRun
run_not_found
run_already_completed
diff = client.diff_run(runId=run.runId) print(f"Inserts: {len(diff.diff['inserts'])}") print(f"Updates: {len(diff.diff['updates'])}") print(f"Deletes: {len(diff.diff['deletes'])}") for insert in diff.diff['inserts']: print(f" + [{insert['__table__']}] {insert}")