Beta Features & Skills
Relevant source files
The following files were used as context for generating this wiki page:
The "Beta Features & Skills" module provides experimental functionality within the Anthropic Go SDK, allowing developers to interact with early-access capabilities such as Skills management, specialized tool execution loops, and file-based context. These features are often gated behind specific anthropic-beta headers and are designed to extend the core Messages API with advanced reasoning and automation tools.
Key components include the BetaSkillService for managing reusable AI capabilities, the BetaToolRunner for automated multi-turn tool execution, and the BetaFileService for handling document-based context in model interactions.
Sources: betaskill.go:37-45, betatoolrunner.go:197-205, betafile.go:35-42
Skills Management
Skills are discrete packages of functionality that can be uploaded to and managed via the Anthropic API. They allow models to perform specific tasks or access specialized knowledge. The SDK facilitates creating, retrieving, listing, and deleting these skills, as well as managing multiple versions of a single skill.
Skill Lifecycle and Versions
Each skill consists of a display title and a set of files, including a mandatory SKILL.md file at the root. Versions are identified by Unix epoch timestamps and contain metadata extracted from the skill's documentation.
The diagram shows the lifecycle of a Beta Skill, from initial creation and file upload to versioning and subsequent management.
Sources: betaskill.go:138-151, betaskillversion.go:121-140
Skill API Parameters
| Parameter | Type | Description |
|---|---|---|
DisplayTitle | string | Human-readable label for the skill (not included in prompt). |
Files | []io.Reader | Binary files comprising the skill; must include SKILL.md. |
Source | string | Origin of the skill: "custom" (user) or "anthropic". |
Version | string | Unix epoch timestamp identifying a specific skill iteration. |
Sources: betaskill.go:231-242, betaskillversion.go:140-142
Beta Tool Runner
The BetaToolRunner and its streaming counterpart manage the "agentic" loop between the assistant and defined tools. It automates the process of sending messages, receiving tool calls, executing those calls locally, and returning results to the model until a final response is reached.
Execution Logic
The runner maintains an internal iterationCount and conversation history. In each turn, it checks if the model has requested tool uses. If so, it executes them in parallel using an errgroup before continuing the conversation.
The sequence diagram illustrates the automated loop where the runner handles API communication and local tool execution internally.
Sources: betatoolrunner.go:214-255, tools.md:79-90
Key Runner Structures
- BetaTool: An interface requiring
Name(),Description(),InputSchema(), andExecute(). - BetaToolRunnerParams: Wraps
BetaMessageNewParamswith an additionalMaxIterationslimit to prevent infinite loops. - betaToolRunnerBase: Shared state including the tool map and iteration tracking.
Sources: betatoolrunner.go:12-25, toolrunner/tool.go:14-25
Beta Model Information
The SDK allows querying detailed metadata about models via beta-enabled endpoints. This includes high-level capabilities like image support and reasoning effort levels.
Model Capabilities
Models are described by their supported features, which are categorized into specific capability objects.
| Capability | Description |
|---|---|
ContextManagement | Supports strategies like clear_tool_uses or compact. |
Effort | Levels of reasoning effort: low, medium, high, max. |
Thinking | Support for extended thinking configurations (adaptive or enabled). |
StructuredOutputs | Support for strict JSON schemas and tool output constraints. |
Sources: betamodel.go:153-176, betamodel.go:193-214
Beta File Service
The Beta File Service manages binary assets that can be used as context in model requests. Unlike standard message content, these files are uploaded once and referenced by a unique fileID.
The flow represents the process of uploading a file and referencing it within a document block in the Messages API.
Sources: betafile.go:102-110, betafile.go:155-177
File Metadata Fields
| Field | Type | Description |
|---|---|---|
ID | string | Unique identifier used for referencing the file in messages. |
MimeType | string | The MIME type of the uploaded file (e.g., application/pdf). |
SizeBytes | int64 | Size of the file in bytes. |
Downloadable | bool | Indicates if the file content can be retrieved via the Download endpoint. |
Sources: betafile.go:155-177
Summary
Beta Features and Skills provide the infrastructure for advanced AI workflows. By combining managed Skills (betaskill.go), automated Tool Runners (betatoolrunner.go), and persistent Files (betafile.go), the SDK enables developers to build complex, multi-step agents that leverage Anthropic's latest experimental capabilities. Use of these features requires including specific beta headers (e.g., skills-2025-10-02 or files-api-2025-04-14) in API requests.