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

# 流式代理

## 代码

```python cookbook/models/nebius/basic_stream.py theme={null}
from agno.agent import Agent
from agno.models.nebius import Nebius

agent = Agent(
    model=Nebius(),
    show_tool_calls=True,
    markdown=True,
    debug_mode=True,
)

# 在终端打印响应
agent.print_response("写一个两句话的恐怖故事", stream=True)
```

## 用法

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="设置你的 API 密钥">
    ```bash theme={null}
    export NEBIUS_API_KEY=xxx
    ```
  </Step>

  <Step title="安装库">
    ```bash theme={null}
    pip install -U openai agno
    ```
  </Step>

  <Step title="运行代理">
    <CodeGroup>
      ```bash Mac theme={null}
      python cookbook/models/nebius/basic_stream.py
      ```

      ```bash Windows theme={null}
      python cookbook/models/nebius/basic_stream.py
      ```
    </CodeGroup>
  </Step>
</Steps>
