Skip to content

ObserveLLMCompleteContext

Defined in: agent/hooks.ts:195

Context provided when an LLM call completes successfully. Read-only observation point.

finalMessage: string

Defined in: agent/hooks.ts:204

The final message that will be added to history (after interceptors)


finishReason: string | null

Defined in: agent/hooks.ts:198


iteration: number

Defined in: agent/hooks.ts:196


logger: Logger<ILogObj>

Defined in: agent/hooks.ts:205


options: Readonly<LLMGenerationOptions>

Defined in: agent/hooks.ts:197


rawResponse: string

Defined in: agent/hooks.ts:202

The complete raw response text


optional subagentContext: SubagentContext

Defined in: agent/hooks.ts:207

Present when event is from a subagent (undefined for top-level agent)


optional usage: TokenUsage

Defined in: agent/hooks.ts:200

Token usage including cached token counts when available