forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtool-rendering-reasoning-chain.json
More file actions
197 lines (197 loc) · 11.4 KB
/
Copy pathtool-rendering-reasoning-chain.json
File metadata and controls
197 lines (197 loc) · 11.4 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
{
"_meta": {
"description": "D6 fixtures for langgraph-python / tool-rendering-reasoning-chain",
"sourceFile": "d5-all.json",
"created": "2026-05-21"
},
"fixtures": [
{
"_comment": "tool-rendering-reasoning-chain pill 1 (stocks) — final narration after the MSFT tool result lands. Specific toolCallId so this matches BEFORE the first-leg fixture below despite the same userMessage substring. Source: showcase/harness/fixtures/d5/tool-rendering-reasoning-chain.json.",
"match": {
"userMessage": "Compare AAPL and MSFT stocks",
"toolCallId": "call_rc_stock_msft_001",
"context": "langgraph-python"
},
"response": {
"content": "AAPL is at $338.37 (-2.96% on the day) while MSFT is at $412.18 (+1.08%). MSFT is outpacing AAPL by roughly 4 points today — strong day for MSFT, rough one for AAPL."
}
},
{
"_comment": "tool-rendering-reasoning-chain pill 1 (stocks) — second leg: after get_stock_price(AAPL) returns, chain to MSFT for the comparison.",
"match": {
"userMessage": "Compare AAPL and MSFT stocks",
"toolCallId": "call_rc_stock_aapl_001",
"context": "langgraph-python"
},
"response": {
"reasoning": "AAPL quote is in hand. The user explicitly asked to compare AAPL with MSFT, so I'll fetch MSFT next and then summarize the side-by-side.",
"content": "Now pulling MSFT to complete the comparison.",
"toolCalls": [
{
"id": "call_rc_stock_msft_001",
"name": "get_stock_price",
"arguments": "{\"ticker\":\"MSFT\",\"price_usd\":412.18,\"change_pct\":1.08}"
}
]
},
"chunkSize": 9999
},
{
"_comment": "tool-rendering-reasoning-chain pill 1 (stocks) — first leg: emit get_stock_price(AAPL). The `Compare AAPL and MSFT stocks` substring is unique to this demo's pill prompt — other integrations' reasoning-chain demos still send the older `How is AAPL doing?` prompt — so we don't need a tool-name gate and the fixture stays scoped to langgraph-python without affecting fleet-wide aimock traffic. MUST appear before the bare 'AAPL' fixtures later in this file.",
"match": {
"userMessage": "Compare AAPL and MSFT stocks",
"context": "langgraph-python"
},
"response": {
"reasoning": "The user asked to compare AAPL and MSFT. I'll fetch AAPL first, then MSFT, then summarize the deltas in a single sentence so the comparison is the punchline.",
"content": "Pulling the AAPL quote first.",
"toolCalls": [
{
"id": "call_rc_stock_aapl_001",
"name": "get_stock_price",
"arguments": "{\"ticker\":\"AAPL\",\"price_usd\":338.37,\"change_pct\":-2.96}"
}
]
},
"chunkSize": 9999
},
{
"_comment": "tool-rendering-reasoning-chain pill 2 (dice) — final narration after the d6 contrast roll lands. userMessage is the LANGGRAPH-PYTHON-UNIQUE tail of the pill prompt ('compare it to a smaller one'); other integrations' reasoning-chain demos still send the older 'Roll a 20-sided die for me.' (no period-after-die substring match against 'Roll a 20-sided die.') which lacks this suffix — so this fixture stays scoped to this demo and does NOT hijack the older 5x roll_d20 fixtures further down in this file.",
"match": {
"userMessage": "compare it to a smaller one",
"toolCallId": "call_rc_dice_d6_001",
"context": "langgraph-python"
},
"response": {
"content": "The d20 came up 14, and a d6 for contrast landed on 4 — the d20's range is much wider, which is the whole point of the comparison."
}
},
{
"_comment": "tool-rendering-reasoning-chain pill 2 (dice) — second leg: after roll_dice(sides=20) returns, chain a smaller die for contrast.",
"match": {
"userMessage": "compare it to a smaller one",
"toolCallId": "call_rc_dice_d20_001",
"context": "langgraph-python"
},
"response": {
"reasoning": "Got the d20 result. The user explicitly asked to compare it to a smaller die — a d6 is a natural choice because its 1-6 range is what most people picture when they think 'die'. Rolling that next.",
"content": "Now rolling a d6 for contrast.",
"toolCalls": [
{
"id": "call_rc_dice_d6_001",
"name": "roll_dice",
"arguments": "{\"sides\":6}"
}
]
},
"chunkSize": 9999
},
{
"_comment": "tool-rendering-reasoning-chain pill 2 (dice) — first leg: emit roll_dice(sides=20). Unique substring 'compare it to a smaller one' keeps us scoped to this demo (other integrations' dice pills still send 'Roll a 20-sided die for me.' and fall through to the older 5x roll_d20 fixtures further down). NB: aimock's `toolName` gate is a tool-LIST gate, not a tool-CALL gate; we don't use it here because the reasoning-chain agents across the fleet all register `roll_dice`, so a `toolName: roll_dice` claim would NOT have distinguished this demo from the others.",
"match": {
"userMessage": "compare it to a smaller one",
"context": "langgraph-python"
},
"response": {
"reasoning": "The user asked for a d20 roll and wants to compare it against a smaller die. I'll roll the d20 first, then chain a smaller die so the contrast in possible-value ranges is concrete and observable.",
"content": "Rolling the d20 now.",
"toolCalls": [
{
"id": "call_rc_dice_d20_001",
"name": "roll_dice",
"arguments": "{\"sides\":20}"
}
]
},
"chunkSize": 9999
},
{
"_comment": "tool-rendering-reasoning-chain pill 3 (flights + destination weather) — final narration after get_weather(JFK) lands. userMessage is the LANGGRAPH-PYTHON-UNIQUE tail 'show me the weather there'; the basic tool-rendering demos AND every other integration's reasoning-chain demo still send 'Find flights from SFO to JFK.' (no destination-weather request) which lacks this substring, so this fixture stays scoped to this demo without affecting fleet-wide aimock traffic.",
"match": {
"userMessage": "show me the weather there",
"toolCallId": "call_rc_weather_jfk_001",
"context": "langgraph-python"
},
"response": {
"content": "Three flights from SFO to JFK — United UA231 at 08:15 ($348), Delta DL412 at 11:20 ($312), and JetBlue B6722 at 17:05 ($289). JFK is currently 68°F and sunny — easy travel weather on the receiving end."
}
},
{
"_comment": "tool-rendering-reasoning-chain pill 3 (flights + destination weather) — second leg: after search_flights(SFO,JFK) returns, chain to destination weather.",
"match": {
"userMessage": "show me the weather there",
"toolCallId": "call_rc_flights_jfk_001",
"context": "langgraph-python"
},
"response": {
"reasoning": "Flights are in hand. The user explicitly asked for the destination weather as part of the request, so pulling JFK weather next to round out the trip plan.",
"content": "Pulling JFK weather to round out the trip plan.",
"toolCalls": [
{
"id": "call_rc_weather_jfk_001",
"name": "get_weather",
"arguments": "{\"location\":\"JFK\"}"
}
]
},
"chunkSize": 9999
},
{
"_comment": "tool-rendering-reasoning-chain pill 3 (flights + destination weather) — first leg: emit search_flights(SFO,JFK). The 'show me the weather there' substring is unique to this demo's pill, so the basic tool-rendering demo's bare 'Find flights from SFO to JFK.' prompt (and the equivalent prompts in other integrations' reasoning-chain demos that have not yet been ported to the chained phrasing) flow through to the basic single-tool flights fixture later in the file.",
"match": {
"userMessage": "show me the weather there",
"context": "langgraph-python"
},
"response": {
"reasoning": "The user wants flights from SFO to JFK AND the destination weather. I'll call search_flights first, then chain get_weather on JFK so they have flight options and arrival conditions in one reply.",
"content": "Searching SFO→JFK flights.",
"toolCalls": [
{
"id": "call_rc_flights_jfk_001",
"name": "search_flights",
"arguments": "{\"origin\":\"SFO\",\"destination\":\"JFK\"}"
}
]
},
"chunkSize": 9999
},
{
"_comment": "tool-rendering pill: Find flights — first leg (verbatim pill prompt, dedicated search_flights fixture). MUST take precedence over the a2ui beautiful-chat fixture below (which uses the same tool name with non-flight-list args shape). Intentionally omits `hasToolResult` so this fixture also matches when SFO/JFK is the SECOND turn of a multi-turn flow (e.g. tool-rendering-reasoning-chain probe sends weather→flights). With `hasToolResult: false`, Turn 1's tool result would prevent this fixture from matching Turn 2's first leg, and the matcher would fall through to the second-leg fixture above (which now requires a matching `toolCallId` so it cannot swallow this request).",
"match": {
"userMessage": "Find flights from SFO to JFK.",
"turnIndex": 0,
"context": "langgraph-python"
},
"response": {
"toolCalls": [
{
"id": "call_tr_flights_sfo_jfk_001",
"name": "search_flights",
"arguments": "{\"origin\":\"SFO\",\"destination\":\"JFK\"}"
}
]
},
"chunkSize": 9999
},
{
"_comment": "D5 mcp-apps probe — verbatim probe prompt drives a real `create_view` MCP tool call so the runtime's MCP Apps middleware fetches the UI resource and mounts the iframe. Mirrored in showcase/harness/fixtures/d5/mcp-apps.json. Non-empty `content` is load-bearing (see tool-rendering-reasoning-chain.json header).",
"match": {
"userMessage": "Open Excalidraw and sketch a system diagram",
"toolName": "create_view",
"context": "langgraph-python"
},
"response": {
"reasoning": "The user wants a sketch of a client/server/database architecture. I'll call create_view once with three labelled rectangles connected by arrows and a title, framed by a cameraUpdate.",
"content": "Sketching a client → server → database diagram in Excalidraw.",
"toolCalls": [
{
"id": "call_d5_mcp_apps_create_view_001",
"name": "create_view",
"arguments": "{\"elements\":[{\"id\":\"title\",\"type\":\"text\",\"x\":260,\"y\":40,\"text\":\"System Diagram\",\"fontSize\":24},{\"id\":\"client\",\"type\":\"rectangle\",\"x\":80,\"y\":160,\"width\":160,\"height\":70,\"label\":{\"text\":\"Client\",\"fontSize\":18}},{\"id\":\"server\",\"type\":\"rectangle\",\"x\":320,\"y\":160,\"width\":160,\"height\":70,\"label\":{\"text\":\"Server\",\"fontSize\":18}},{\"id\":\"database\",\"type\":\"rectangle\",\"x\":560,\"y\":160,\"width\":160,\"height\":70,\"label\":{\"text\":\"Database\",\"fontSize\":18}},{\"id\":\"a1\",\"type\":\"arrow\",\"x\":240,\"y\":195,\"endX\":320,\"endY\":195},{\"id\":\"a2\",\"type\":\"arrow\",\"x\":480,\"y\":195,\"endX\":560,\"endY\":195},{\"id\":\"camera\",\"type\":\"cameraUpdate\",\"x\":40,\"y\":0,\"width\":800,\"height\":600}]}"
}
]
},
"chunkSize": 9999
}
]
}