Skip to content

Commit 379d042

Browse files
committed
fix: update READMEs with new agent changes
1 parent a72bc58 commit 379d042

File tree

2 files changed

+33
-73
lines changed
  • force-app/main
    • 02_actionConfiguration/actionDefinitions
    • 04_architecturalPatterns/multiTopicNavigation

2 files changed

+33
-73
lines changed

force-app/main/02_actionConfiguration/actionDefinitions/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ get_forecast:
224224
days: number
225225
description: "Number of days to include in the forecast (1-10)"
226226
outputs:
227-
forecast_data: list[object]
227+
forecast_data: list[string]
228228
description: "List of daily forecast objects containing temperature, conditions, and precipitation data"
229229
target: "flow://GetWeatherForecast"
230230
```
@@ -259,6 +259,16 @@ reasoning:
259259
else:
260260
| - Location: None specified
261261
262+
if @variables.current_temperature > 0:
263+
| - Temperature: {[email protected]_temperature}
264+
else:
265+
| - Temperature: Not fetched
266+
267+
if @variables.conditions:
268+
| - Conditions: {[email protected]}
269+
else:
270+
| - Conditions: Not fetched
271+
262272
| When a user asks about weather:
263273
1. Identify the location they're asking about
264274
2. Use {[email protected]_current_weather} to fetch current conditions

force-app/main/04_architecturalPatterns/multiTopicNavigation/README.md

Lines changed: 22 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ Move between topics using `@utils.transition to @topic.name`:
7575
```agentscript
7676
reasoning:
7777
actions:
78-
proceed_to_booking: @utils.transition to @topic.hotel_booking
79-
description: "Move to booking when user wants to reserve a hotel"
78+
browse_hotels: @utils.transition to @topic.hotel_browse
79+
description: "Browse and search for available hotels"
8080
```
8181

8282
### Conditional Transition Availability
@@ -98,27 +98,11 @@ Transition after an action completes using `transition to`:
9898
actions:
9999
create_booking: @actions.create_booking
100100
with hotel_name=...
101-
with [email protected]_in_date
102-
with [email protected]_out_date
103-
set @variables.hotel_name = @inputs.hotel_name
104-
set @variables.booking_id = @outputs.booking_id
105-
set @variables.booking_confirmed = True
106-
# Automatically move to confirmation after booking
107-
transition to @topic.hotel_confirmation
108-
```
109-
110-
### Storing Action Inputs
111-
112-
Capture inputs that the LLM provides:
113-
114-
```agentscript
115-
actions:
116-
search_hotels: @actions.search_hotels
117-
with location=...
118101
with check_in=...
119102
with check_out=...
120-
set @variables.check_in_date = @inputs.check_in
121-
set @variables.check_out_date = @inputs.check_out
103+
set @variables.booking_id = @outputs.booking_id
104+
set @variables.booking_confirmed = @outputs.success
105+
transition to @topic.hotel_confirmation
122106
```
123107

124108
## Key Code Snippets
@@ -141,36 +125,29 @@ topic hotel_browse:
141125
description: "Check-out date in ISO format (YYYY-MM-DD)"
142126
outputs:
143127
hotels: list[object]
144-
description: "List of available hotel objects"
128+
description: "List of available hotel objects with name, price, rating, and amenities information"
129+
complex_data_type_name: "lightning__recordInfoType" # This is the name of the complex data type that is used to store the hotel objects
145130
target: "flow://SearchHotels"
146131
147132
reasoning:
148133
instructions:->
149-
| Help users find the perfect hotel.
150-
151-
Current search criteria:
134+
| Help users find the perfect hotel using {[email protected]_hotels}.
152135
153-
if @variables.check_in_date:
154-
| - Check-in: {[email protected]_in_date}
155-
else:
156-
| - Check-in: Not set
136+
Ensure to ask the user for:
137+
- location
138+
- check-in date
139+
- check-out date
157140
158-
if @variables.check_out_date:
159-
| - Check-out: {[email protected]_out_date}
160-
else:
161-
| - Check-out: Not set
141+
Do not ask for other booking details.
162142
163-
| When users are ready to book, use the proceed_to_booking action.
143+
If you find available hotels provide the user the hotel information.
164144
165145
actions:
166146
search_hotels: @actions.search_hotels
167147
with location=...
168148
with check_in=...
169149
with check_out=...
170150
transition to @topic.hotel_booking
171-
172-
proceed_to_booking: @utils.transition to @topic.hotel_booking
173-
description: "Move to booking when user wants to reserve a hotel"
174151
```
175152

176153
### Complete Topic: Hotel Booking
@@ -186,31 +163,19 @@ topic hotel_booking:
186163
hotel_name: string
187164
description: "Name of the hotel to book"
188165
check_in: string
189-
description: "Check-in date"
166+
description: "Check-in date in ISO format (YYYY-MM-DD)"
190167
check_out: string
191-
description: "Check-out date"
168+
description: "Check-out date in ISO format (YYYY-MM-DD)"
192169
outputs:
193170
booking_id: string
194171
description: "Unique booking confirmation identifier"
195172
success: boolean
196-
description: "Whether the booking was created successfully"
173+
description: "Indicates whether the booking was created successfully"
197174
target: "flow://CreateBooking"
198175
199176
reasoning:
200177
instructions:->
201-
| Complete the booking for the customer.
202-
203-
Booking details:
204-
205-
if @variables.hotel_name:
206-
| - Hotel: {[email protected]_name}
207-
else:
208-
| - Hotel: Not selected
209-
210-
| - Check-in: {[email protected]_in_date}
211-
- Check-out: {[email protected]_out_date}
212-
213-
| Once booking is complete, transition to hotel_confirmation topic.
178+
| Complete the booking for the customer using {[email protected]_booking}.
214179
215180
actions:
216181
create_booking: @actions.create_booking
@@ -220,9 +185,6 @@ topic hotel_booking:
220185
set @variables.booking_id = @outputs.booking_id
221186
set @variables.booking_confirmed = @outputs.success
222187
transition to @topic.hotel_confirmation
223-
224-
go_to_confirmation: @utils.transition to @topic.hotel_confirmation
225-
description: "Move to confirmation after successful booking"
226188
```
227189

228190
### Complete Topic: Hotel Confirmation
@@ -240,7 +202,7 @@ topic hotel_confirmation:
240202
- Hotel: {[email protected]_name}
241203
- Check-in: {[email protected]_in_date}
242204
- Check-out: {[email protected]_out_date}
243-
205+
244206
Provide these details to the customer and ask if they need anything else.
245207
If they want to make another booking, use start_new_booking action.
246208
@@ -275,7 +237,7 @@ User: I'll take the Bay View Hotel
275237
Agent: Excellent choice! Let me help you book the Bay View Hotel.
276238
```
277239

278-
**[Agent calls proceed_to_booking → transitions to hotel_booking]**
240+
**[Agent calls search_hotels action → transitions to hotel_booking]**
279241

280242
```text
281243
Agent: I'm ready to complete your booking at Bay View Hotel.
@@ -351,8 +313,8 @@ Good for: Exploratory interfaces, comparison shopping
351313
**Good:**
352314

353315
```agentscript
354-
proceed_to_booking: @utils.transition to @topic.hotel_booking
355-
description: "Move to booking when user wants to reserve a hotel"
316+
start_new_booking: @utils.transition to @topic.hotel_browse
317+
description: "Start a new hotel search and booking"
356318
```
357319

358320
**Poor:**
@@ -362,18 +324,6 @@ go_next: @utils.transition to @topic.next
362324
description: "Go next"
363325
```
364326

365-
### State Management
366-
367-
Store state in variables before transitioning:
368-
369-
```agentscript
370-
actions:
371-
search_hotels: @actions.search_hotels
372-
with check_in=...
373-
set @variables.check_in_date = @inputs.check_in
374-
# State preserved for next topic
375-
```
376-
377327
## What's Next
378328

379329
- **TopicDelegation**: Learn about delegation (consulting other topics)

0 commit comments

Comments
 (0)