processStream(). Supports content chunks, thinking/reasoning, tool calls, and memory persistence.
Basic Streaming
Chunk Types
Your stream can receive different chunk types:| Type | Description | Data |
|---|---|---|
content | Text response from the model | { content: string, done: boolean } |
thinking | Reasoning/thinking content | { content: string, done: boolean } |
internal_process | Tool call start/complete, memory load/save | { processType, status, process } |
done | Stream complete | { message, metadata } |
error | Error occurred | { error: string } |
Streaming with Thinking
Whenthinking is enabled, reasoning content arrives as separate chunks before the final response:
Streaming with Tool Calls
Tool calls are reported asinternal_process chunks. The agent handles the tool loop automatically:
Streaming with Memory
Memory is automatically loaded before and saved after streaming:LLM Standalone Streaming
Direct LLM streaming without agents:Testing in Prompt Studio
You can test streaming behavior directly in the Portal’s Prompt Studio:- Open Prompts and select or create a prompt
- Click the config icon and enable Thinking
- Send a message — you’ll see the thinking content appear as a collapsible block above the response
Next Steps
Reasoning
Extended thinking for complex tasks
Memory
Conversation persistence