Skip to content

feat: add Skill.from_s3 for dynamic loading skills from S3#2253

Open
jeromevdl wants to merge 1 commit intostrands-agents:mainfrom
jeromevdl:feat/dynamic-skills-s3
Open

feat: add Skill.from_s3 for dynamic loading skills from S3#2253
jeromevdl wants to merge 1 commit intostrands-agents:mainfrom
jeromevdl:feat/dynamic-skills-s3

Conversation

@jeromevdl
Copy link
Copy Markdown

Description

Teams managing multiple agents often centralize skill definitions in S3 rather than bundling them in application code. This enables shared skill libraries, versioning via S3 prefixes, and decoupling skill authoring from agent deployment (dynamic loading).

This adds a Skill.from_s3 classmethod that discovers skill directories in an S3 bucket, mirrors them locally (with parallel downloads and per-process caching), then delegates to the existing from_directory for parsing.

Public API Changes

from strands.vended_plugins.skills import Skill

# Load all skills under a prefix
skills = Skill.from_s3("my-bucket", prefix="agents/director/")

# With a custom S3 client
import boto3
s3 = boto3.client("s3", region_name="eu-west-1")
skills = Skill.from_s3("my-bucket", s3_client=s3)

Parameters: bucket, prefix, s3_client, local_dir, strict

Related Issues

None

Documentation PR

Not yet available, will document if the feature is accepted.

Type of Change

New feature

Testing

15 new unit tests using moto to mock S3

Covers: single/multiple skills, resource file mirroring, caching, prefix normalization, empty buckets, strict mode, lowercase skill.md discovery

All 154 skill tests pass

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant