Interface: SubagentExecutionTrace
@providerprotocol/agents / index / SubagentExecutionTrace
Interface: SubagentExecutionTrace
Section titled “Interface: SubagentExecutionTrace”Defined in: src/state/types.ts:75
Sub-agent execution trace for checkpoint persistence and observability.
Records the complete execution history of a sub-agent spawned by the parent agent, including the task, timing, outcome, and all tool invocations. This enables hierarchical agent debugging and audit trails.
Remarks
Section titled “Remarks”Conforms to UAP specification Section 8.8 for sub-agent execution tracing.
Example
Section titled “Example”const trace: SubagentExecutionTrace = { subagentId: 'sub-abc123', subagentType: 'research-agent', parentToolCallId: 'call-xyz789', prompt: 'Find information about quantum computing', startTime: Date.now(), endTime: Date.now() + 5000, success: true, result: 'Quantum computing uses qubits...', toolExecutions: [ { toolName: 'web_search', arguments: { query: 'quantum computing' }, result: '...' } ], usage: { inputTokens: 100, outputTokens: 200, totalTokens: 300 }};ToolExecutionTrace for individual tool execution records
Properties
Section titled “Properties”endTime
Section titled “endTime”endTime:
number
Defined in: src/state/types.ts:92
Execution end timestamp in milliseconds since Unix epoch
error?
Section titled “error?”
optionalerror:string
Defined in: src/state/types.ts:101
Error message describing what went wrong (present when success is false)
parentToolCallId
Section titled “parentToolCallId”parentToolCallId:
string
Defined in: src/state/types.ts:83
Tool call ID from the parent agent that spawned this sub-agent
prompt
Section titled “prompt”prompt:
string
Defined in: src/state/types.ts:86
The task or prompt given to the sub-agent
result?
Section titled “result?”
optionalresult:string
Defined in: src/state/types.ts:98
The sub-agent’s final response (present when success is true)
startTime
Section titled “startTime”startTime:
number
Defined in: src/state/types.ts:89
Execution start timestamp in milliseconds since Unix epoch
subagentId
Section titled “subagentId”subagentId:
string
Defined in: src/state/types.ts:77
Unique identifier for this sub-agent instance
subagentType
Section titled “subagentType”subagentType:
string
Defined in: src/state/types.ts:80
Type or name identifying the sub-agent’s role or capabilities
success
Section titled “success”success:
boolean
Defined in: src/state/types.ts:95
Whether the sub-agent completed its task successfully
toolExecutions?
Section titled “toolExecutions?”
optionaltoolExecutions:ToolExecutionTrace[]
Defined in: src/state/types.ts:104
Ordered list of tool executions performed by the sub-agent
usage?
Section titled “usage?”
optionalusage:TokenUsage
Defined in: src/state/types.ts:107
Token usage statistics for the sub-agent’s LLM calls