Loading...
  • 建構
  • 管理
  • 模型與定價
  • 客戶端 SDK
  • API 參考
Search...
⌘K
Log in
代理技能
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
建構/定義您的代理

技能

將可重複使用的檔案系統型專業知識附加到您的代理程式,以進行特定領域的工作流程。

技能是可重複使用的檔案系統型資源,為您的代理程式提供特定領域的專業知識:工作流程、背景資訊和最佳實踐,將通用代理程式轉變為專家。與提示不同(對話層級的一次性任務指令),技能按需加載,僅在需要時影響上下文視窗。

支援兩種類型的技能。兩者的工作方式相同:當代理程式認為它們與任務相關時,會自動調用它們。

  • 預先構建的 Anthropic 技能: 常見的文件任務,例如 PowerPoint、Excel、Word 和 PDF 處理。
  • 自訂技能: 您編寫並上傳到您的組織的技能。

若要了解如何編寫自訂技能,請參閱 Agent Skills 概述 和 最佳實踐。本頁面假設您已在組織中有可用的技能,或正在使用 Anthropic 預先構建的技能。

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

在工作階段上啟用技能

建立代理程式時附加技能。每個工作階段最多支援 20 個技能 - 這包括工作階段中所有代理程式的技能,如果您正在使用 多個代理程式。

agent = client.beta.agents.create(
    name="Financial Analyst",
    model="claude-opus-4-7",
    system="You are a financial analysis agent.",
    skills=[
        {
            "type": "anthropic",
            "skill_id": "xlsx",
        },
        {
            "type": "custom",
            "skill_id": "skill_abc123",
            "version": "latest",
        },
    ],
)

技能類型

欄位說明
type預先構建的技能使用 anthropic,或組織編寫的技能使用 custom。
skill_id技能識別碼。對於 Anthropic 技能,使用簡短名稱(例如 xlsx)。對於自訂技能,使用建立時傳回的 skill_* ID。
version僅限自訂技能。釘選到特定版本或使用 latest。

Was this page helpful?