Skip to main content
GET
/
agents
/
tasks
/
{task_id}
/
graph-diff
Task Graph Diff
curl --request GET \
  --url https://api.example.com/agents/tasks/{task_id}/graph-diff
{
  "task_id": "<string>",
  "resources": [
    {
      "resource_table": "<string>",
      "resource_id": "<string>",
      "net_operation": "create",
      "before": {},
      "after": {},
      "fields_changed": [],
      "mutation_count": 0
    }
  ],
  "total_mutations": 123,
  "total_mutations_scanned": 123,
  "truncated": false,
  "has_more": false
}

Path Parameters

task_id
string
required

Query Parameters

reveal
boolean
default:false

Reveal sensitive field values on before/after snapshots

Response

Successful Response

Top-level graph diff response for a task.

Attributes: task_id: Task SurrealDB record id part. Echoed back so clients can correlate the response with the request. resources: Net delta per affected resource. Ordered by (resource_table, resource_id) for deterministic output. total_mutations: Raw mutation edge count folded into the rollup. When truncated is True this is the cap, not the real total — the real total is not known without a full scan. total_mutations_scanned: Number of mutation edges actually consumed from the database before the rollup was cut off. Equals total_mutations in the common (non-truncated) case. Exposed so clients can surface "5000 mutations scanned" when truncated is True. truncated: True when the task had more mutation edges than the configured cap (settings.MAX_GRAPH_DIFF_MUTATIONS). The rollup is still safe to display but does not reflect every mutation. Clients should direct users to the paginated /mutations endpoint for the full audit trail. has_more: Alias for truncated — kept for clients that use the has-more convention.

task_id
string
required
resources
ResourceNetDelta · object[]
required
total_mutations
integer
required
total_mutations_scanned
integer
required
truncated
boolean
default:false
has_more
boolean
default:false