AgentResultEvent
Defined in: src/hooks/events.ts:726
Event triggered as the final event in the agent stream. Wraps the agent result containing the stop reason and last message.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AgentResultEvent(data): AgentResultEvent;Defined in: src/hooks/events.ts:732
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; result: AgentResult; invocationState: InvocationState; } & HookableEventData |
Returns
Section titled “Returns”AgentResultEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”invocationContext?
Section titled “invocationContext?”readonly invocationContext?: InvocationContext;Defined in: src/hooks/events.ts:100
The request this event belongs to (undefined outside one); pass it to InvokeOptions.invocationContext to join it.
Inherited from
Section titled “Inherited from”HookableEvent.invocationContext
readonly type: "agentResultEvent";Defined in: src/hooks/events.ts:727
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:728
result
Section titled “result”readonly result: AgentResult;Defined in: src/hooks/events.ts:729
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:730
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<AgentResultEvent, "type" | "result">;Defined in: src/hooks/events.ts:743
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<AgentResultEvent, "type" | "result">