ObserveChunkContext
Defined in: agent/hooks.ts:285
Context provided for each stream chunk. Read-only observation point.
Properties
Section titled “Properties”accumulatedText
Section titled “accumulatedText”accumulatedText:
string
Defined in: agent/hooks.ts:290
Accumulated text so far
iteration
Section titled “iteration”iteration:
number
Defined in: agent/hooks.ts:286
logger
Section titled “logger”logger:
Logger<ILogObj>
Defined in: agent/hooks.ts:293
rawChunk
Section titled “rawChunk”rawChunk:
string
Defined in: agent/hooks.ts:288
The raw chunk from the LLM
subagentContext?
Section titled “subagentContext?”
optionalsubagentContext:SubagentContext
Defined in: agent/hooks.ts:295
Present when event is from a subagent (undefined for top-level agent)
usage?
Section titled “usage?”
optionalusage:TokenUsage
Defined in: agent/hooks.ts:292
Token usage if available (providers send usage at stream start/end)