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

# 命令行身份验证

如果您运行 `ag auth` 并遇到错误：`CLI authentication failed` 或您的 CLI 卡在

```
Waiting for a response from browser...
```

这意味着您的 CLI 无法在 [app.agno.com](https://app.agno.com) 上与您的 Agno 账户进行身份验证。

最快的解决方法是导出您的 `AGNO_API_KEY` 环境变量。您可以通过运行以下命令来实现：

```bash theme={null}
export AGNO_API_KEY=<your_api_key>
```

您可以在 [app.agno.com](https://app.agno.com/settings) 的侧边栏中找到您的 API 密钥，在 `API Key` 下。

<img src="https://mintcdn.com/ikun/QKpfPChraOG28GfC/images/cli-faq.png?fit=max&auto=format&n=QKpfPChraOG28GfC&q=85&s=142d7b0170b9269796ebde08ff73ac5e" alt="agno-api-key" width={600} data-path="images/cli-faq.png" />

CLI 身份验证失败的原因：

* 某些浏览器（如 Safari 和 Brave）会阻止连接到 localhost 域。Chrome 等浏览器与 `ag setup` 配合得很好。
