/ examples / gateways / test_gateway_workflow.yaml
test_gateway_workflow.yaml
  1  log:
  2    stdout_log_level: INFO
  3    log_file_level: DEBUG
  4    log_file: test_gateway_workflow.log
  5  
  6  !include ../shared_config.yaml
  7  
  8  apps:
  9    # Simple echo agent that just returns input as output
 10    - name: simple_echo_agent
 11      app_base_path: .
 12      app_module: solace_agent_mesh.agent.sac.app
 13      broker:
 14        <<: *broker_connection
 15  
 16      app_config:
 17        namespace: ${NAMESPACE}
 18        agent_name: "SimpleEchoAgent"
 19        model: *planning_model
 20        model_provider: 
 21          - "planning"
 22  
 23        instruction: |
 24          Echo back the input data.
 25          1. Read the input data
 26          2. Create a JSON artifact with the same data plus a "status" field set to "echoed"
 27          3. End with: <<result:artifact=<artifact_name> status=success>>
 28  
 29        input_schema:
 30          type: object
 31          additionalProperties: true
 32  
 33        output_schema:
 34          type: object
 35          additionalProperties: true
 36  
 37        tools:
 38          - tool_type: builtin-group
 39            group_name: "artifact_management"
 40  
 41        session_service:
 42          <<: *default_session_service
 43        artifact_service:
 44          <<: *default_artifact_service
 45  
 46        agent_card:
 47          description: "Echoes back the input data"
 48          skills: [{id: "echo", name: "Echo", description: "Echoes input data", tags: ["echo", "test"]}]
 49        agent_card_publishing: { interval_seconds: 10 }
 50        agent_discovery: { enabled: false }
 51  
 52    # Simple workflow that calls the echo agent
 53    - name: simple_test_workflow
 54      app_base_path: .
 55      app_module: solace_agent_mesh.workflow.app
 56      broker:
 57        <<: *broker_connection
 58  
 59      app_config:
 60        namespace: ${NAMESPACE}
 61        agent_name: "SimpleTestWorkflow"
 62        display_name: "Simple Test Workflow"
 63  
 64        workflow:
 65          version: "1.0.0"
 66          description: "A simple workflow for testing the gateway"
 67          max_call_depth: 5
 68  
 69          input_schema:
 70            type: object
 71            additionalProperties: true
 72  
 73          output_schema:
 74            type: object
 75            additionalProperties: true
 76  
 77          nodes:
 78            - id: echo_step
 79              type: agent
 80              agent_name: "SimpleEchoAgent"
 81              input:
 82                data: "{{workflow.input}}"
 83  
 84          output_mapping:
 85            result: "{{echo_step.output}}"
 86            input_received: "{{workflow.input}}"
 87  
 88          skills:
 89            - id: "test_workflow"
 90              name: "Test Workflow"
 91              description: "Simple workflow for gateway testing"
 92              tags: ["test", "gateway"]
 93  
 94        session_service:
 95          <<: *default_session_service
 96        artifact_service:
 97          <<: *default_artifact_service
 98  
 99        agent_card_publishing: { interval_seconds: 10 }
100        agent_discovery: { enabled: false }
101  
102    # Agent that intentionally fails for error path testing
103    - name: error_agent
104      app_base_path: .
105      app_module: solace_agent_mesh.agent.sac.app
106      broker:
107        <<: *broker_connection
108  
109      app_config:
110        namespace: ${NAMESPACE}
111        agent_name: "ErrorTestAgent"
112        model: *planning_model
113        model_provider: 
114          - "planning"
115  
116        instruction: |
117          You are an agent for testing error handling.
118  
119          IMPORTANT: You MUST intentionally fail by using the result embed with status=error.
120  
121          When you receive any input:
122          1. Read the input data to see what error message is requested (if any)
123          2. Always respond with: «result:artifact=none status=error message="Intentional test error: <reason>"»
124  
125          If the input contains an "error_message" field, use that as the reason.
126          Otherwise, use "Default test failure" as the reason.
127  
128          DO NOT create any artifacts. DO NOT succeed. Your job is to fail.
129  
130        input_schema:
131          type: object
132          properties:
133            error_message:
134              type: string
135              description: "Custom error message to return"
136          additionalProperties: true
137  
138        output_schema:
139          type: object
140          additionalProperties: true
141  
142        tools:
143          - tool_type: builtin-group
144            group_name: "artifact_management"
145  
146        session_service:
147          <<: *default_session_service
148        artifact_service:
149          <<: *default_artifact_service
150  
151        agent_card:
152          description: "Agent that intentionally fails for error testing"
153          skills: [{id: "error_test", name: "Error Test", description: "Always fails with an error", tags: ["error", "test"]}]
154        agent_card_publishing: { interval_seconds: 10 }
155        agent_discovery: { enabled: false }
156  
157    # Workflow that calls the error agent to test error handling
158    - name: error_test_workflow
159      app_base_path: .
160      app_module: solace_agent_mesh.workflow.app
161      broker:
162        <<: *broker_connection
163  
164      app_config:
165        namespace: ${NAMESPACE}
166        agent_name: "ErrorTestWorkflow"
167        display_name: "Error Test Workflow"
168  
169        workflow:
170          version: "1.0.0"
171          description: "A workflow that intentionally fails for testing error paths"
172          max_call_depth: 5
173  
174          input_schema:
175            type: object
176            properties:
177              error_message:
178                type: string
179                description: "Custom error message to trigger"
180            additionalProperties: true
181  
182          output_schema:
183            type: object
184            additionalProperties: true
185  
186          nodes:
187            - id: trigger_error
188              type: agent
189              agent_name: "ErrorTestAgent"
190              input:
191                error_message: "{{workflow.input.error_message}}"
192                test_data: "{{workflow.input}}"
193  
194          output_mapping:
195            result: "{{trigger_error.output}}"
196            input_received: "{{workflow.input}}"
197  
198          skills:
199            - id: "error_test_workflow"
200              name: "Error Test Workflow"
201              description: "Workflow for testing error handling"
202              tags: ["error", "test"]
203  
204        session_service:
205          <<: *default_session_service
206        artifact_service:
207          <<: *default_artifact_service
208  
209        agent_card_publishing: { interval_seconds: 10 }
210        agent_discovery: { enabled: false }