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

# 设计自主 API 采购工作流

> 让智能体在严格的美元预算护栏内自主发现端点、查询报价并执行调用。

## 面临的问题

自主智能体需要动态调用付费工具，但不受限制的 API 访问可能带来意外超支风险。

## 工作流架构

1. **免费发现：** 智能体在 `https://mcp.xroute.ai/mcp` 上零成本运行 `search` 和 `get_details`。
2. **批量询价：** 智能体使用计划执行的操作调用 `batch_quote`，获取精确单价与 `auto_execute_eligible` 状态。
3. **预算门控：**
   * 如果总费用低于该密钥的自动执行限额，智能体立即继续执行。
   * 否则，智能体暂停并请求用户批准精确的美元预算。
4. **执行与结算：** 智能体运行 `execute`（或通过 HTTP 402 MPP 结算）并记录实际结算费用。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.