Skip to main content
Pass a Skill configuration to Claude, then download generated files from Anthropic’s Files API.

Code

skills.py
Agno 2.7.2 adds the Skills container, the code_execution_20250825 server tool, and the code-execution-2025-08-25 and skills-2025-10-02 beta values when skills is set. Anthropic now treats that code execution version as generally available, but still accepts its legacy beta value. Agno copies IDs from Bash execution results to model_provider_data["file_ids"] and preserves Python execution results in model_provider_data["server_tool_blocks"]. extract_generated_file_ids() handles both result shapes. Anthropic’s Python SDK adds the Files API beta header when you call client.beta.files.

Pre-Built Skills

Use up to eight Skills in one Messages API request. Each configuration takes type, skill_id, and an optional version. Use type="custom" with the skill_* ID for a Skill uploaded to your Anthropic workspace.

Usage

1

Set up your virtual environment

2

Install dependencies

3

Export your Anthropic API key

4

Run the agent

Save the code above as skills.py, then run:

Constraints

  • Skills run in an isolated Anthropic container without network access or runtime package installation.
  • Generated files remain in Anthropic’s environment until you download them. The Files API permits downloads only for files generated by Skills or code execution.
  • Anthropic can return pause_turn for a long-running Skill. Agno 2.7.2 drops that stop reason. Keep this one-shot example to short generation tasks, and use Anthropic’s native SDK when the operation requires pause continuation.
  • The Files API is beta. Skills and the Files API are available through the Claude API, Claude Platform on AWS, and Microsoft Foundry deployments hosted by Anthropic. They are unavailable through Amazon Bedrock and Google Cloud Vertex AI.
  • Skill-generated .pptx, .xlsx, .docx, and .pdf files are outputs. Office binary inputs require a code-execution container upload or conversion to text or PDF instead of a Messages API document block.

Developer Resources