← 返回 Skills 市场
aaronfaby

Claude Managed Agents

作者 Aaron · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
23
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install claude-managed-agents
功能描述
Manage Claude Managed Agents end to end through a Python helper CLI, with ant CLI equivalents documented as a secondary path. Use this whenever the user want...
使用说明 (SKILL.md)

Claude Managed Agents

Use this skill to operate Anthropic Claude Managed Agents safely and cleanly from this machine.

This skill is SDK-first through the bundled Python helper, with ant CLI documented as a secondary operator lane. Raw REST is only for debugging or when the SDK is unavailable.

What this skill handles

  • agents
    • create
    • update
    • retrieve
    • list
    • list versions
    • archive
    • delete
  • environments
    • create
    • update
    • retrieve
    • list
    • archive
    • delete
  • sessions
    • create
    • retrieve
    • list
    • archive
    • delete
  • session events
    • send user messages
    • interrupt and redirect
    • list history
    • stream live SSE events
    • send tool confirmations
    • send custom tool results
  • files
    • upload local files to the Files API
    • list, download, and delete files
    • return file IDs for mounting into sessions
  • session resources
    • add resources to running sessions
    • list mounted resources
    • delete mounted resources by resource ID
  • configuration domains
    • built-in toolset controls
    • MCP servers
    • skills
    • packages
    • networking
    • vault IDs
    • mounted resources
  • diagnostics
    • local preflight via doctor
    • optional live read-only connectivity checks via doctor --live

Required environment

Set:

  • ANTHROPIC_API_KEY

Optional:

  • ANTHROPIC_API_BASE_URL
  • ANTHROPIC_MANAGED_AGENTS_BETA
  • ANTHROPIC_TIMEOUT_SECONDS

The managed-agents beta header is required. The helper uses managed-agents-2026-04-01 by default.

Script

Use:

  • scripts/managed_agents.py

Run it with Python 3:

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py --help

Run a preflight before live work when the lane feels sketchy:

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  doctor \
  --allowed-host api.example.com

Operating model

Prefer this order:

  1. Python helper CLI
  2. documented ant equivalent when the user wants a direct CLI path
  3. raw REST only when troubleshooting edge cases

The helper supports:

  • --backend auto (default)
  • --backend sdk
  • --backend http

Use sdk when the Anthropic Python SDK is installed. Use http if the SDK is missing or behaving oddly.

Safe workflow

For new setups

  1. confirm ANTHROPIC_API_KEY exists
  2. create or inspect the target agent
  3. create or inspect the target environment
  4. create the session
  5. send a user message event
  6. stream or list events to monitor progress

For mid-run steering

  1. list or stream session events
  2. if the agent is going the wrong direction, send:
    • user.interrupt
    • followed by a new user.message
  3. if the session is waiting on approval, send user.tool_confirmation
  4. if the session is waiting on a custom tool result, send user.custom_tool_result

High-value guardrails

  • Do not guess event IDs, tool use IDs, or custom tool use IDs.
  • For approval flows, read recent events first and use the exact pending tool ID.
  • For custom tools, return only the result the tool actually produced. Do not fabricate success.
  • Prefer limited networking with explicit hosts for production-oriented environments. Use bare hostnames like api.example.com, not full URLs.
  • Do not delete environments, sessions, or agents casually. Archive first unless the user clearly wants hard deletion.
  • Archiving is usually the safer lifecycle move than deletion, but disposable smoke fixtures may need delete for full cleanup.

Recommended command patterns

Create an agent with the full built-in toolset

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  agent create \
  --name "Coding Assistant" \
  --model claude-sonnet-4-6 \
  --system "You are a helpful coding agent." \
  --agent-toolset

Run doctor before a live session

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  doctor \
  --live \
  --allowed-host api.example.com

Create an environment with limited networking and pip packages

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  environment create \
  --name "python-dev" \
  --network limited \
  --allowed-host api.example.com \
  --allow-package-managers \
  --pip pandas==2.2.0 \
  --pip numpy==2.1.0

Upload a file and get a file ID

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  file upload \
  --file-path ./data.csv \
  --only-id

Create a session with an uploaded file mounted in the container

FILE_ID=$(python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  file upload \
  --file-path ./data.csv \
  --only-id)

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  session create \
  --agent-id agent_123 \
  --environment-id env_123 \
  --title "Repo analysis" \
  --resource-json "{\"type\":\"file\",\"file_id\":\"${FILE_ID}\",\"mount_path\":\"/workspace/data.csv\"}"

Add another file to a running session

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  session resource add \
  --session-id sess_123 \
  --file-id file_abc123 \
  --mount-path /workspace/config.json

Download a session-scoped file artifact

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  file download \
  --file-id file_abc123 \
  --output ./artifact.txt

Use this mainly for generated artifacts. Uploaded source files often come back with downloadable: false.

Send a user message to the session

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  session send \
  --session-id sess_123 \
  --message "Summarize the repository and propose the next refactor."

Interrupt and redirect the session

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  session send \
  --session-id sess_123 \
  --interrupt \
  --message "Stop the broad audit and focus on the auth bug in line 42."

Stream events until idle

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  session stream \
  --session-id sess_123 \
  --until-idle

Approve a pending tool call

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  session send \
  --session-id sess_123 \
  --confirm-tool-use-id tool_evt_123 \
  --confirm-result allow

Delete an agent when the user explicitly wants permanent cleanup

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  agent delete \
  --agent-id agent_123

Return a custom tool result

python3 ~/.openclaw/skills/claude-managed-agents/scripts/managed_agents.py \
  session send \
  --session-id sess_123 \
  --custom-tool-use-id custom_evt_123 \
  --custom-tool-text '{"temperature_f":72,"condition":"sunny"}'

When to use ant CLI instead

Use ant when the user explicitly wants Anthropic's native CLI experience, copy-pasteable operator commands, or quick manual inspection.

Examples:

ant beta:agents create --name "Coding Assistant" --model '{id: claude-sonnet-4-6}' --tool '{type: agent_toolset_20260401}'
ant beta:environments list
ant beta:sessions retrieve --session-id "$SESSION_ID"
ant beta:sessions:events send --session-id "$SESSION_ID"
ant beta:sessions stream --session-id "$SESSION_ID"

References in this skill

Read these when needed:

  • references/quickstart.md for the end-to-end happy path
  • references/lifecycle-recipes.md for lifecycle operations and payload patterns
  • references/files-api.md for upload, list, download, delete, and session resource workflows
  • references/event-model.md for streaming, interruptions, approvals, and custom tools
  • references/ant-cli-recipes.md for direct ant commands mirroring the helper
  • references/known-gaps.md for dependency assumptions and operational caveats

Output contract

Default answer shape:

  • short lead sentence with the answer or current state
  • 2-6 bullets with the important IDs, statuses, or lifecycle facts
  • exact next command when a follow-up step is likely

If the user asks for raw JSON, return the raw JSON instead.

安全使用建议
Install only if you intentionally want OpenClaw to administer Claude Managed Agents from this machine. Before use, review the Python helper, set a dedicated Anthropic API key if possible, avoid unnecessary unrestricted networking, attach only trusted MCP servers and vaults, and require explicit confirmation before deletes, updates, uploads, or tool approvals.
功能分析
Type: OpenClaw Skill Name: claude-managed-agents Version: 1.0.0 The skill bundle provides a legitimate and well-documented Python CLI helper for managing Anthropic's Managed Agents API. It facilitates agent creation, environment setup, session management, and file operations (upload/download) through the 'scripts/managed_agents.py' script. The code is professionally written, includes comprehensive unit tests, and contains safety guardrails in 'SKILL.md' to prevent the agent from fabricating data or performing destructive actions without confirmation. No evidence of malicious intent, data exfiltration to unauthorized endpoints, or harmful prompt injection was found.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is coherent with the artifacts, but the capability is broad and high-impact: it covers full lifecycle management for agents, environments, sessions, events, files, resources, tools, MCP servers, packages, networking, and vault IDs.
Instruction Scope
The documentation includes useful guardrails, but also documents direct create/update/delete, tool-confirmation, raw JSON, unrestricted networking, and full toolset workflows that can materially change remote agent behavior if used too broadly.
Install Mechanism
There is no install spec, but users are instructed to run a bundled Python helper locally. The static scan finding is in a unit test loading the helper, which appears expected, but the skill source is listed as unknown.
Credentials
The skill can create remote environments with unrestricted networking, package managers, and MCP server access. That is aligned with the purpose, but should be limited to explicit, trusted workflows.
Persistence & Privilege
The helper uses an Anthropic API key and can create persistent managed agents and sessions, attach resources and vault IDs, and perform permanent deletion. Users should apply least privilege and confirm destructive actions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claude-managed-agents
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claude-managed-agents 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the claude-managed-agents skill. - Provides a Python CLI helper to manage Claude Managed Agents, environments, sessions, and event streams. - Documents secondary support for the ant CLI and fallback to REST for debugging. - Includes commands for agent/environment/session lifecycle, session events, file management, configuration, and diagnostics. - Focuses on safety: uses archiving before deletion, strict event/tool result handling, and API key/environment validation. - Requires Python 3 and ANTHROPIC_API_KEY; supports optional config and SDK. - Extensive usage guidance and recommended command patterns included.
元数据
Slug claude-managed-agents
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Claude Managed Agents 是什么?

Manage Claude Managed Agents end to end through a Python helper CLI, with ant CLI equivalents documented as a secondary path. Use this whenever the user want... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 23 次。

如何安装 Claude Managed Agents?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-managed-agents」即可一键安装,无需额外配置。

Claude Managed Agents 是免费的吗?

是的,Claude Managed Agents 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Claude Managed Agents 支持哪些平台?

Claude Managed Agents 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Claude Managed Agents?

由 Aaron(@aaronfaby)开发并维护,当前版本 v1.0.0。

💬 留言讨论