> For the complete documentation index, see [llms.txt](https://docs.goassay.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goassay.ai/use-tools/zh/jin-jie/manage-agents-apps-and-keys.md).

# 管理智能体、已连接应用与支付密钥

查看智能体的连接，控制哪些应用和密钥能调用工具或付款。

**智能体**是 Assay 用于归组调用和应用规则的身份。**已连接应用**是已登录并使用该智能体的 AI 应用。**支付密钥**是本地应用用于签署支付的独立密钥，只能在你通过钱包批准的权限内使用。断开应用与停止支付密钥是不同的操作。

**API 密钥**让你自己的程序以某个智能体的身份调用工具。你需要将这一秘密凭据复制到程序中；它不是支付密钥，本身不授予支付权限。

## 操作步骤

{% stepper %}
{% step %}

### 找到智能体

打开 **Controls → Agents**。页面标题是 **Agents & keys**。按名称找到智能体，阅读其状态。在 **Keys** 下，每个 **Signed in from** 行代表一个已连接应用；API 密钥也显示在这里。阅读最近使用信息，以及相关行旁的支付密钥状态。

每个账户只有一个智能体，在你首次登录时创建（参阅[创建账户](/use-tools/zh/ru-men/create-your-account.md)）。新的 API 密钥会添加到该智能体，不会创建另一个智能体。

<figure><img src="https://1515942101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ3s1eCyfwYmPV4hcUtOZ%2Fuploads%2Fgit-blob-e72aa8e8e775053dc0fae2d873267792f3ee12b5%2Fmanage-agents-apps-and-keys-1.png?alt=media" alt="已连接应用行，显示 Signed in from 且没有支付密钥"><figcaption><p>查看应用从哪里登录，以及是否有支付密钥。</p></figcaption></figure>
{% endstep %}

{% step %}

### 为智能体起一个便于识别的名称

选择智能体名称旁的 **Rename**。修改名称后选择 **Save**。这只改变显示名称，不会创建新身份，也不会改变连接或限额。

<figure><img src="https://1515942101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ3s1eCyfwYmPV4hcUtOZ%2Fuploads%2Fgit-blob-53f05ae4c2062b1fd44639a61472cb69c41422b1%2Fmanage-agents-apps-and-keys-2.png?alt=media" alt="智能体重命名表单，已标出名称字段和 Save"><figcaption><p>使用在支出和连接视图中容易识别的名称。</p></figcaption></figure>
{% endstep %}

{% step %}

### 断开不再使用的应用

在 **Keys** 下找到应用的 **Signed in from** 行，选择 **Revoke**。确认前核对应用名称。撤销会停止该应用的访问；它必须重新登录才能再次连接。其他应用连接是独立的。

如果应用有有效的支付密钥，出现 **Also stop its payment key on chain** 时请保持选中。按 **Revoke and sign** 或 **Revoke, then stop its key** 操作，完成钱包步骤。只撤销应用访问可能让链上支付权限继续有效。

如果签名失败，或你保留了支付权限，该行会保留 **Stop it**。使用它并完成签名。链上检查失败意味着支付密钥可能仍有效，不能证明付款已关闭。
{% endstep %}

{% step %}

### 停止支付密钥付款

要停止付款但保留免费调用，找到该密钥的 **Stop it paying** 操作。查看仍在结算的付款，再选择 **Sign to stop paying (free)**，完成钱包签名。等待结果，并留意显示的延迟。

支付密钥会失去从余额签署新付款的权限。应用仍可进行免费调用。已发生的调用仍需结算和付款；此操作不会退还之前的调用费用，也不会提取资金。
{% endstep %}

{% step %}

### 让同一个密钥重新付款

权限已过期的密钥选择 **Let it pay again**；没有权限时选择 **Let it pay**。与应用核对密钥指纹，查看支出限额和到期时间，然后完成钱包签名。如果还需提高账户上限，请核对两个请求。

如果应用本身已被撤销，请先按[连接你的 AI 应用](/use-tools/zh/ru-men/connect-your-ai-app.md)重新连接。如果应用还没有支付密钥，请使用[开启付费调用](/use-tools/zh/ru-men/turn-on-paid-calls.md)中的设置链接。托管连接器仍只能免费调用。
{% endstep %}
{% endstepper %}

## 确认是否成功

智能体显示已保存的名称。被撤销的应用不再有有效连接。已停止的支付密钥不再在链上有效；已续期的密钥显示权限和到期时间。出现 **may still be active on chain** 时，在能检查链上状态前都应视为尚未解决。

## 遇到问题时

| 你看到的情况                                | 处理方式                                                            |
| ------------------------------------- | --------------------------------------------------------------- |
| **Payment key still active on chain** | 如果要停止它，使用该行的 **Stop it** 并完成钱包步骤。                               |
| 无法检查支付密钥                              | 稍后重试，不要认为它已关闭。                                                  |
| 付款仍在结算                                | 阅读待处理调用警告，在停止或降低权限前按提示等待。                                       |
| 没有支付密钥，或 **Let it pay** 不可用           | 使用本地应用的付费调用设置链接。仅有 API 密钥无法签署支付。                                |
| 已撤销的应用需要重新连接                          | 按[连接你的 AI 应用](/use-tools/zh/ru-men/connect-your-ai-app.md)重新登录。 |

<details>

<summary>可选：为 My own code 使用 API 密钥</summary>

为自己编写的程序，在智能体的 **Keys** 下使用 **Use an API key instead**；如果已有 API 密钥，则使用 **New key**。输入 **Key name**，选择 **Create key**。

<figure><img src="https://1515942101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ3s1eCyfwYmPV4hcUtOZ%2Fuploads%2Fgit-blob-3c18b5c31059cbaa6524e92cd85b54b3952374a9%2Fmanage-agents-apps-and-keys-3.png?alt=media" alt="Create key 侧栏，已标出 Key name 和 Create key"><figcaption><p>按使用它的程序或机器为密钥命名。</p></figcaption></figure>

立即复制完整密钥并安全保存。密钥**只显示一次**，Assay 无法再次显示。如果丢失，请创建替代密钥并撤销旧密钥。使用[连接你的 AI 应用](/use-tools/zh/ru-men/connect-your-ai-app.md)中 **My own code** 的连接信息。要使用付费工具，程序还需要签署支付。

要撤销密钥，在 **Keys** 下找到对应 API 密钥行，选择 **Revoke** 并核对确认内容。如果有有效支付权限，还需完成独立的链上停止操作。新建 API 密钥不会取消旧密钥。

<figure><img src="https://1515942101-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ3s1eCyfwYmPV4hcUtOZ%2Fuploads%2Fgit-blob-bec85c222f8fce86b843ea39f62b5149cfe4ad5a%2Fmanage-agents-apps-and-keys-4.png?alt=media" alt="Revoke Reporting script 确认窗口，已标出 Revoke"><figcaption><p>撤销前核对密钥名称。此示例已取消。</p></figcaption></figure>

</details>

## 进一步了解

* [设置限额与规则](/use-tools/zh/jin-jie/set-limits-and-rules.md)
* [管理提醒与查看账户记录](/use-tools/zh/ri-chang-shi-yong/alerts-and-account-history.md)

## 下一步

* [提现](/use-tools/zh/guan-li-zhang-hu/withdraw-funds.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.goassay.ai/use-tools/zh/jin-jie/manage-agents-apps-and-keys.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
