AgentFinishedEvent
Defined in: packages/protocol/src/lib/agent-wire.ts:331
The end of an Agent Run with its structured outcome.
Properties
Section titled “Properties”
optionalcode?:string
Defined in: packages/protocol/src/lib/agent-wire.ts:358
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:353
Human-readable failure description when ok is false.
metrics
Section titled “metrics”metrics:
AgentRunMetrics
Defined in: packages/protocol/src/lib/agent-wire.ts:351
Cost counters for the run.
ok:
boolean
Defined in: packages/protocol/src/lib/agent-wire.ts:342
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:344
Why the run ended.
reply:
string
Defined in: packages/protocol/src/lib/agent-wire.ts:349
Full text of the final reply, empty when the run ended before producing one.
runId:
RunId
Defined in: packages/protocol/src/lib/agent-wire.ts:337
The Agent Run that ended.
type:
"finished"
Defined in: packages/protocol/src/lib/agent-wire.ts:333
Member discriminator.
version
Section titled “version”version:
1
Defined in: packages/protocol/src/lib/agent-wire.ts:335
Agent wire version, always AGENT_WIRE_VERSION.