Commit 0791dc2
committed
Complete ConfigLoader system implementation with cache-free architecture
Comprehensive ConfigLoader system implementation providing configuration-driven agent development:
Core ConfigLoader Classes:
- AgentConfigLoader: Agent configuration with models, tools, structured output
- GraphConfigLoader: Graph-based workflows with nodes, edges, conditions
- SwarmConfigLoader: Multi-agent swarm coordination and management
- ToolConfigLoader: Tool configuration including Agent-as-Tool, Swarm-as-Tool, Graph-as-Tool
Key Features Implemented:
- Cache-free architecture: Simplified API without caching complexity
- Top-level key requirements: Enforced schema validation (agent:, graph:, swarm:, tools:)
- JSON Schema validation: Complete schema system with IDE integration
- Structured output support: Pydantic model generation and validation
- Multi-agent tools: Agents, Swarms, and Graphs as reusable tools
- Advanced patterns: Nested configurations, parameter substitution, conditional routing
Implementation Details:
Agent Configuration:
- Model configuration with provider-specific settings
- Tool integration with custom and built-in tools
- Structured output with automatic Pydantic model generation
- Schema registry for output validation and type safety
- PydanticFactory for dynamic model creation from JSON schemas
Graph Configuration:
- Node and edge definition with flexible routing
- Conditional execution with custom condition functions
- Entry point specification for workflow initiation
- Parallel and sequential execution patterns
- Complex workflow orchestration capabilities
Swarm Configuration:
- Multi-agent coordination and communication
- Agent role definition and responsibility assignment
- Swarm-level configuration and management
- Inter-agent communication patterns
Tool Configuration:
- Multi-agent tool patterns (Agent-as-Tool, Swarm-as-Tool, Graph-as-Tool)
- Tool composition and nesting capabilities
- Parameter passing and configuration inheritance
- Future MCP (Model Context Protocol) integration planning
Schema System:
- Complete JSON Schema for all configuration types
- IDE integration with VSCode, IntelliJ, Vim support
- Real-time validation and autocompletion
- Schema documentation and examples
- Comprehensive error handling and validation
Testing Infrastructure:
- 113 comprehensive tests covering all functionality
- Integration tests for multi-agent scenarios
- Structured output validation tests
- Schema registry and PydanticFactory tests
- Multi-agent tool integration tests
- Object independence validation (cache-free verification)
Breaking Changes from Cache Removal:
- Removed cache_key parameters from all load_* methods
- Removed clear_cache() methods from all loaders
- Removed get_available_* methods from all loaders
- Simplified API with predictable behavior (each load creates fresh objects)
Migration Benefits:
- Cleaner code: ~200+ lines of cache complexity removed
- Predictable behavior: No cache state management needed
- Easier debugging: No cache-related side effects
- Reduced memory usage: No indefinite object retention
- Immediate configuration change reflection
- Simplified testing and development
Production Quality:
- Comprehensive error handling and validation
- Type safety with Pydantic integration
- Extensive test coverage (113 passing tests)
- Clean, maintainable architecture
- Professional API design
- Complete documentation and examples
Future Extensibility:
- MCP integration planning for advanced tool loading
- Extensible schema system for custom configurations
- Plugin architecture for custom loaders
- Advanced workflow patterns and orchestration
This ConfigLoader system enables configuration-driven agent development with world-class developer experience, comprehensive validation, and production-ready reliability.1 parent 8c63d75 commit 0791dc2
File tree
39 files changed
+8902
-170
lines changed- src/strands
- agent
- event_loop
- experimental/config_loader
- agent
- graph
- schema
- swarm
- tools
- telemetry
- types
- tests/strands
- agent
- event_loop
- experimental/config_loader
- agent
- graph
- swarm
- tools
- telemetry
39 files changed
+8902
-170
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
95 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
| |||
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 112 | + | |
151 | 113 | | |
152 | 114 | | |
153 | 115 | | |
| |||
159 | 121 | | |
160 | 122 | | |
161 | 123 | | |
162 | | - | |
| 124 | + | |
163 | 125 | | |
164 | 126 | | |
165 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
645 | 648 | | |
646 | | - | |
| 649 | + | |
647 | 650 | | |
648 | 651 | | |
649 | 652 | | |
| |||
653 | 656 | | |
654 | 657 | | |
655 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
656 | 666 | | |
657 | 667 | | |
658 | 668 | | |
659 | 669 | | |
660 | 670 | | |
661 | 671 | | |
662 | 672 | | |
663 | | - | |
| 673 | + | |
664 | 674 | | |
665 | 675 | | |
666 | 676 | | |
| |||
717 | 727 | | |
718 | 728 | | |
719 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
720 | 749 | | |
721 | 750 | | |
722 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
204 | 203 | | |
205 | 204 | | |
206 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
| |||
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
266 | | - | |
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| |||
272 | 275 | | |
273 | 276 | | |
274 | 277 | | |
275 | | - | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| |||
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
315 | | - | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments