> ## 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.

# Async Agent

## Code

```python cookbook/models/vllm/async_basic.py theme={null}
import asyncio

from agno.agent import Agent
from agno.models.vllm import vLLM

agent = Agent(model=vLLM(id="Qwen/Qwen2.5-7B-Instruct"), markdown=True)
asyncio.run(agent.aprint_response("写一个两句话的恐怖故事"))
```

## Usage

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

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

  <Step title="启动 vLLM 服务器">
    ```bash theme={null}
    vllm serve Qwen/Qwen2.5-7B-Instruct \
        --enable-auto-tool-choice \
        --tool-call-parser hermes \
        --dtype float16 \
        --max-model-len 8192 \
        --gpu-memory-utilization 0.9
    ```
  </Step>

  <Step title="运行 Agent">
    ```bash theme={null}
    python cookbook/models/vllm/async_basic.py
    ```
  </Step>
</Steps>
