ObserveLLMCompleteContext
Defined in: agent/hooks.ts:195
Context provided when an LLM call completes successfully. Read-only observation point.
Properties
Section titled “Properties”finalMessage
Section titled “finalMessage”finalMessage:
string
Defined in: agent/hooks.ts:204
The final message that will be added to history (after interceptors)
finishReason
Section titled “finishReason”finishReason:
string|null
Defined in: agent/hooks.ts:198
iteration
Section titled “iteration”iteration:
number
Defined in: agent/hooks.ts:196
logger
Section titled “logger”logger:
Logger<ILogObj>
Defined in: agent/hooks.ts:205
options
Section titled “options”options:
Readonly<LLMGenerationOptions>
Defined in: agent/hooks.ts:197
rawResponse
Section titled “rawResponse”rawResponse:
string
Defined in: agent/hooks.ts:202
The complete raw response text
subagentContext?
Section titled “subagentContext?”
optionalsubagentContext:SubagentContext
Defined in: agent/hooks.ts:207
Present when event is from a subagent (undefined for top-level agent)
usage?
Section titled “usage?”
optionalusage:TokenUsage
Defined in: agent/hooks.ts:200
Token usage including cached token counts when available