Skip to content

Get Delegation Chain Tree

GET
/api/v1/accountability/delegations/{task_id}/chain

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.

Authorizations

Parameters

Path Parameters

task_id
required
string

Responses

200

Successful Response

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

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
string
children
Array<object> recursive
completed_at
required
Any of:
string format: date-time
created_at
required
string format: date-time
depth
required
integer
request_summary
required
string
response_summary
required
Any of:
string
status
required
string
task_id
required
string
total_depth
required
integer
total_nodes
required
integer

422

Validation Error

object
detail
Array<object>
object
ctx
object
input
loc
required
Array
msg
required
string
type
required
string