Interface GenerationHookResult

Context available to post-generation hooks. Hooks may return a modified copy to transform the generation output.

interface GenerationHookResult {
    text: string;
    toolCalls: ToolCallRecord[];
    usage: TokenUsage;
    step: number;
}

Properties

text: string

Generated text from the LLM.

toolCalls: ToolCallRecord[]

Tool calls requested by the LLM.

usage: TokenUsage

Token usage for this step.

step: number

Current agentic step index (0-based).