Skip to content

Commit c532c2d

Browse files
committed
This commit intertwines the twin strands of agents and tools, creating an SDK where autonomous intelligence can evolve.
Welcome to Strands Agents!
0 parents  commit c532c2d

File tree

103 files changed

+17584
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+17584
-0
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. Unless a later match takes precedence,
3+
# @strands-agents/contributors will be requested for
4+
# review when someone opens a pull request.
5+
* @strands-agents/maintainers

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Bug Report
2+
description: Report a bug in the Strands Agents SDK
3+
title: "[BUG] "
4+
labels: ["bug", "triage"]
5+
assignees: []
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report for Strands SDK!
11+
- type: checkboxes
12+
id: "checks"
13+
attributes:
14+
label: "Checks"
15+
options:
16+
- label: "I have updated to the lastest minor and patch version of Strands"
17+
required: true
18+
- label: "I have checked the documentation and this is not expected behavior"
19+
required: true
20+
- label: "I have searched [./issues](./issues?q=) and there are no duplicates of my issue"
21+
required: true
22+
- type: input
23+
id: strands-version
24+
attributes:
25+
label: Strands Version
26+
description: Which version of Strands are you using?
27+
placeholder: e.g., 0.5.2
28+
validations:
29+
required: true
30+
- type: input
31+
id: python-version
32+
attributes:
33+
label: Python Version
34+
description: Which version of Python are you using?
35+
placeholder: e.g., 3.10.5
36+
validations:
37+
required: true
38+
- type: input
39+
id: os
40+
attributes:
41+
label: Operating System
42+
description: Which operating system are you using?
43+
placeholder: e.g., macOS 12.6
44+
validations:
45+
required: true
46+
- type: dropdown
47+
id: installation-method
48+
attributes:
49+
label: Installation Method
50+
description: How did you install Strands?
51+
options:
52+
- pip
53+
- git clone
54+
- binary
55+
- other
56+
validations:
57+
required: true
58+
- type: textarea
59+
id: steps-to-reproduce
60+
attributes:
61+
label: Steps to Reproduce
62+
description: Detailed steps to reproduce the behavior
63+
placeholder: |
64+
1. Install Strands using...
65+
2. Run the command...
66+
3. See error...
67+
validations:
68+
required: true
69+
- type: textarea
70+
id: expected-behavior
71+
attributes:
72+
label: Expected Behavior
73+
description: A clear description of what you expected to happen
74+
validations:
75+
required: true
76+
- type: textarea
77+
id: actual-behavior
78+
attributes:
79+
label: Actual Behavior
80+
description: What actually happened
81+
validations:
82+
required: true
83+
- type: textarea
84+
id: additional-context
85+
attributes:
86+
label: Additional Context
87+
description: Any other relevant information, logs, screenshots, etc.
88+
- type: textarea
89+
id: possible-solution
90+
attributes:
91+
label: Possible Solution
92+
description: Optional - If you have suggestions on how to fix the bug
93+
- type: input
94+
id: related-issues
95+
attributes:
96+
label: Related Issues
97+
description: Optional - Link to related issues if applicable

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Strands Agents SDK Support
4+
url: https://github.com/strands-agents/sdk-python/discussions
5+
about: Please ask and answer questions here
6+
- name: Strands Agents SDK Documentation
7+
url: https://github.com/strands-agents/docs
8+
about: Visit our documentation for help
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement for Strands Agents SDK
3+
title: "[FEATURE] "
4+
labels: ["enhancement", "triage"]
5+
assignees: []
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for suggesting a new feature for Strands Agents SDK!
11+
- type: textarea
12+
id: problem-statement
13+
attributes:
14+
label: Problem Statement
15+
description: Describe the problem you're trying to solve. What is currently difficult or impossible to do?
16+
placeholder: I would like Strands to...
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: proposed-solution
21+
attributes:
22+
label: Proposed Solution
23+
description: Optional - Describe your proposed solution in detail. How would this feature work?
24+
- type: textarea
25+
id: use-case
26+
attributes:
27+
label: Use Case
28+
description: Provide specific use cases for the feature. How would people use it?
29+
placeholder: This would help with...
30+
validations:
31+
required: true
32+
- type: textarea
33+
id: alternatives-solutions
34+
attributes:
35+
label: Alternatives Solutions
36+
description: Optional - Have you considered alternative approaches? What are their pros and cons?
37+
- type: textarea
38+
id: additional-context
39+
attributes:
40+
label: Additional Context
41+
description: Include any other context, screenshots, code examples, or references that might help understand the feature request.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## Description
2+
[Provide a detailed description of the changes in this PR]
3+
4+
## Related Issues
5+
[Link to related issues using #issue-number format]
6+
7+
## Documentation PR
8+
[Link to related associated PR in the agent-docs repo]
9+
10+
## Type of Change
11+
- Bug fix
12+
- New feature
13+
- Breaking change
14+
- Documentation update
15+
- Other (please describe):
16+
17+
[Choose one of the above types of changes]
18+
19+
20+
## Testing
21+
[How have you tested the change?]
22+
23+
* `hatch fmt --linter`
24+
* `hatch fmt --formatter`
25+
* `hatch test --all`
26+
* Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
27+
28+
29+
## Checklist
30+
- [ ] I have read the CONTRIBUTING document
31+
- [ ] I have added tests that prove my fix is effective or my feature works
32+
- [ ] I have updated the documentation accordingly
33+
- [ ] I have added an appropriate example to the documentation to outline the feature
34+
- [ ] My changes generate no new warnings
35+
- [ ] Any dependent changes have been merged and published
36+
37+
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
open-pull-requests-limit: 100
8+
commit-message:
9+
prefix: ci
10+
groups:
11+
dev-dependencies:
12+
patterns:
13+
- "pytest"
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "daily"
18+
open-pull-requests-limit: 100
19+
commit-message:
20+
prefix: ci

.github/workflows/dispatch-docs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Dispatch Docs
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- strands
7+
jobs:
8+
trigger:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
steps:
13+
- name: Dispatch
14+
run: gh api repos/${{ github.repository_owner }}/docs/dispatches -F event_type=sdk-push
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}

.github/workflows/test-lint-pr.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Test and Lint
2+
3+
on:
4+
pull_request: # Safer than pull_request_target for untrusted code
5+
branches: [ main, strands ]
6+
types: [opened, synchronize, reopened, ready_for_review, review_requested, review_request_removed]
7+
push:
8+
branches: [ main ] # Also run on direct pushes to main
9+
10+
jobs:
11+
check-approval:
12+
name: Check if PR has contributor approval
13+
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: read
16+
# Skip this check for direct pushes to main
17+
if: github.event_name == 'pull_request'
18+
outputs:
19+
approved: ${{ steps.check-approval.outputs.approved }}
20+
steps:
21+
- name: Check if PR has been approved by a contributor
22+
id: check-approval
23+
uses: actions/github-script@v7
24+
with:
25+
script: |
26+
const APPROVED_ASSOCIATION = ['COLLABORATOR', 'CONTRIBUTOR', 'MEMBER', 'OWNER']
27+
const PR_AUTHOR_ASSOCIATION = context.payload.pull_request.author_association;
28+
const { data: reviews } = await github.rest.pulls.listReviews({
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
pull_number: context.issue.number,
32+
});
33+
34+
const isApprovedContributor = APPROVED_ASSOCIATION.includes(PR_AUTHOR_ASSOCIATION);
35+
36+
// Check if any contributor has approved
37+
const isApproved = reviews.some(review =>
38+
review.state === 'APPROVED' && APPROVED_ASSOCIATION.includes(review.author_association)
39+
) || isApprovedContributor;
40+
41+
core.setOutput('approved', isApproved);
42+
43+
if (!isApproved) {
44+
core.notice('This PR does not have approval from a Contributor. Workflow will not run test jobs.');
45+
return false;
46+
}
47+
48+
return true;
49+
50+
unit-test:
51+
name: Unit Tests - Python ${{ matrix.python-version }} - ${{ matrix.os-name }}
52+
needs: check-approval
53+
permissions:
54+
contents: read
55+
# Only run if PR is approved or this is a direct push to main
56+
if: github.event_name == 'push' || needs.check-approval.outputs.approved == 'true'
57+
strategy:
58+
matrix:
59+
include:
60+
# Linux
61+
- os: ubuntu-latest
62+
os-name: linux
63+
python-version: "3.10"
64+
- os: ubuntu-latest
65+
os-name: linux
66+
python-version: "3.11"
67+
- os: ubuntu-latest
68+
os-name: linux
69+
python-version: "3.12"
70+
- os: ubuntu-latest
71+
os-name: linux
72+
python-version: "3.13"
73+
# Windows
74+
- os: windows-latest
75+
os-name: windows
76+
python-version: "3.10"
77+
- os: windows-latest
78+
os-name: windows
79+
python-version: "3.11"
80+
- os: windows-latest
81+
os-name: windows
82+
python-version: "3.12"
83+
- os: windows-latest
84+
os-name: windows
85+
python-version: "3.13"
86+
# MacOS - latest only; not enough runners for MacOS
87+
- os: macos-latest
88+
os-name: macos
89+
python-version: "3.13"
90+
fail-fast: false
91+
runs-on: ${{ matrix.os }}
92+
env:
93+
LOG_LEVEL: DEBUG
94+
steps:
95+
- name: Checkout code
96+
uses: actions/checkout@v4
97+
with:
98+
ref: ${{ github.event.pull_request.head.sha }} # Explicitly define which commit to checkout
99+
persist-credentials: false # Don't persist credentials for subsequent actions
100+
- name: Set up Python
101+
uses: actions/setup-python@v5
102+
with:
103+
python-version: ${{ matrix.python-version }}
104+
- name: Install dependencies
105+
run: |
106+
pip install --no-cache-dir hatch
107+
- name: Run Unit tests
108+
id: tests
109+
run: hatch test tests --cover
110+
continue-on-error: false
111+
112+
lint:
113+
name: Lint
114+
runs-on: ubuntu-latest
115+
needs: check-approval
116+
permissions:
117+
contents: read
118+
if: github.event_name == 'push' || needs.check-approval.outputs.approved == 'true'
119+
steps:
120+
- name: Checkout code
121+
uses: actions/checkout@v4
122+
with:
123+
ref: ${{ github.event.pull_request.head.sha }}
124+
persist-credentials: false
125+
126+
- name: Set up Python
127+
uses: actions/setup-python@v5
128+
with:
129+
python-version: '3.10'
130+
cache: 'pip'
131+
132+
- name: Install dependencies
133+
run: |
134+
pip install --no-cache-dir hatch
135+
136+
- name: Run lint
137+
id: lint
138+
run: hatch run test-lint
139+
continue-on-error: false

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
build
2+
__pycache__*
3+
.coverage*
4+
.env
5+
.venv
6+
.mypy_cache
7+
.pytest_cache
8+
.ruff_cache
9+
*.bak

0 commit comments

Comments
 (0)