Skip to content

Get Delegation Chain Tree

GET
/api/v1/accountability/delegations/{task_id}/chain
curl --request GET \
--url https://api.ultimateteam.ai/api/v1/accountability/delegations/example/chain \
--header 'X-API-Key: <X-API-Key>'

Get the full delegation chain tree for a task.

Returns a nested tree showing who delegated to whom, with timestamps and depth at each node.

Args: task_id: The root task ID to build the tree from. user: The authenticated user context. svc: The delegation chain service (injected).

Returns: The delegation chain tree.

Raises: HTTPException: 404 if no delegation chain found for this task.

task_id
required
Task Id
string

Successful Response

Media typeapplication/json
DelegationChainTree

Complete delegation chain tree from a root task.

Attributes: root: The root node of the delegation tree. total_depth: Maximum depth in the tree. total_nodes: Total number of nodes in the tree.

object
root
required
DelegationChainNode

A single node in a delegation chain tree.

Attributes: task_id: The task identifier for this node. agent_role: The agent that owns/executes this task. status: Current task status. request_summary: What was requested of this agent. response_summary: What was delivered (None if pending). depth: Depth in the chain tree (root = 1). created_at: When the delegation was created. completed_at: When the delegation completed or failed. children: Child nodes in the delegation tree.

object
agent_role
required
Agent Role
string
children
Array<object> recursive
completed_at
required
Any of:
string format: date-time
created_at
required
Created At
string format: date-time
depth
required
Depth
integer
request_summary
required
Request Summary
string
response_summary
required
Any of:
string
status
required
Status
string
task_id
required
Task Id
string
total_depth
required
Total Depth
integer
total_nodes
required
Total Nodes
integer
Examplegenerated
{
"root": {
"agent_role": "example",
"children": [],
"completed_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z",
"depth": 1,
"request_summary": "example",
"response_summary": "example",
"status": "example",
"task_id": "example"
},
"total_depth": 1,
"total_nodes": 1
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}