Listen

Description

Claude Managed Agents 新增多代理協調與夢境自學習功能。 @ClaudeDevs 介紹 Claude Managed Agents 的全新功能,包括 multiagent orchestration、基於 rubric 的 outcomes loop 自改善、夢境(dreaming)自學習,以及 webhooks 通知。這些更新讓 Agent 能協調子任務、自我迭代優化,並透過背景處理精煉記憶,提升複雜工作處理能力。所有 API 請求需使用 managed-agents-2026-04-01 beta header,SDK 會自動設定。 多代理協調(Multi-agent Orchestration) Multi-agent orchestration 讓 coordinator Agent 協調其他子代理完成複雜任務,每個子代理擁有獨立 context window,但共享 container 與檔案系統。適合平行化獨立子任務(如多來源搜尋、檔案分析)、專門化路由(如安全 Agent 或文件 Agent)、或升級複雜任務至更強模型。支援最大 25 個 concurrent threads,coordinator 只 delegate 一層,最多 20 個 unique agents,但可呼叫多個副本。 配置 coordinator 時設定 multiagent 宣告代理列表,例如 "Engineering Lead" 使用 claude-opus-4-7 模型,system prompt 為 "You coordinate engineering work. Delegate code review to the reviewer agent and test writing to the test agent.",tools 為 [{"type": "agenttoolset20260401"}] `bash coordinator=$(curl -fsS https://api.anthropic.com/v1/agents \ -H "x-api-key: $ANTHROPICAPIKEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: managed-agents-2026-04-01" \ -H "content-type: application/json" \ -d @- <<EOF { "name": "Engineering Lead", "model": "claude-opus-4-7", "system": "You coordinate engineering work. Delegate code review to the reviewer agent and test writing to the test agent.", "tools": [ { "type": "agenttoolset20260401" } ], "multiagent": { "type": "coordinator", "agents": [ {"type": "agent", "id": "$REVIEWERAGENTID"}, {"type": "agent", "id": "$TESTWRITERAGENT_ID"} ] } } EOF ) ` `bash ant beta:agents create <<YAML name: Engineering Lead model: claude-opus-4-7 system: You coordinate engineering work. Delegate code review to the reviewer agent and test writing to the test agent. tools: - type: agenttoolset20260401 multiagent: type: coordinator agents: - type: agent id: $REVIEWERAGENTID - type: agent id: $TESTWRITERAGENT_ID YAML ` `python coordinator = client.beta.agents.create( name="Engineering Lead", model="claude-opus-4-7", system="You coordinate engineering work. Delegate code review to the reviewer agent and test writing to the test agent.", tools=[ {"type": "agenttoolset20260401"}, ], multiagent={ "type": "coordinator", "agents": [ {"type": "agent", "id": reviewer_agent.id}, {"type": "agent", "id": testwriteragent.id}, ], }, ) ` multiagent.agents 可指定 {"type": "agent", "id": agent.id}(預設最新版本)、{"type": "agent", "id": agent.id, "version": agent.version}(固定版本)或 {"type": "self"}(產生自身副本)。建立 session 時參照 coordinator。 `bash session=$(curl -fsSL https://api.anthropic.com/v1/sessions \ -H "x-api-key: $ANTHROPICAPIKEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: managed-agents-2026-04-01" \ -H "content-type: application/json" \ -d @- <<EOF { "agent": "$COORDINATOR_ID", "environmentid": "$ENVIRON…