stream • AI Agent SDK
stream: Stream a prompt response as text chunks.
stream
Async
Method
</div>
This is a method of the ManagedBackendProtocol class in the protocols module.
Stream a prompt response as text chunks.
Yields text fragments as the managed agent produces them. Used when Agent is invoked with stream=True.
Signature
async def stream(prompt: str) -> AsyncIterator[str]Parameters
ParamField
strThe user message. **kwargs: Provider-specific options. Text chunks from the agent’s response.
Returns
ResponseField
AsyncIterator[str]The result of the operation.
Source
View on GitHubpraisonaiagents/agent/protocols.py at line 382