Loading...
    • 建構
    • 管理
    • 模型與定價
    • 客戶端 SDK
    • API 參考
    Search...
    ⌘K
    Log in
    在 Console 中原型設計
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Solutions

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

    Partners

    • Amazon Bedrock
    • Google Cloud's Vertex AI

    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 提供了一個視覺介面,用於建立和配置代理。它產生與 API 相同的 /v1/agents 和 /v1/sessions 資源,但讓您在編寫程式碼之前以互動方式反覆調整配置。

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

    如何建立代理

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

    • 模型和系統提示: 選擇一個模型,並在全寬編輯器中編寫系統提示。
    • MCP 伺服器: 透過 URL 新增遠端 MCP 伺服器,並驗證您的代理以代表您採取行動。
    • 工具: 使用預先建立的代理工具集和 MCP 工具擴展代理的功能。
    • 技能: 從您組織的庫中附加 Anthropic 或自訂技能。

    在配置時,Console 會顯示等效的 API 請求,以便您在滿意後將其複製到您的程式碼中。

    測試代理

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

    從原型到程式碼

    一旦您的代理按預期運作:

    1. 從 Console 輸出複製代理 ID。
    2. 在您的程式碼中參考它,當 建立工作階段 時:
    session = client.beta.sessions.create(
        agent="agent_01J8XkN5uT3vHpLqRfWdY2",
        environment_id="env_01K2mPsT7hNwR4jXuLvCqD8",
        title="My first session",
    )

    Was this page helpful?