You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/experimental/config-loader/agent-config.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Agent Configuration Loading
2
2
3
-
The Agent Configuration Loader enables you to create and configure Strands Agents using Python dictionaries. This approach provides a declarative way to define agent behavior, making it easier to manage complex agent configurations, version control agent definitions, and dynamically create agents at runtime.
3
+
The Agent Configuration Loader enables you to create and configure Strands Agents using Python dictionaries. This approach provides a programmatic way to define agent behavior, making it easier to manage complex agent configurations, build configuration management systems, and dynamically create agents at runtime.
4
4
5
-
**Note**: This is an experimental feature that provides programmatic configuration loading. For file-based configuration (YAML/JSON), use the main Agent constructor's `config` parameter.
5
+
**Note**: This is an experimental feature that provides programmatic configuration loading through dictionaries. For file-based configuration (YAML/JSON), use the main Agent constructor's `config` parameter.
Copy file name to clipboardExpand all lines: docs/experimental/config-loader/graph-config.md
+50-61Lines changed: 50 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
1
# GraphConfigLoader
2
2
3
-
The GraphConfigLoader enables serialization and deserialization of Strands `Graph` instances to/from YAML configurations, supporting persistence, version control, and dynamic graph construction. This implementation allows complex multi-agent workflows to be defined declaratively and managed as configuration.
3
+
The GraphConfigLoader enables serialization and deserialization of Strands `Graph` instances to/from dictionary configurations, supporting persistence, version control, and dynamic graph construction. This implementation allows complex multi-agent workflows to be defined programmatically and managed as configuration.
4
+
5
+
**Note**: This is an experimental feature that provides programmatic graph configuration loading through dictionaries. For file-based configuration, use the main Graph constructor's `config` parameter.
4
6
5
7
## Overview
6
8
7
9
The GraphConfigLoader provides functionality to:
8
-
- Load graphs from YAML/dictionary configurations
9
-
- Serialize existing graphs to YAML-compatible configurations
10
+
- Load graphs from dictionary configurations
11
+
- Serialize existing graphs to dictionary configurations
10
12
- Support all graph elements: nodes, edges, entry points, and conditions
11
13
- Maintain referential integrity between graph components
12
14
- Enable dynamic graph construction from configuration
@@ -17,12 +19,51 @@ The GraphConfigLoader provides functionality to:
17
19
### Method 1: Using GraphConfigLoader directly
18
20
19
21
```python
20
-
import yaml
21
22
from strands.experimental.config_loader.graph import GraphConfigLoader
22
23
23
-
# Load graph from YAML configuration
24
-
withopen('workflow.yml', 'r') as f:
25
-
config = yaml.safe_load(f)
24
+
# Define graph configuration
25
+
config = {
26
+
"graph_id": "research_workflow",
27
+
"name": "Research Team Workflow",
28
+
"description": "Processes research requests through specialized team members",
0 commit comments