AI Auto Support logoKefuAgents 文档
Agent Gateway

Codex / ChatGPT 接入包

Codex skill + openai.yaml 清单 + AGENTS.md 片段;ChatGPT 连接器现状如实说明。

已验证版本:待验证(发布前将用真实 Codex 客户端验证并回填 已验证版本:Codex <version> @ <date>,并记录实际生效的配置面)。

工作流、边界、安全行为与 Claude Code 包完全一致——只是打包形式不同。

安装步骤(Codex)

  1. 创建 Gateway Key(ecosystem 选 Codex;默认 scope gateway:read + gateway:submit_draft),存入环境变量 KEFUAGENT_GATEWAY_KEY
  2. SKILL.md 装到 ~/.agents/skills/kefuagent-support/SKILL.md(frontmatter 字段以你的 Codex 版本为准,待验证)。
  3. 把下面 openai.example.yaml 按验证过的 schema 放到 skill 的 agents/openai.yaml,声明 MCP 依赖,环境自动装配连接(schema 待验证;不可用时 见下方 config.toml 回退)。
  4. (可选)把下面的片段粘贴进常驻项目的 AGENTS.md
  5. 对 Codex 说:"查一下 KefuAgents 有什么客服卡要处理"。

agents/openai.yaml(原始文件:/agent-packs/codex/openai.example.yaml

# agents/openai.yaml — declares the KefuAgents gateway as an MCP dependency so
# the Codex environment wires the connection automatically.
# 待验证 [NEEDS VALIDATION]: exact schema/key names against the verified Codex
# release. Fallback: register the server in ~/.codex/config.toml instead
# ([mcp_servers.kefuagent] — see the docs page).
mcp_servers:
  kefuagent:
    transport: streamable_http
    url: https://kefuagents.com/api/gateway/mcp
    headers:
      Authorization: 'Bearer ${KEFUAGENT_GATEWAY_KEY}'

回退:~/.codex/config.toml

若你的 Codex 版本没有 openai.yaml 自动装配,可在用户配置注册远程 MCP server (键名待验证,以你的 Codex 版本文档为准):

[mcp_servers.kefuagent]
url = "https://kefuagents.com/api/gateway/mcp"
# transport: Streamable HTTP;鉴权 header:
# Authorization = "Bearer ${KEFUAGENT_GATEWAY_KEY}"

skill 仍然照装——它承载工作流与边界,与连接方式无关。

AGENTS.md 片段(原始文件:/agent-packs/codex/agents-md-snippet.md

## KefuAgents 客服监督(via MCP)

本项目连接了 KefuAgents Agent Gateway(MCP server `kefuagent`)。当用户提到客服、
待审回复、客户邮件时:

-`get_pending_cards` 看待办,先 `get_reply_context` 再起草,草稿走
  `submit_draft` 提交平台安全门(回显 contextVersion,每个动作新的 idempotencyKey)。
- 端口只做 5 件事:看卡、批准、拒绝、中文指挥重写(`instruct_rewrite`)、转网页。
  没有"直接编辑客户邮件正文"的工具,也不要寻找。
- 退款/补发/投诉/拒付/安全类永远由人决定;平台会拒绝任何 key 的高风险 approve。
- 面向商家的汇报用中文;客户回复跟随客户语言。

ChatGPT 连接器说明(如实)

  • ChatGPT connectors / Apps-SDK 集成消费同一个 MCP 端点 (https://kefuagents.com/api/gateway/mcp),无需单独构建。
  • 待验证:当前 ChatGPT 连接器界面能否附加静态 Authorization: Bearer header。历史上托管连接器只提供 OAuth 或无鉴权两种选项。在验证通过之前请按 "暂不支持"对待:ChatGPT 连接器暂不支持静态 key,请先用 Codex 接入;OAuth 接入在规划中。 不要在不存在的输入框上浪费时间。
  • 无论以哪种方式接入,平台保证不变:平台复检每份草稿、高风险永远人工、一把 key 一个 workspace、全量审计。

目录