AgentResultEvent
Defined in: src/hooks/events.ts:647
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:653
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | { agent: LocalAgent; result: AgentResult; invocationState: InvocationState; } |
data.agent | LocalAgent |
data.result | AgentResult |
data.invocationState | InvocationState |
Returns
Section titled “Returns”AgentResultEvent
Overrides
Section titled “Overrides”Properties
Section titled “Properties”readonly type: "agentResultEvent";Defined in: src/hooks/events.ts:648
readonly agent: LocalAgent;Defined in: src/hooks/events.ts:649
result
Section titled “result”readonly result: AgentResult;Defined in: src/hooks/events.ts:650
invocationState
Section titled “invocationState”readonly invocationState: InvocationState;Defined in: src/hooks/events.ts:651
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Pick<AgentResultEvent, "type" | "result">;Defined in: src/hooks/events.ts:664
Serializes for wire transport, excluding the agent reference and invocationState. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Pick<AgentResultEvent, "type" | "result">