跳到正文
Skillpedia
智能体81k · #1556

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-agent/skills/managed-agent/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 (or CLAUDE_API_KEY) in the environment, with Claude Managed Agents beta access.
  • If absent, every managed_agent_* tool returns a structured "use wasm_agent_create for a local no-key runtime" error — fall back to the WASM skill.

Steps

  1. 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 local ruflo mcp start is 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.
  2. 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, raise maxWaitMs or follow up with managed_agent_events.

  3. 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 of wasm_agent_files).

  4. List — mcp__plugin_ruflo-core_ruflo__managed_agent_list { limit? } — every session on the org (so you can see which are still running / billing).

  5. Terminate — mcp__plugin_ruflo-core_ruflo__managed_agent_terminate { sessionId, environmentId? } — always do this when done: running sessions consume runtime and tokens. Pass environmentId to 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-tracking namespace.
  • Treat orphaned sessions like leaked resources — managed_agent_list then managed_agent_terminate anything 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

  1. Create with dynamicWorkflows: true, budgetCents: "2500" ($25), and exact allowedHosts. Networking is limited. Use predefinedAgents for restricted workers; otherwise inline agents inherit lead tools. Never expose recursive swarm launch or release tools to remote workers.
  2. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能