Skip to content

Commit b8d43d7

Browse files
committed
Complete ConfigLoader documentation update for top-level key requirements
Updated all ConfigLoader documentation to reflect correct configuration structure: Phase 1 - Core Configuration Examples: - overview.md: Updated all examples to use top-level keys, added schema validation and IDE integration sections - agent-config.md: Wrapped all configurations in 'agent:' key, added comprehensive schema validation guide - graph-config.md: Wrapped all configurations in 'graph:' key, updated node and edge examples - swarm-config.md: Wrapped all configurations in 'swarm:' key, updated agent configurations within swarms Phase 2 - Advanced Features: - tool-config.md: Updated nested agent configurations, added schema validation for tools - structured-output.md: Wrapped all agent configs in 'agent:' key, added JSON Schema validation integration Phase 3 - Meta Documentation: - experimental/README.md: Added schema validation system, IDE integration features, comprehensive examples New Features Added: - Schema validation sections in all files with VSCode setup instructions - IDE integration guides (VSCode, IntelliJ, Vim) - Comprehensive examples showing correct top-level key usage - Advanced configuration patterns with proper nesting - Error handling and troubleshooting guides - Best practices for each configuration type All configuration examples now: - Use proper top-level keys (agent:, graph:, swarm:, tools:) - Work with current ConfigLoader implementation - Support schema validation and IDE integration - Follow consistent structure and formatting - Include comprehensive real-world examples Ready for production use with full schema validation ecosystem support
1 parent fd65faf commit b8d43d7

File tree

7 files changed

+3265
-167
lines changed

7 files changed

+3265
-167
lines changed

docs/experimental/README.md

Lines changed: 159 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,20 @@ Experimental features in Strands Agents are cutting-edge capabilities that are:
1111
## Current Experimental Features
1212

1313
### Configuration Loaders
14-
Declarative YAML-based configuration for agents, tools, swarms, and graphs.
14+
Declarative configuration for agents, tools, swarms, and graphs with comprehensive schema validation and IDE integration support.
15+
16+
**Key Features:**
17+
- **Schema Validation**: Comprehensive JSON Schema validation with IDE integration
18+
- **IDE Support**: VSCode, IntelliJ, Vim autocompletion and real-time validation
19+
- **Type Safety**: Enforced structure and types without restrictive constraints
20+
- **Nested Configurations**: Support for agents-as-tools, graphs-as-tools, swarms-as-tools
21+
- **Error Prevention**: Catch configuration errors before runtime
22+
23+
**Configuration Types:**
24+
- **Agent Configuration**: Single agents with tools, structured output, and advanced features
25+
- **Graph Configuration**: Multi-agent workflows with nodes, edges, and conditions
26+
- **Swarm Configuration**: Collaborative agent teams with autonomous coordination
27+
- **Tool Configuration**: Standalone tool definitions and agent-as-tool patterns
1528

1629
## Using Experimental Features
1730

@@ -24,18 +37,162 @@ pip install strands-agents
2437
### Enabling Experimental Features
2538
```python
2639
from strands.experimental.config_loader import AgentConfigLoader
40+
41+
# All configurations require top-level keys for schema validation
42+
config = {
43+
"agent": {
44+
"model": "us.amazon.nova-pro-v1:0",
45+
"system_prompt": "You are a helpful assistant.",
46+
"tools": [{"name": "calculator"}]
47+
}
48+
}
49+
50+
loader = AgentConfigLoader()
51+
agent = loader.load_agent(config)
52+
```
53+
54+
### IDE Integration Setup
55+
56+
**VSCode Setup:**
57+
1. Install the "YAML" extension by Red Hat
58+
2. Add schema reference to your configuration files:
59+
```yaml
60+
# yaml-language-server: $schema=https://strandsagents.com/schemas/config/v1
61+
62+
agent:
63+
model: "us.amazon.nova-pro-v1:0"
64+
# Enjoy autocompletion and validation!
65+
```
66+
67+
**Global VSCode Settings:**
68+
```json
69+
{
70+
"yaml.schemas": {
71+
"https://strandsagents.com/schemas/config/v1": "*.strands.yml"
72+
}
73+
}
74+
```
75+
76+
## Configuration Examples
77+
78+
### Agent Configuration
79+
```python
80+
config = {
81+
"agent": {
82+
"model": "us.amazon.nova-pro-v1:0",
83+
"system_prompt": "You are a helpful assistant.",
84+
"tools": [
85+
{"name": "calculator"},
86+
{
87+
"name": "research_assistant",
88+
"agent": {
89+
"model": "us.amazon.nova-lite-v1:0",
90+
"system_prompt": "Research: {topic}"
91+
},
92+
"input_schema": {
93+
"type": "object",
94+
"properties": {
95+
"topic": {"type": "string"}
96+
},
97+
"required": ["topic"]
98+
}
99+
}
100+
]
101+
}
102+
}
27103
```
28104

105+
### Graph Configuration
106+
```python
107+
config = {
108+
"graph": {
109+
"nodes": [
110+
{
111+
"node_id": "classifier",
112+
"type": "agent",
113+
"config": {
114+
"model": "us.amazon.nova-lite-v1:0",
115+
"system_prompt": "Classify the input."
116+
}
117+
},
118+
{
119+
"node_id": "processor",
120+
"type": "agent",
121+
"config": {
122+
"model": "us.amazon.nova-pro-v1:0",
123+
"system_prompt": "Process the classified input."
124+
}
125+
}
126+
],
127+
"edges": [
128+
{
129+
"from_node": "classifier",
130+
"to_node": "processor",
131+
"condition": {
132+
"type": "expression",
133+
"expression": "state.results.get('classifier', {}).get('status') == 'complete'"
134+
}
135+
}
136+
],
137+
"entry_points": ["classifier"]
138+
}
139+
}
140+
```
141+
142+
### Swarm Configuration
143+
```python
144+
config = {
145+
"swarm": {
146+
"max_handoffs": 20,
147+
"agents": [
148+
{
149+
"name": "researcher",
150+
"model": "us.amazon.nova-lite-v1:0",
151+
"system_prompt": "You are a research specialist."
152+
},
153+
{
154+
"name": "writer",
155+
"model": "us.amazon.nova-pro-v1:0",
156+
"system_prompt": "You are a writing specialist."
157+
}
158+
]
159+
}
160+
}
161+
```
162+
163+
## Schema Validation Benefits
164+
165+
### For Developers
166+
- **Real-time Validation**: Catch errors as you type in your IDE
167+
- **Autocompletion**: Get suggestions for configuration properties
168+
- **Type Safety**: Ensure correct data types and structure
169+
- **Documentation**: Schema serves as living documentation
170+
171+
### For Teams
172+
- **Consistency**: Enforced structure across all configurations
173+
- **Error Prevention**: Reduce runtime configuration errors
174+
- **Collaboration**: Clear configuration contracts between team members
175+
- **Maintenance**: Easier to update and maintain complex configurations
176+
29177
## Stability and Support
30178

31179
- **API Stability**: Experimental APIs may change between releases
32180
- **Documentation**: May be incomplete or subject to updates
33181
- **Support**: Community support through GitHub issues
34-
- **Migration**: Migration guides provided when features graduate to stable
182+
- **Schema Validation**: Production-ready validation system with comprehensive IDE support
35183

36184
## Feedback and Contributions
37185

38186
We encourage feedback on experimental features:
39187
- [GitHub Issues](https://github.com/strands-agents/sdk-python/issues)
40188
- [Discussions](https://github.com/strands-agents/sdk-python/discussions)
41189
- [Contributing Guide](https://github.com/strands-agents/sdk-python/blob/main/CONTRIBUTING.md)
190+
191+
## Next Steps
192+
193+
- [Configuration Loaders Overview](config-loader/overview.md) - Comprehensive guide to configuration loaders
194+
- [Agent Configuration](config-loader/agent-config.md) - Detailed agent configuration options
195+
- [Graph Configuration](config-loader/graph-config.md) - Multi-agent workflow configuration
196+
- [Swarm Configuration](config-loader/swarm-config.md) - Collaborative agent team configuration
197+
- [Tool Configuration](config-loader/tool-config.md) - Tool loading and agent-as-tool patterns
198+
- [Structured Output](config-loader/structured-output.md) - Structured data extraction configuration

0 commit comments

Comments
 (0)