SQLRooms

@sqlrooms/ai / processAgentStream

Function: processAgentStream()

processAgentStream(agentResult, store, parentToolCallId, abortSignal?): Promise<string>

Processes an agent stream result, consuming chunks and returning the final text.

Parameters

ParameterTypeDescription
agentResultAgentStreamResultThe stream result from agent.stream()
storeAgentStreamStoreThe store (used to resolve the owning session)
parentToolCallIdstringThe tool call ID of the parent agent tool
abortSignal?AbortSignalOptional abort signal for cancellation

Returns

Promise<string>

The final text output from the agent