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?