diff --git a/docs/docs.json b/docs/docs.json index 43ce46a32..8c4ae1ad4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -92,7 +92,7 @@ }, { "group": "AI", - "pages": ["en/guide/agents", "en/guide/mcp"] + "pages": ["en/guide/agents", "en/guide/mcp", "en/guide/agent-resources"] }, { "group": "Remote development", @@ -322,7 +322,7 @@ }, { "group": "AI", - "pages": ["zh/guide/agents", "zh/guide/mcp"] + "pages": ["zh/guide/agents", "zh/guide/mcp", "zh/guide/agent-resources"] }, { "group": "远程开发", diff --git a/docs/en/guide/agent-resources.mdx b/docs/en/guide/agent-resources.mdx new file mode 100644 index 000000000..ae0e669ac --- /dev/null +++ b/docs/en/guide/agent-resources.mdx @@ -0,0 +1,174 @@ +--- +title: "Agent resources and lifecycle" +description: "How Plugins, Memory, MCP, Tools, and Skills fit together during an OpenIDEA agent task, including what enters the LLM context window." +--- + +An OpenIDEA agent task coordinates five distinct resources: **Plugin**, **Memory**, **MCP**, **Tool**, and **Skill**. Each has a different responsibility, persistence lifetime, and footprint in the LLM context window. + +## Mental model at a glance + +| Resource | What it is | Lives across tasks? | Loaded into the LLM context window? | +| ---------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | +| **Plugin** | Installable capability bundle (an OpenIDEA WASM plugin or an agent CLI plugin) packaging MCP tools and skills | Yes (installed in the host or CLI) | **Never directly.** Plugin code stays outside the prompt; only tool schemas and skill metadata/bodies are exposed. | +| **Memory** | Persistent facts, user preferences, and repository rules (`AGENTS.md`, custom instructions, notes, checkpoints) | Yes | **Yes** — relevant rules and recalled facts are injected at session start or on demand. | +| **MCP** | Model Context Protocol bridge connecting an agent to OpenIDEA or external servers (`tools/list`, `tools/call`) | Server config persists; live connection is per session | **No** — MCP is the transport/registry. Only the **tool definitions** it advertises enter context. | +| **Tool** | Single executable function with a JSON Schema (`view`, `edit`, `bash`, `OpenIDEA-check_files`, `k8s__get_pod_logs`) | Registered per session | **Yes** — tool schema at session start (unless disabled/deferred), plus each call and result per turn. | +| **Skill** | Reusable playbook (`SKILL.md`) teaching the model how to combine tools for a workflow | Yes (on disk) | **Two-stage:** only `name` + short `description` at session start; full `SKILL.md` body **on demand** when invoked. | + +In short: **Plugins** _package_ capabilities, **MCP** _connects_ them, **Tools** _execute_ actions, **Skills** _instruct_ how to orchestrate tools, and **Memory** _remembers_ context and rules across tasks. + +## Architecture and data flow + +```mermaid +flowchart LR + subgraph Host["OpenIDEA Host (Persistent)"] + P["OpenIDEA WASM Plugin
(plugin.toml)"] + IMCP["OpenIDEA Built-in MCP Server
(ide-host/src/mcp)"] + SH["Skills Hub
(SKILL.md registry)"] + P -- "contributes.mcpTools" --> IMCP + P -- "contributes.skills" --> SH + end + + subgraph Ext["Agent CLI Plugin / External (Persistent Config)"] + EP["CLI Plugin (.mcp.json)"] + EMCP["Standalone MCP Server
(process / HTTP)"] + EP -- "bundles / launches" --> EMCP + end + + MEM["Memory
(AGENTS.md, user rules, notes)"] + + subgraph Session["Agent Task Session (LLM Context Window)"] + SYS["System Prompt
(Memory + Skill Index)"] + CAT["Tool Catalog
(Built-in + MCP Tool Schemas)"] + CONV["Conversation Turns
(Active Skill Body + Tool Calls/Results)"] + end + + MEM --> SYS + SH -- "name + description (init)" --> SYS + SH -- "full SKILL.md (on demand)" --> CONV + IMCP -- "tools/list -> schemas" --> CAT + EMCP -- "tools/list -> schemas" --> CAT + CONV -. "tools/call (JSON-RPC)" .-> IMCP + CONV -. "tools/call (JSON-RPC)" .-> EMCP +``` + +## Plugin tools vs. the LLM context window + +It helps to separate **(a) where a plugin tool is registered and executed** from **(b) whether its schema enters the LLM context window**. + +### OpenIDEA WASM plugin (`plugin.toml`) + +- **Registered in OpenIDEA's built-in MCP server:** A plugin declaring `[[contributes.mcpTools]]` registers its tools into OpenIDEA's built-in [MCP server](/en/guide/mcp) under `__` (see [Plugin MCP tools](/en/plugins/guides/mcp)). +- **Enters context indirectly via MCP:** When a task starts, OpenIDEA attaches its built-in `OpenIDEA` MCP server to the session. The agent CLI calls `tools/list` and loads the returned tool names, descriptions, and JSON Schemas into the LLM's tool catalog — unless the `OpenIDEA` MCP server is disabled for that session via `/mcp`, or the agent uses deferred/lazy tool loading. +- **Code stays out of context:** The plugin's WASM binary and source code never enter the prompt. On `tools/call`, OpenIDEA dispatches to the sandboxed plugin host under its granted capabilities and `readOnly` / `destructive` approval rules. + +### Agent CLI plugin bundling `.mcp.json` + +- OpenIDEA plugins (`plugin.toml`) do not spawn standalone MCP server processes; they export WASM tools into OpenIDEA's built-in MCP server. +- **Agent CLI plugins** (for example Copilot CLI plugins with `.mcp.json` or Claude plugins with `mcpServers` in `.claude-plugin/plugin.json`) bundle their own standalone MCP servers. When active or imported under **Settings › Agents › MCP Connections**, the agent connects to that separate MCP server at session start, calls `tools/list`, and injects its tool schemas into the LLM context window in the same way — as a sibling MCP server alongside `OpenIDEA`. + +| Dimension | OpenIDEA WASM plugin (`plugin.toml`) | Agent CLI plugin (`.mcp.json` / `plugin.json`) | +| ----------------------------- | -------------------------------------------------------- | ----------------------------------------------------- | +| **Hosting / registry** | OpenIDEA's built-in MCP server (`ide-host`) | Standalone MCP server process or remote URL | +| **Execution sandbox** | In-process `wasmtime` actor + OpenIDEA capability grants | External process or network service | +| **How schemas reach the LLM** | `tools/list` on `OpenIDEA` MCP server → LLM tool catalog | `tools/list` on bundled MCP server → LLM tool catalog | +| **Code in context window?** | No (only schema + call arguments/result) | No (only schema + call arguments/result) | + +## End-to-end lifecycle walkthrough + +Suppose you have: + +- **Plugin:** A `kubernetes` OpenIDEA plugin that contributes an MCP tool (`k8s__get_pod_logs`) and a skill (`/debug-crashloop`). +- **External MCP:** A GitHub/Slack MCP server configured for your workspace. +- **Memory:** Persistent instructions stating _"staging namespace is `payments-stg`; always rebase onto `origin/main` before pushing."_ + +You start a new agent task and send: + +```text +/debug-crashloop Fix why the payments pod is crashing in staging and open a PR +``` + +```mermaid +sequenceDiagram + autonumber + actor User + participant Host as OpenIDEA Host & Plugins + participant MCP as MCP Servers (Built-in + External) + participant Agent as Agent Runtime (Context Window) + + Note over Host: Phase 1 — Host Startup (before task exists) + Host->>Host: Load kubernetes WASM plugin + Host->>MCP: Register k8s__get_pod_logs in built-in MCP + Host->>Host: Index /debug-crashloop SKILL.md in Skills Hub + + Note over Agent: Phase 2 — Session Initialization + Host->>Agent: Inject Memory (AGENTS.md + user rules) + Host->>Agent: Inject lightweight Skill index (name + description) + Agent->>MCP: Connect & call tools/list + MCP-->>Agent: Return tool JSON schemas -> LLM Tool Catalog + + Note over User,Agent: Phase 3 — Skill Activation (Turn 1) + User->>Agent: /debug-crashloop Fix why payments pod is crashing... + Agent->>Host: Load full debug-crashloop/SKILL.md playbook + Host-->>Agent: Playbook injected into conversation context + + Note over Agent,Host: Phase 4 — Execution Loop (Think -> Tool -> Observe) + Agent->>MCP: tools/call k8s__get_pod_logs(ns="payments-stg") + MCP->>Host: Route to kubernetes WASM plugin (permission check) + Host-->>Agent: Stack trace: BillingService.java:84 + Agent->>Agent: Built-in view + edit patch line 84 + Agent->>MCP: OpenIDEA-check_files + bash tests + MCP-->>Agent: Build & tests pass + Agent->>Agent: Follow Memory rules -> rebase & open PR via gh + + Note over Agent,Host: Phase 5 — Completion & Teardown + Agent->>Host: Save durable Memory updates / checkpoints + Agent-xMCP: Close per-session MCP connections & clear tool catalog +``` + + + + OpenIDEA loads enabled **Plugins** in its sandboxed host. The `kubernetes` plugin registers `k8s__get_pod_logs` in + OpenIDEA's built-in **MCP** server and indexes `debug-crashloop/SKILL.md` in the **Skills** hub. Nothing is in an + LLM context window yet. + + + **Memory** is injected into the system prompt (`AGENTS.md`, user rules, recalled facts). **MCP** clients connect to + enabled servers and call `tools/list`, populating the **Tool** catalog with built-in and MCP tool schemas. + **Skills** contribute only their compact `name` + `description` index, keeping unused playbooks out of the token + budget. + + + Because you invoked `/debug-crashloop` (or the model matched its description in **Auto** mode), the agent loads the + full `debug-crashloop/SKILL.md` playbook into the conversation context, giving the model a structured recipe: *fetch + pod logs → locate stack trace → patch and test → open PR*. + + + Combining the **Skill** recipe with **Memory** (`payments-stg`), the model invokes `k8s__get_pod_logs` over **MCP**. + OpenIDEA routes the call to the sandboxed `kubernetes` **Plugin**, returning `BillingService.java:84`. Built-in + **Tools** (`view`, `edit`) patch the bug, OpenIDEA's **MCP Tool** (`OpenIDEA-check_files`) and `bash` verify + compilation and tests, and **Memory** rules guide rebasing and opening the pull request. + + + **Plugins**, **Memory** (including any newly saved durable facts or checkpoints), and **Skill** files remain on disk + for future tasks. Per-session **MCP** connections close or idle out, the session **Tool** catalog clears, and the + loaded **Skill** body stays scoped to that conversation. + + + +## Related guides + + + + Configure built-in and ACP agents, external MCP servers, and skills in OpenIDEA. + + + Enable OpenIDEA's built-in MCP server and connect IDE or external clients. + + + Contribute sandboxed WASM tools from an OpenIDEA plugin to the built-in MCP server. + + + Declare skills, MCP tools, and capabilities in `plugin.toml`. + + diff --git a/docs/en/guide/agents.mdx b/docs/en/guide/agents.mdx index c78a5522f..8ff55c8f8 100644 --- a/docs/en/guide/agents.mdx +++ b/docs/en/guide/agents.mdx @@ -163,6 +163,8 @@ In the composer, `/skills` (or the **Add Context** menu) opens the per-session p While the agent works, the line under the conversation says what it is doing: thinking, reading, editing, running a command, writing its reply. +For a walkthrough of how **Plugins**, **Memory**, **MCP**, **Tools**, and **Skills** interact across a task's lifecycle—and what enters the LLM context window—see [Agent resources and lifecycle](/en/guide/agent-resources). + ## Add a custom agent Any agent that speaks ACP over stdio can be added with an agent file, `agents/.toml` in OpenIDEA's configuration directory: diff --git a/docs/zh/guide/agent-resources.mdx b/docs/zh/guide/agent-resources.mdx new file mode 100644 index 000000000..88366c1c9 --- /dev/null +++ b/docs/zh/guide/agent-resources.mdx @@ -0,0 +1,171 @@ +--- +title: "智能体资源与生命周期" +description: "了解插件(Plugin)、记忆(Memory)、MCP、工具(Tool)和技能(Skill)在 OpenIDEA 智能体任务中如何协同工作,以及哪些内容会进入 LLM 上下文窗口。" +--- + +在 OpenIDEA 中,一个智能体任务会协同使用五种不同资源:**插件(Plugin)**、**记忆(Memory)**、**MCP**、**工具(Tool)** 和 **技能(Skill)**。它们各自承担不同职责,拥有不同的持久化周期和 LLM 上下文窗口占用方式。 + +## 核心概念一览 + +| 资源 | 定义 | 是否跨任务持久存在? | 是否加载进 LLM 上下文窗口? | +| ------------------ | --------------------------------------------------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------- | +| **插件(Plugin)** | 可安装的能力包(OpenIDEA WASM 插件或智能体 CLI 插件),打包 MCP 工具、技能和/或界面扩展 | 是(安装在宿主或 CLI 中) | **从不直接进入。** 插件代码保留在提示词之外,只暴露其工具 Schema 与技能元数据/正文。 | +| **记忆(Memory)** | 持久化事实、用户偏好与仓库规则(`AGENTS.md`、自定义指令、智能体记忆文件、会话检查点) | 是 | **是** — 相关规则与召回的事实在会话启动时或按需注入系统提示词。 | +| **MCP** | Model Context Protocol 协议桥接层,连接智能体与 IDE 内置或外部服务器(`tools/list`、`tools/call`) | 服务器配置持久保存;连接按会话建立 | **否** — MCP 只是传输与注册通道,只有它声明的**工具定义**会进入上下文。 | +| **工具(Tool)** | 带 JSON Schema 的单个可执行函数(如 `view`、`edit`、`bash`、`OpenIDEA-check_files`、`k8s__get_pod_logs`) | 按会话注册 | **是** — 会话开始时加载工具 Schema(未关闭/未延迟加载时),每轮对话记录调用参数与返回结果。 | +| **技能(Skill)** | 可复用的工作流手册(`SKILL.md`),教模型如何编排组合多个工具完成特定流程 | 是(保存在磁盘上) | **分两阶段:** 启动时仅注入 `name` + 简短 `description`;触发后**按需**加载完整 `SKILL.md` 正文。 | + +一句话总结:**插件**负责*打包*能力,**MCP** 负责*连接*能力,**工具**负责*执行*动作,**技能**负责*指导*工具编排,**记忆**负责跨任务*记住*规则与上下文。 + +## 架构与数据流 + +```mermaid +flowchart LR + subgraph Host["OpenIDEA 宿主(持久化)"] + P["OpenIDEA WASM 插件
(plugin.toml)"] + IMCP["OpenIDEA 内置 MCP 服务器
(ide-host/src/mcp)"] + SH["技能中心 Skills Hub
(SKILL.md 注册表)"] + P -- "contributes.mcpTools" --> IMCP + P -- "contributes.skills" --> SH + end + + subgraph Ext["智能体 CLI 插件 / 外部服务(持久化配置)"] + EP["CLI 插件 (.mcp.json)"] + EMCP["独立 MCP 服务器
(进程 / HTTP)"] + EP -- "内置 / 启动" --> EMCP + end + + MEM["记忆 Memory
(AGENTS.md、用户规则、笔记)"] + + subgraph Session["智能体任务会话(LLM 上下文窗口)"] + SYS["系统提示词
(记忆 + 技能索引)"] + CAT["工具目录
(内置工具 + MCP 工具 Schema)"] + CONV["对话轮次
(已激活技能正文 + 工具调用与结果)"] + end + + MEM --> SYS + SH -- "名称 + 描述(初始化)" --> SYS + SH -- "完整 SKILL.md(按需)" --> CONV + IMCP -- "tools/list -> Schema" --> CAT + EMCP -- "tools/list -> Schema" --> CAT + CONV -. "tools/call (JSON-RPC)" .-> IMCP + CONV -. "tools/call (JSON-RPC)" .-> EMCP +``` + +## 插件工具注册位置与 LLM 上下文窗口的关系 + +理解插件工具时,需要区分两件事:**(1)工具在哪里注册并执行**,以及 **(2)工具的 Schema 是否进入 LLM 上下文窗口**。 + +### OpenIDEA WASM 插件(`plugin.toml`) + +- **注册在 OpenIDEA 内置 MCP 服务器中:** 声明了 `[[contributes.mcpTools]]` 的插件会将其工具以 `__` 的名称注册到 OpenIDEA 内置 [MCP 服务器](/zh/guide/mcp)(见 [插件 MCP 工具](/zh/plugins/guides/mcp))。 +- **通过 MCP 间接进入上下文窗口:** 任务启动时,OpenIDEA 将内置 `OpenIDEA` MCP 服务器挂载到智能体会话中。智能体 CLI 调用 `tools/list`,把返回的工具名称、描述和 JSON Schema 加载进 LLM 的工具声明(上下文窗口)——除非你在当前会话通过 `/mcp` 关闭了该服务器,或者智能体启用了延迟/按需工具加载。 +- **插件代码不会进入上下文:** WASM 二进制和实现源码始终停留在宿主进程中。模型调用工具时,OpenIDEA MCP 服务器把 `tools/call` 路由到沙箱化的插件宿主,并强制执行插件声明的权限以及 `readOnly` / `destructive` 审批规则。 + +### 自带 `.mcp.json` 的智能体 CLI 插件 + +- OpenIDEA 插件(`plugin.toml`)本身不会拉起独立的 MCP 服务器进程,而是通过 WASM 导出把工具注入 OpenIDEA 内置 MCP 服务器。 +- **智能体 CLI 插件**(例如带 `.mcp.json` 的 Copilot CLI 插件,或在 `.claude-plugin/plugin.json` 中声明 `mcpServers` 的 Claude 插件)则会打包独立的外部 MCP 服务器。启用该插件或在 **设置 › 智能体 › MCP 连接** 中导入后,智能体会在会话启动时连接到这个独立 MCP 服务器,调用 `tools/list`,并以完全相同的方式将其工具 Schema 注入 LLM 上下文窗口——只是它作为与 `OpenIDEA` 并列的另一个 MCP 服务器运行。 + +| 维度 | OpenIDEA WASM 插件(`plugin.toml`) | 智能体 CLI 插件(`.mcp.json` / `plugin.json`) | +| ----------------------- | -------------------------------------------------- | ------------------------------------------------- | +| **托管 / 注册位置** | OpenIDEA 内置 MCP 服务器(`ide-host`) | 独立的 MCP 服务器进程或远程 URL | +| **执行沙箱** | 进程内 `wasmtime` Actor + OpenIDEA 能力授权 | 外部进程或网络服务 | +| **Schema 如何到达 LLM** | 对 `OpenIDEA` MCP 调用 `tools/list` → LLM 工具目录 | 对内置的独立 MCP 调用 `tools/list` → LLM 工具目录 | +| **代码进入上下文?** | 否(仅工具 Schema 与调用入参/返回值) | 否(仅工具 Schema 与调用入参/返回值) | + +## 端到端生命周期示例 + +假设你具备以下配置: + +- **插件:** 安装了 OpenIDEA 的 `kubernetes` 插件,贡献了一个 MCP 工具(`k8s__get_pod_logs`)和一个技能(`/debug-crashloop`)。 +- **外部 MCP:** 工作区配置了 GitHub / Slack MCP 服务器。 +- **记忆:** 持久化规则记录了*“预发命名空间是 `payments-stg`;推送前始终基于 `origin/main` 变基。”* + +你新建一个智能体任务并输入: + +```text +/debug-crashloop 排查 staging 环境 payments pod 崩溃原因并提一个 PR +``` + +```mermaid +sequenceDiagram + autonumber + actor User as 用户 + participant Host as OpenIDEA 宿主与插件 + participant MCP as MCP 服务器(内置 + 外部) + participant Agent as 智能体运行时(上下文窗口) + + Note over Host: 阶段 1 — 宿主启动(任务尚未创建) + Host->>Host: 加载 kubernetes WASM 插件 + Host->>MCP: 将 k8s__get_pod_logs 注册进内置 MCP + Host->>Host: 在技能中心索引 /debug-crashloop SKILL.md + + Note over Agent: 阶段 2 — 会话初始化 + Host->>Agent: 注入记忆(AGENTS.md + 用户规则) + Host->>Agent: 注入轻量技能索引(仅名称 + 描述) + Agent->>MCP: 连接并调用 tools/list + MCP-->>Agent: 返回工具 JSON Schema -> LLM 工具目录 + + Note over User,Agent: 阶段 3 — 技能激活(第 1 轮) + User->>Agent: /debug-crashloop 排查 payments pod 崩溃... + Agent->>Host: 按需读取完整 debug-crashloop/SKILL.md 手册 + Host-->>Agent: 手册正文注入当前对话上下文 + + Note over Agent,Host: 阶段 4 — 执行循环(思考 -> 调用工具 -> 观察) + Agent->>MCP: tools/call k8s__get_pod_logs(ns="payments-stg") + MCP->>Host: 路由到 kubernetes WASM 插件(校验权限) + Host-->>Agent: 返回堆栈:BillingService.java:84 + Agent->>Agent: 使用内置 view + edit 修复第 84 行 + Agent->>MCP: 调用 OpenIDEA-check_files + bash 运行测试 + MCP-->>Agent: 编译与测试全部通过 + Agent->>Agent: 按记忆规则 rebase 并通过 gh 创建 PR + + Note over Agent,Host: 阶段 5 — 完成与清理 + Agent->>Host: 保存新的持久记忆 / 会话检查点 + Agent-xMCP: 关闭会话级 MCP 连接并清空工具目录 +``` + + + + OpenIDEA 在沙箱宿主中加载已启用的**插件**。`kubernetes` 插件将 `k8s__get_pod_logs` 注册到 OpenIDEA 内置 **MCP** + 服务器,并在**技能中心**索引 `debug-crashloop/SKILL.md`。此时尚未启动智能体任务,LLM 上下文窗口为空。 + + + **记忆**被注入系统提示词(`AGENTS.md`、用户规则、召回的事实);**MCP** 客户端连接所有已启用的服务器并调用 + `tools/list`,组装包含内置工具与 MCP 工具 Schema 的**工具**目录;**技能**仅注入精简的 `name` + `description` + 索引,避免未使用的手册消耗上下文 token。 + + + 由于你输入了 `/debug-crashloop`(或在**自动**模式下模型匹配到了该技能描述),智能体将完整的 + `debug-crashloop/SKILL.md` 手册按需加载进当前对话上下文,为模型提供清晰步骤:*拉取 Pod 日志 → 定位源码堆栈 → + 修复并验证测试 → 创建 PR*。 + + + 结合**技能**步骤与**记忆**中的命名空间(`payments-stg`),模型通过 **MCP** 调用 `k8s__get_pod_logs`。OpenIDEA + 将调用路由给沙箱化的 `kubernetes` **插件**,拿到 `BillingService.java:84` 的堆栈。接着模型用内置**工具**(`view`、 + `edit`)修复代码,用 OpenIDEA 的 **MCP 工具**(`OpenIDEA-check_files`)和 `bash` + 验证编译与测试,最后遵循**记忆**规则完成变基并提 PR。 + + + **插件**、**记忆**(含本轮新沉淀的持久事实或检查点)与**技能**文件保留在宿主与磁盘中供后续任务复用;会话级 **MCP** + 连接关闭或空闲退出,会话**工具**目录随之清空,已加载的**技能**正文也仅限于本次对话,不会污染新任务。 + + + +## 相关指南 + + + + 配置内置与 ACP 智能体、外部 MCP 服务器以及技能管理。 + + + 启用 OpenIDEA 内置 MCP 服务器并连接 IDE 或外部客户端。 + + + 通过 OpenIDEA 插件向内置 MCP 服务器贡献沙箱化的 WASM 工具。 + + + 在 `plugin.toml` 中声明技能、MCP 工具与权限能力。 + + diff --git a/docs/zh/guide/agents.mdx b/docs/zh/guide/agents.mdx index 60167fe63..05ea82419 100644 --- a/docs/zh/guide/agents.mdx +++ b/docs/zh/guide/agents.mdx @@ -163,6 +163,8 @@ agent 运行过一个任务后,新任务会以它自动批准所有操作的 agent 工作时,对话下方的状态行显示它正在做什么:思考、读取、编辑、运行命令、输出回复。 +关于 **插件**、**记忆**、**MCP**、**工具** 和 **技能** 在整个任务生命周期中如何协同工作以及它们对 LLM 上下文窗口的影响,参见 [智能体资源与生命周期](/zh/guide/agent-resources)。 + ## 添加自定义 agent 任何通过 stdio 使用 ACP 的 agent,都可以用一个 agent 文件添加:OpenIDEA 配置目录下的 `agents/.toml`。