> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Iter Stream • AI Agent SDK

> iter_stream: Stream agent response as an iterator of chunks.

# iter\_stream

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Agent**](../classes/Agent) class in the [**agent**](../modules/agent) module.

Stream agent response as an iterator of chunks.

App-friendly streaming. Yields response chunks without terminal display.
Use this for building custom UIs or processing streams programmatically.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def iter_stream(prompt: str) -> Any
```

## Parameters

<ParamField query="prompt" type="str" required={true}>
  The input prompt to process \*\*kwargs: Additional arguments: - display (bool): Show terminal output. Default: False - output (str): Output preset override
</ParamField>

### Returns

<ResponseField name="Returns" type="Any">
  The result of the operation.
</ResponseField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
agent = Agent(instructions="You are helpful")

    # Process stream programmatically
    full_response = ""
    for chunk in agent.iter_stream("Tell me a story"):
        full_response += chunk
        # Custom processing here

    # Or collect all at once
    response = "".join(agent.iter_stream("Hello"))
```

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/agent.py#L6368">
  `praisonaiagents/agent/agent.py` at line 6368
</Card>
