forked from google/adk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroot_agent.yaml
More file actions
42 lines (34 loc) · 1015 Bytes
/
root_agent.yaml
File metadata and controls
42 lines (34 loc) · 1015 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# yaml-language-server: $schema=https://raw.githubusercontent.com/google/adk-python/refs/heads/main/src/google/adk/agents/config_schemas/AgentConfig.json
agent_class: GraphAgent
name: validation_pipeline
description: Data validation pipeline with conditional routing
# Define start and end nodes
start_node: validate
end_nodes:
- process
- error
# Maximum iterations for cyclic graphs (default: 20)
max_iterations: 10
# Node definitions
nodes:
- name: validate
sub_agents:
- code: agents.validator
- name: process
sub_agents:
- code: agents.processor
- name: error
sub_agents:
- code: agents.error_handler
# Edge definitions with conditional routing
edges:
# If validation passes -> process
- source_node: validate
target_node: process
condition: "data.get('valid', False) is True"
priority: 1
# If validation fails -> error handler
- source_node: validate
target_node: error
condition: "data.get('valid', False) is False"
priority: 1