New to Claude Skills? Learn how to install them →

ruvnet on GitHub

Managed Agent

Free

Run long-lived cloud agents with Anthropic's Claude.

by ruvnet67.6k stars on ruvnet/ruflo
1 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Managed Agent does

The Managed Agent skill allows users to leverage Anthropic's Claude Managed Agents within a cloud environment. This skill is designed for developers and designers who need to execute long-running tasks asynchronously, utilizing a cloud container that provides a persistent filesystem and pre-installed packages. Unlike the local WASM runtime, which is limited to ephemeral and offline tasks, the Managed Agent skill enables complex operations that can take minutes to hours, making it suitable for scenarios where sustained processing is required.

To get started, users must create a managed agent session using the mcp__plugin_ruflo-core_ruflo__managed_agent_create command. This command provisions the necessary components, including the agent, environment, and session, providing unique identifiers for each. The skill supports a variety of packages that can be pre-installed in the cloud container, allowing users to tailor the environment to their specific needs. Once the agent is set up, users can send prompts to the agent using the mcp__plugin_ruflo-core_ruflo__managed_agent_prompt command, which communicates with the agent and retrieves results.

Monitoring and managing sessions is straightforward with commands to inspect the agent's status and retrieve event logs. Users can easily see which sessions are active and terminate them when they are no longer needed, ensuring efficient resource usage and cost management. This skill is particularly beneficial for projects that require extensive computation or data processing that cannot be efficiently handled in a local environment.

Overall, the Managed Agent skill is a powerful tool for those working with Anthropic's Claude, providing the ability to run complex tasks in a cloud environment. It is ideal for developers looking to extend the capabilities of their projects with long-running, asynchronous processing, while also maintaining control over resource usage and costs.

When to use it

Use this skill when you need to run complex, time-consuming tasks that require a persistent environment and network access.

When not to use it

Avoid this skill for quick, ephemeral tasks that can be handled by local runtimes or when cloud access is not available.

What you can build with it

Long-running Data Processing

Use the Managed Agent skill to perform extensive data processing tasks that require sustained computation over hours.

Complex API Integrations

Leverage the skill to manage complex API interactions that need persistent sessions and can run asynchronously.

Extended Machine Learning Tasks

Utilize the Managed Agent for training machine learning models that require significant time and resources.

How to install Managed Agent

View source

1. Install with the skills CLI

npx skills add ruvnet/ruflo/managed-agent --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by ruvnet

Managed Agent (Anthropic cloud runtime)

ruflo-agent has two agent runtimes behind one mental model:

RuntimeToolsUse 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. Createmcp__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. Promptmcp__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. Inspectmcp__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. Listmcp__plugin_ruflo-core_ruflo__managed_agent_list { limit? } — every session on the org (so you can see which are still running / billing).

  5. Terminatemcp__plugin_ruflo-core_ruflo__managed_agent_terminate { sessionId, environmentId? }always do this when done: a cloud session keeps billing container time + tokens until deleted. 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); multiagent / define-outcomes on the agent config are research preview.

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 }

Frequently asked questions about Managed Agent

Similar skills