Skip to content

Commit a64a851

Browse files
authored
feat(docs): Create agent.md and docs folder (#1312)
1 parent 9f70298 commit a64a851

File tree

7 files changed

+517
-22
lines changed

7 files changed

+517
-22
lines changed

AGENTS.md

Lines changed: 477 additions & 0 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ hatch fmt --linter
122122

123123
If you're using an IDE like VS Code or PyCharm, consider configuring it to use these tools automatically.
124124

125-
For additional details on styling, please see our dedicated [Style Guide](./STYLE_GUIDE.md).
125+
For additional details on styling, please see our dedicated [Style Guide](./docs/STYLE_GUIDE.md).
126126

127127

128128
## Contributing via Pull Requests

docs/HOOKS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Hooks System
2+
3+
The hooks system enables extensible agent functionality through strongly-typed event callbacks.
4+
5+
## Terminology
6+
7+
- **Paired events**: Events that denote the beginning and end of an operation
8+
- **Hook callback**: A function that receives a strongly-typed event argument
9+
- **Hook provider**: An object implementing `HookProvider` that registers callbacks via `register_hooks()`
10+
11+
## Naming Conventions
12+
13+
- All hook events have a suffix of `Event`
14+
- Paired events follow `Before{Action}Event` and `After{Action}Event`
15+
- Action words come after the lifecycle indicator (e.g., `BeforeToolCallEvent` not `BeforeToolEvent`)
16+
17+
## Paired Events
18+
19+
- For every `Before` event there is a corresponding `After` event, even if an exception occurs
20+
- `After` events invoke callbacks in reverse registration order (for proper cleanup)
21+
22+
## Writable Properties
23+
24+
Some events have writable properties that modify agent behavior. Values are re-read after callbacks complete. For example, `BeforeToolCallEvent.selected_tool` is writable - after invoking the callback, the modified `selected_tool` takes effect for the tool call.
File renamed without changes.

docs/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Developer Documentation
2+
3+
This folder contains documentation for contributors and developers working on the Strands Agents SDK.
4+
5+
## Contents
6+
7+
- [STYLE_GUIDE.md](./STYLE_GUIDE.md) - Code style conventions and formatting guidelines
8+
- [HOOKS.md](./HOOKS.md) - Hooks system rules and usage guide
9+
- [MCP_CLIENT_ARCHITECTURE.md](./MCP_CLIENT_ARCHITECTURE.md) - MCP client threading architecture and design decisions
10+
11+
## Related Documentation
12+
13+
- [AGENTS.md](../AGENTS.md) - Guidance for AI agents and LLMs working with this codebase
14+
- [CONTRIBUTING.md](../CONTRIBUTING.md) - Contribution guidelines for human contributors
15+
- [strandsagents.com](https://strandsagents.com/) - User-facing documentation
File renamed without changes.

src/strands/hooks/rules.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)