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

# Agno

> 在 Agno 智能体中使用 TokenLab 模型

## 概述

Agno 可以将 TokenLab 作为 OpenAI 兼容的模型提供商，用于智能体和工作流。

<Note>
  **类型**: 智能体框架

  **主要路径**: OpenAI 兼容的聊天补全 (chat completions)

  **支持置信度**: 已支持路径
</Note>

## 环境配置

```bash theme={null}
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## TokenLab 模型包装器

如果你的 Agno 版本包含 TokenLab 模型包装器：

```python theme={null}
from agno.agent import Agent
from agno.models.tokenlab import TokenLab

agent = Agent(model=TokenLab(id="gpt-5.4-mini"))
agent.print_response("Give me a concise project risk checklist.")
```

部分 Agno 构建版本也支持模型字符串：

```python theme={null}
agent = Agent(model="tokenlab:gpt-5.4-mini")
```

## OpenAI 兼容回退方案

如果你的版本尚未包含 TokenLab，请使用 Agno 的 OpenAI 兼容模型路径，配置如下：

* Base URL: `https://api.tokenlab.sh/v1`
* API key: `TOKENLAB_API_KEY`
* Model: `gpt-5.4-mini`

## 模型建议

对于默认智能体，请使用 `gpt-5.4-mini`；对于更深度的推理，请使用 `gpt-5.4` 或 `claude-sonnet-5`；对于更快的循环处理，请使用 `deepseek-v4-flash`。
