Files as Skills
An agent that uses file resources as dynamically loadable skills - using blueprint introspection to list available files with their names and descriptions, then reading file content on demand to learn new capabilities at runtime.
The Files as Skills blueprint demonstrates how plain file resources become a dynamic skill system through two simple abilities: blueprint introspection and file reading.
Skills are defined as ordinary file resources attached to the blueprint.
Each file has a name (the skill's title) and a description (when
to use it). The file's content holds the full instructions. This
mirrors how professionals organize knowledge - a title tells you what
it covers, a summary tells you if it is relevant, and the full
document gives you the details.
How It Works
The architecture relies on two abilities and the progressive disclosure pattern:
-
List Skills uses the
blueprint/resource/listtemplate filtered totype: file. This returns the id, name, and description of every file resource in the blueprint without loading any content. The agent sees the full catalogue of available skills and can match user requests to the right skill by description alone. -
Read Skill uses the
file/read[by-id]template to fetch the full content of a specific file by its id. The agent calls this only after identifying the relevant skill from the list. Instructions are loaded just in time, keeping context focused and efficient.
This two-step introspect-then-read pattern means adding a new skill is as simple as adding a new file resource to the blueprint with a clear name and description. No abilities need to change, no backstory needs updating, and no code is involved.
Why This Pattern Works
- Progressive disclosure - the agent sees only metadata until it needs the full content, preventing context bloat with dozens of skills.
- Zero-touch extensibility - adding a file resource with a name and description instantly makes a new skill available. The agent discovers it automatically through introspection.
- Self-describing - each file's name and description serve as the skill's catalogue entry. Well-written descriptions are all the agent needs to decide relevance.
- Scalable - the blueprint can hold dozens or hundreds of skill files without performance impact since content is loaded on demand.
- Shareable - file resources can be reused across blueprints or shared between agents.
Skill File Format
Each skill file is plain Markdown with clear instructions:
# Summarize URL
## Instructions
1. Ask the user for the URL if not provided
2. Fetch the content of the URL
3. Produce a 3-5 sentence summary of the main points
4. Include the page title and publication date if available
The file's name and description fields (set on the file resource
itself) are what the List Skills ability returns during introspection.
The file content is only fetched when the agent decides to use that
skill.
Getting Started
- Add file resources to the blueprint - each one is a skill. Give each file a clear name and a description that explains when to use it.
- Write the skill's instructions as the file content.
- Chat with the agent - it will introspect the blueprint, discover your skills, and use them automatically.
- To add more skills, just add more file resources. The agent picks them up immediately through introspection.
The example includes three placeholder skills (Data Analysis, Content Writing, Code Review) to illustrate the pattern. Replace them with your own domain-specific skills.
Backstory
Common information about the bot's experience, skills and personality. For more information, see the Backstory documentation.
Skillset
This example uses a dedicated Skillset. Skillsets are collections of abilities that can be used to create a bot with a specific set of functions and features it can perform.
List Skills
Lists all available skill files in the blueprint by introspecting file resources. Returns the id, name, and description for each skill.Read Skill
Reads the full content of a skill file by its id. Use List Skills first to discover available skill ids.
Terraform Code
This blueprint can be deployed using Terraform, enabling infrastructure-as-code management of your ChatBotKit resources. Use the code below to recreate this example in your own environment.
A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.