Documentation Index
Fetch the complete documentation index at: https://ai.aidalinfo.fr/llms.txt
Use this file to discover all available pages before exploring further.
agent.stream returns an async iterable that emits tokens while exposing promises to retrieve the final state.
Key properties
textStream–AsyncIterable<string>with generated tokens.fullStream– complete stream (text, reasoning, tool calls, errors).text,response,usage,steps– promises that resolve once the stream completes.loopTool– boolean flag set when the tool loop runs.toAIStreamResponse()/toDataStreamResponse()– pipe the stream into HTTP responses (Next.js, Remix, …).
Conversational streaming
Structured outputs while streaming
Combineagent.stream with structuredOutput to receive partial fragments during the stream and the validated object at the end.
experimental_partialOutputStream emits schema-compliant fragments. Cache the last one for a provisional UI, then call parseOutput to obtain the final typed object.
Structured streaming is experimental—plan retries when parsing fails.