AgentFinishedEvent
Defined in: packages/protocol/src/lib/agent-wire.ts:412
The end of an Agent Run with its structured outcome.
The agent loop is experimental in 0.3 and may change in any minor release.
Properties
Section titled “Properties”
optionalcode?:string
Defined in: packages/protocol/src/lib/agent-wire.ts:439
Optional machine-readable failure kind with no closed taxonomy, same
meaning as on the error event.
error?
Section titled “error?”
optionalerror?:string
Defined in: packages/protocol/src/lib/agent-wire.ts:434
Human-readable failure description when ok is false.
metrics
Section titled “metrics”metrics:
AgentRunMetrics
Defined in: packages/protocol/src/lib/agent-wire.ts:432
Cost counters for the run.
ok:
boolean
Defined in: packages/protocol/src/lib/agent-wire.ts:423
true when the run ended as intended (completed, waiting), false
for cancelled, budget and error.
reason
Section titled “reason”reason:
"error"|"completed"|"waiting"|"cancelled"|"budget"
Defined in: packages/protocol/src/lib/agent-wire.ts:425
Why the run ended.
reply?
Section titled “reply?”
optionalreply?:string
Defined in: packages/protocol/src/lib/agent-wire.ts:430
Full text of the final reply, or the closing message on a budget ending. Absent when the run failed, was cancelled or ended without text.
runId:
RunId
Defined in: packages/protocol/src/lib/agent-wire.ts:418
The Agent Run that ended.
type:
"finished"
Defined in: packages/protocol/src/lib/agent-wire.ts:414
Member discriminator.
version
Section titled “version”version:
1
Defined in: packages/protocol/src/lib/agent-wire.ts:416
Agent wire version, always AGENT_WIRE_VERSION.