Claude Platform Docs
  • Messages
  • 託管代理
  • 管理

Search...
⌘K
第一步
概覽快速入門在 Console 中建立原型
定義您的代理
代理設定工具MCP 連接器權限政策代理技能
設定代理環境
雲端環境設定雲端沙箱參考
將工作委派給您的代理
啟動工作階段工作階段操作工作階段事件串流訂閱 Webhook定義結果使用保管庫進行驗證
管理代理上下文
存取 GitHub附加與下載檔案
進階協調
多代理工作階段排程部署
參考
託管代理參考
處理檔案
Files APIPDF 支援
技能
概覽最佳實踐企業技能
MCP
遠端 MCP 伺服器
雲端平台上的 Claude
AWS 上的 Claude Platform

Log in
在 Console 中建立原型
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Claude Platform Docs

Solutions

  • AI agents
  • Code modernization
  • Coding
  • Customer support
  • Education
  • Financial services
  • Government
  • Life sciences

Partners

  • Claude on AWS
  • Claude on Google Cloud

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Company

  • Anthropic
  • Careers
  • Economic Futures
  • Research
  • News
  • Responsible Scaling Policy
  • Security and compliance
  • Transparency

Learn

  • Blog
  • Courses
  • Use cases
  • Connectors
  • Customer stories
  • Engineering at Anthropic
  • Events
  • Powered by Claude
  • Service partners
  • Startups program

Help and security

  • Availability
  • Status
  • Support
  • Discord

Terms and policies

  • Privacy policy
  • Responsible disclosure policy
  • Terms of service: Commercial
  • Terms of service: Consumer
  • Usage policy
託管代理/第一步

在 Console 中建立原型

在 Console 中以視覺化方式建立和測試代理程式,無需編寫 API 呼叫。

Console 提供視覺化介面來建立和設定代理程式。它讓您能夠在編寫程式碼之前,以互動方式反覆調整設定。



所有 Managed Agents API 請求都需要 managed-agents-2026-04-01 beta 標頭。SDK 會自動設定此 beta 標頭。

如何建立代理程式

視覺化介面會引導您完成代理程式定義的每個欄位:

  • 模型與系統提示: 選擇模型並在全寬編輯器中編寫「system prompt」(系統提示)。
  • MCP 伺服器: 透過 URL 新增遠端 MCP 伺服器,並驗證您的代理程式以代表您執行操作。
  • 工具: 使用預建的代理程式工具集和 MCP 工具來擴展代理程式的功能。
  • 技能: 從您組織的資料庫中附加 Anthropic 或自訂技能。

在您進行設定時,Console 會顯示對應的 API 請求,以便您在滿意後將其複製到程式碼中。

測試代理程式

Console 包含內嵌的「session」(工作階段)執行器。設定代理程式後,您可以直接啟動測試工作階段、傳送訊息,並在不離開頁面的情況下觀察事件串流。這是檢查您的系統提示和工具選擇是否產生預期行為的最快方式。

從原型到程式碼

當您的代理程式運作符合預期後:

  1. 從 Console 複製代理程式 ID 和環境 ID。
  2. 在建立工作階段時於程式碼中引用它們:
ant beta:sessions create \
  --agent agent_01J8XkN5uT3vHpLqRfWdY2 \
  --environment-id env_01K2mPsT7hNwR4jXuLvCqD8 \
  --title "My first session"

Was this page helpful?

  • 如何建立代理程式
  • 測試代理程式
  • 從原型到程式碼