Spring AI now supports Anthropic's Agent Skills API, enabling Claude models to generate actual downloadable files (Excel, PowerPoint, Word, PDF) instead of text descriptions. The integration includes both pre-built document generation skills and custom skills for organization-specific needs. The implementation uses Anthropic-specific classes and is limited to Claude Sonnet 4, Sonnet 4.5, and Opus 4 models. Generated files are stored in Anthropic's Files API for 24 hours. Spring AI provides helper classes for extracting file IDs and downloading generated documents, with support for both ChatModel and ChatClient APIs. Custom skills are defined via SKILL.md files uploaded to Anthropic workspaces and can be combined with pre-built skills.

8m read timeFrom spring.io
Post cover image
Table of contents
LimitationsWhen to Use Anthropic Skills vs. Generic Agent SkillsWhy Use Spring AI for SkillsPre-built SkillsDownloading Generated FilesCustom SkillsExample: Document Generation ServiceTips for Custom SkillsGetting StartedQuick ReferenceSample ApplicationRelated: Generic Agent Skills in Spring AIConclusion

Sort: