> ## 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/agent_concepts/async/basic.py theme={null}
import asyncio

from agno.agent import Agent
from agno.models.openai import OpenAIChat

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    description="You help people with their health and fitness goals.",
    instructions=["Recipes should be under 5 ingredients"],
    markdown=True,
)
# -*- 将响应打印到命令行
asyncio.run(agent.aprint_response("Share a breakfast recipe.", stream=True))
```

## 用法

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

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

  <Step title="运行 Agent">
    <CodeGroup>
      ```bash Mac theme={null}
      python cookbook/agent_concepts/async/basic.py
      ```

      ```bash Windows theme={null}
      python cookbook/agent_concepts/async/basic.py
      ```
    </CodeGroup>
  </Step>
</Steps>
