Interface: SubagentEndEvent
@providerprotocol/agents / index / SubagentEndEvent
Interface: SubagentEndEvent
Section titled “Interface: SubagentEndEvent”Defined in: src/execution/types.ts:616
Event emitted when a sub-agent completes execution.
Contains success/failure status, the result or error message, tool executions performed, and token usage statistics.
Extends
Section titled “Extends”Properties
Section titled “Properties”error?
Section titled “error?”
optionalerror:string
Defined in: src/execution/types.ts:624
Error message (if failed)
parentToolCallId
Section titled “parentToolCallId”parentToolCallId:
string
Defined in: src/execution/types.ts:579
The parent tool call ID that spawned this sub-agent
Inherited from
Section titled “Inherited from”SubagentEventBase.parentToolCallId
result?
Section titled “result?”
optionalresult:string
Defined in: src/execution/types.ts:622
Sub-agent’s response text (if successful)
subagentId
Section titled “subagentId”subagentId:
string
Defined in: src/execution/types.ts:575
Unique ID of the sub-agent instance
Inherited from
Section titled “Inherited from”subagentType
Section titled “subagentType”subagentType:
string
Defined in: src/execution/types.ts:577
Type/name of the sub-agent (e.g., ‘explorer’, ‘planner’)
Inherited from
Section titled “Inherited from”SubagentEventBase.subagentType
success
Section titled “success”success:
boolean
Defined in: src/execution/types.ts:620
Whether the sub-agent completed successfully
timestamp
Section titled “timestamp”timestamp:
number
Defined in: src/execution/types.ts:626
End timestamp in milliseconds since epoch
toolExecutions?
Section titled “toolExecutions?”
optionaltoolExecutions:object[]
Defined in: src/execution/types.ts:628
Tools used by the sub-agent during execution
arguments
Section titled “arguments”arguments:
Record<string,unknown>
result
Section titled “result”result:
string
toolName
Section titled “toolName”toolName:
string
type:
"subagent_end"
Defined in: src/execution/types.ts:618
Event type discriminator
usage?
Section titled “usage?”
optionalusage:TokenUsage
Defined in: src/execution/types.ts:634
Token usage for this sub-agent run