Skip to content

Commit 4a26f4a

Browse files
mkmeralUnshureContainerized Agentstrands-agent
authored
feat(skills): Add agent skills (#1755)
Co-authored-by: Nicholas Clegg <ncclegg@amazon.com> Co-authored-by: Containerized Agent <agent@containerized-strands.local> Co-authored-by: Strands Agent <217235299+strands-agent@users.noreply.github.com> Co-authored-by: Nick Clegg <nac542@gmail.com>
1 parent b0fc796 commit 4a26f4a

File tree

11 files changed

+2155
-2
lines changed

11 files changed

+2155
-2
lines changed

AGENTS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ strands-agents/
130130
│ ├── plugins/ # Plugin system
131131
│ │ ├── plugin.py # Plugin base class
132132
│ │ ├── decorator.py # @hook decorator
133-
│ │ └── registry.py # PluginRegistry for tracking plugins
133+
│ │ ├── registry.py # PluginRegistry for tracking plugins
134+
│ │ └── skills/ # Agent Skills integration
135+
│ │ ├── __init__.py # Skills package exports
136+
│ │ ├── skill.py # Skill dataclass
137+
│ │ └── agent_skills.py # AgentSkills plugin implementation
134138
│ │
135139
│ ├── handlers/ # Event handlers
136140
│ │ └── callback_handler.py # Callback handling

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ dependencies = [
3535
"mcp>=1.23.0,<2.0.0",
3636
"pydantic>=2.4.0,<3.0.0",
3737
"typing-extensions>=4.13.2,<5.0.0",
38+
"pyyaml>=6.0.0,<7.0.0",
3839
"watchdog>=6.0.0,<7.0.0",
3940
"opentelemetry-api>=1.30.0,<2.0.0",
4041
"opentelemetry-sdk>=1.30.0,<2.0.0",

src/strands/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44
from .agent.agent import Agent
55
from .agent.base import AgentBase
66
from .event_loop._retry import ModelRetryStrategy
7-
from .plugins import Plugin
7+
from .plugins import AgentSkills, Plugin, Skill
88
from .tools.decorator import tool
99
from .types.tools import ToolContext
1010

1111
__all__ = [
1212
"Agent",
1313
"AgentBase",
14+
"AgentSkills",
1415
"agent",
1516
"models",
1617
"ModelRetryStrategy",
1718
"Plugin",
19+
"Skill",
1820
"tool",
1921
"ToolContext",
2022
"types",

src/strands/plugins/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66

77
from .decorator import hook
88
from .plugin import Plugin
9+
from .skills import AgentSkills, Skill
910

1011
__all__ = [
12+
"AgentSkills",
1113
"Plugin",
14+
"Skill",
1215
"hook",
1316
]
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""AgentSkills.io integration for Strands Agents.
2+
3+
This module provides the AgentSkills plugin for integrating AgentSkills.io skills
4+
into Strands agents. Skills enable progressive disclosure of instructions:
5+
metadata is injected into the system prompt upfront, and full instructions
6+
are loaded on demand via a tool.
7+
8+
Example Usage:
9+
```python
10+
from strands import Agent
11+
from strands.plugins.skills import Skill, AgentSkills
12+
13+
# Load from filesystem via classmethods
14+
skill = Skill.from_file("./skills/pdf-processing")
15+
skills = Skill.from_directory("./skills/")
16+
17+
# Or let the plugin resolve paths automatically
18+
plugin = AgentSkills(skills=["./skills/pdf-processing"])
19+
agent = Agent(plugins=[plugin])
20+
```
21+
"""
22+
23+
from .agent_skills import AgentSkills, SkillSource, SkillSources
24+
from .skill import Skill
25+
26+
__all__ = [
27+
"AgentSkills",
28+
"Skill",
29+
"SkillSource",
30+
"SkillSources",
31+
]

0 commit comments

Comments
 (0)