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

python
async def stream(prompt: str) -> AsyncIterator[str]

Parameters

ParamField str

The 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 GitHub

praisonaiagents/agent/protocols.py at line 382