managed-agent
它能做什么
这项技能引导智能体在云端创建并运行 Claude Managed Agent,它在多轮对话之间保持自己的环境和文件。适合运行时间较长或后台工作、且不应在你自己电脑上运行的任务。
适用场景
- ✓当一项任务需要几分钟或几小时、并应在云端运行的时候。
- ✓当你希望智能体拥有预装软件包和自己的文件系统的时候。
- ✓当你需要一个在多轮之间保留历史的会话的时候。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-agent/skills/managed-agent/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请启动一个云端智能体,研究这五家公司,并把报告保存在它的文件中。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会创建智能体和环境,启动会话,发送消息,并读取会话产生的事件和文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Managed Agent (Anthropic cloud runtime)
ruflo-agent has two agent runtimes behind one mental model:
| Runtime | Tools | Use it when |
|---|---|---|
WASM (local, rvagent) |
wasm_agent_* / wasm_gallery_* |
fast, free, ephemeral, offline, untrusted code in a sandbox |
| Managed (Anthropic cloud) | managed_agent_* (this skill) |
long-running / async work (minutes–hours), a real cloud container with pre-installed packages + network, persistent filesystem + transcript across turns |
This skill drives the managed runtime — Anthropic's Claude Managed Agents (beta). The model: Agent (model + system + tools + MCP servers + skills) → Environment (container template) → Session (running instance) → Events (turns / tool-use / status, persisted server-side). See docs/adr/0001-wasm-contract.md and project ADR-115.
Prerequisites
ANTHROPIC_API_KEY(orCLAUDE_API_KEY) in the environment, with Claude Managed Agents beta access.- If absent, every
managed_agent_*tool returns a structured "usewasm_agent_createfor a local no-key runtime" error — fall back to the WASM skill.
Steps
Create —
mcp__plugin_ruflo-core_ruflo__managed_agent_create{ model?, system?, name?, networking?, packages?, initScript?, mcpServers?, skills? }→{ sessionId, agentId, environmentId, status }. Provisions Agent + Environment + Session. Save the three ids.mcpServers:[{type:"url", url, name, authorization_token?}]— the cloud agent must be able to reach the URL. A localruflo mcp startis not reachable from Anthropic's cloud; deploy/tunnel an HTTP ruflo MCP server first if you want the cloud agent to have ruflo's tools.packages:{pip?:[], npm?:[], apt?:[], cargo?:[], gem?:[], go?:[]}— installed in the container.
Prompt —
mcp__plugin_ruflo-core_ruflo__managed_agent_prompt{ sessionId, message, maxWaitMs? }→ sends a user turn, polls the event log until the session goes idle (default 180s, capped 600s) →{ finished, status, stopReason, assistantText, toolUses[], eventCount }. For very long tasks, raisemaxWaitMsor follow up withmanaged_agent_events.Inspect —
mcp__plugin_ruflo-core_ruflo__managed_agent_status{ sessionId }(idle/running/error) ·mcp__plugin_ruflo-core_ruflo__managed_agent_events{ sessionId, raw? }(full transcript: user turns, agent thinking, tool_use, tool_result, status — the cloud counterpart ofwasm_agent_files).List —
mcp__plugin_ruflo-core_ruflo__managed_agent_list{ limit? }— every session on the org (so you can see which are still running / billing).Terminate —
mcp__plugin_ruflo-core_ruflo__managed_agent_terminate{ sessionId, environmentId? }— always do this when done: running sessions consume runtime and tokens. PassenvironmentIdto also delete the environment ruflo created.
Cost & safety
- Managed Agents bill per session (LM tokens + container time) and are rate-limited per org. Estimate before a long run; record completed sessions to the
cost-trackingnamespace. - Treat orphaned sessions like leaked resources —
managed_agent_listthenmanaged_agent_terminateanything stale. - Beta API (
managed-agents-2026-04-01); dynamic workflows are opt-in beta; outcomes remain outside this adapter.
Quick example
managed_agent_create { "model": "claude-haiku-4-5-20251001", "system": "Terse. Do exactly what is asked.", "name": "scratch" }
→ { sessionId: "sesn_…", agentId: "agent_…", environmentId: "env_…", status: "idle" }
managed_agent_prompt { "sessionId": "sesn_…", "message": "echo hello > /tmp/x && cat /tmp/x — then stop." , "maxWaitMs": 60000 }
→ { finished: true, status: "idle", stopReason: "end_turn", assistantText: "Done.", toolUses: [{name:"bash", input:{command:"echo hello > /tmp/x && cat /tmp/x"}}] }
managed_agent_terminate { "sessionId": "sesn_…", "environmentId": "env_…" }
→ { sessionDeleted: true, environmentDeleted: true }
Dynamic workflow procedure
- Create with
dynamicWorkflows: true,budgetCents: "2500"($25), and exactallowedHosts. Networking is limited. UsepredefinedAgentsfor restricted workers; otherwise inline agents inherit lead tools. Never expose recursive swarm launch or release tools to remote workers. - Prompt the lead to run inventory, review, reproduction and synthesis phases. Use separate worker output path
常见问题
使用它之前我需要什么?
你需要一个可访问 Claude Managed Agents 测试版的 Anthropic API 密钥。
如果我没有访问权限怎么办?
工具会返回错误,这项技能建议改用本地的 WASM 智能体。
它和本地 WASM 智能体一样吗?
不一样。托管智能体运行在 Anthropic 的云端,而 WASM 智能体在沙盒中本地运行。
详情
作者的原始描述
Run an Anthropic Claude Managed Agent — a cloud agent harness (container + filesystem + tools), the cloud counterpart of the local wasm-agent runtime
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1556
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。