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: force-app/main/04_architecturalPatterns/advancedReasoningPatterns/aiAuthoringBundles/AdvancedReasoningPatterns/AdvancedReasoningPatterns.agent
+91-92Lines changed: 91 additions & 92 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,14 @@
1
-
# AdvancedReasoningPatterns
2
1
# Demonstrates complex dynamic reasoning with multiple data sources
2
+
system:
3
+
messages:
4
+
welcome: "Welcome! I provide personalized insights based on your complete customer profile."
5
+
error: "I had trouble performing the action. Please try again."
6
+
instructions: "You are an advanced agent that synthesizes multiple data sources for intelligent recommendations."
3
7
4
8
config:
5
-
agent_name: "AdvancedReasoningPatterns"
6
-
agent_label: "AdvancedReasoningPatterns"
7
-
description: "Demonstrates advanced reasoning with dynamic instructions and complex logic"
9
+
agent_name: "AdvancedReasoningPatterns"
10
+
agent_label: "AdvancedReasoningPatterns"
11
+
description: "Demonstrates advanced reasoning with dynamic instructions and complex logic"
8
12
9
13
variables:
10
14
# User context
@@ -31,12 +35,6 @@ variables:
31
35
recommended_actions: mutable object = {}
32
36
description: "AI-generated list of recommended next actions for the customer"
33
37
34
-
system:
35
-
messages:
36
-
welcome: "Welcome! I provide personalized insights based on your complete customer profile."
37
-
error: "I had trouble performing the action. Please try again."
38
-
instructions: "You are an advanced agent that synthesizes multiple data sources for intelligent recommendations."
39
-
40
38
start_agent topic_selector:
41
39
description: "Welcome users and begin providing intelligent insights"
42
40
@@ -49,6 +47,88 @@ start_agent topic_selector:
49
47
topic intelligent_insights:
50
48
description: "Provides intelligent insights by synthesizing multiple data sources including your profile, account data, order history, and support tickets. Let me know your customer ID to load your complete customer intelligence dashboard."
set @variables.recommended_actions = @outputs.recommendations
83
+
84
+
reasoning:
85
+
# Build dynamic instructions based on loaded data
86
+
instructions: ->
87
+
| Customer Intelligence Dashboard
88
+
89
+
if @variables.user_id=="":
90
+
| Ask the user for customer ID to view personalized insights. Do not proceed until you have the customer ID.
91
+
Use {[email protected]_user_id} to update the user_id variable and set context. Once you have the user Id use {[email protected]_customer_data} to refresh the dashboard.
92
+
93
+
if @variables.user_id!="" and @variables.user_profile:
0 commit comments