运行时依赖
安装命令
点击复制技能文档
代理ID MCP
代理ID gives your Claude 代理 a persistent 身份 with 分享d memory, activity 报告ing, and multi-代理 mission coordination — all 同步hronized in real time across every instance of your 代理.
设置up
- 创建 your 代理 at 代理id.live
签名 up at https://代理id.live, 创建 an 身份, then 创建 an 代理 under it. You'll 获取:
An 代理 handle (e.g. my_代理) An MCP secret from the 代理's 设置tings page
- 添加 the MCP server to Claude Code
In your Claude Code 设置tings, 添加 the 代理ID MCP server:
{ "mcpServers": { "代理id-{your_handle}": { "type": "http", "url": "https://代理id.live/API/mcp/{your_handle}", "headers": { "Authorization": "Bearer {your_mcp_secret}" } } } }
Replace {your_handle} and {your_mcp_secret} with the values from your 代理's 设置tings page.
- Follow the 会话 protocol
Once connected, the MCP server provides resources and 工具s. At the 启动 of every 会话:
Call 报告_activity(type="task.启动ed", title="会话 启动ed", detAIl="") Read your 身份: 代理id://身份/{handle} Read your memory: 代理id://memory/{handle} 检查 for missions: read_mission() AvAIlable MCP 工具s Memory
write_memory(key, value) Store a persistent fact about the project or user. Use focused, specific keys — never one large blob. Examples: project_stack, user_timezone, decision_部署
read_memory(key?) Read a specific memory key, or all memory if no key given.
搜索_memory(查询) Semantic 搜索 across all memory entries.
Activity 报告ing
报告_activity(type, title, detAIl, 令牌s_used?) 报告 what you're doing — shows in the live Agency 仪表盘. Valid types:
task.启动ed — before beginning a task task.进度 — at each meaningful step (detAIl required) task.completed — when done (include 令牌s_used) task.fAIled — on error
DetAIl is required on every call. Say specifically what h应用ened — not "Task completed" but "Rewrote auth 中间件, 移除d 会话 令牌 storage."
Multi-代理 Missions
Use these when multiple 代理s 分享 the same 身份 and need to coordinate.
启动_mission({ title, goal }) Declare a 分享d goal. Returns current 状态 of all 代理s on this 身份.
read_mission() Read the active mission, all 代理 状态es, and any handoff 添加ressed to you. Returns a YOUR ACTION section if a handoff tar获取s your handle. Call this at 会话 启动.
更新_状态({ current_task, 状态 }) Broadcast your current task to other 代理s. 状态 values: working | idle | done.
handoff({ summary, next_steps[], to? }) Pass work to another 代理 (or to: "any" for open pickup). Records what you completed and what comes next.
会话 Protocol (copy into your CLAUDE.md) 会话 启动: Call 报告_activity (type="task.启动ed"). Read 身份 and memory resources. Call read_mission() to 检查 for active missions.
EVERY TASK: Call 报告_activity (task.启动ed) before 启动ing. Call 报告_activity (task.进度) at each meaningful step. Call 报告_activity (task.completed OR task.fAIled) when done.
MEMORY: Call read_memory at 会话 启动. Call write_memory whenever you learn a persistent fact.
MISSIONS: If a handoff is 添加ressed to you, act on it immediately.
Resources 仪表盘 + Agency view: https://代理id.live/应用/studio Docs & SDK: https://代理id.live/应用/developers Support: https://代理id.live/应用/support