forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshared-state-read-write.json
More file actions
77 lines (77 loc) · 2.84 KB
/
Copy pathshared-state-read-write.json
File metadata and controls
77 lines (77 loc) · 2.84 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
{
"_meta": {
"description": "D6 fixtures for langgraph-python / shared-state-read-write",
"sourceFile": "d5-all.json",
"created": "2026-05-21"
},
"fixtures": [
{
"match": {
"userMessage": "recall the user preference",
"turnIndex": 0,
"context": "langgraph-python"
},
"response": {
"content": "Per the read-only context the user prefers concise responses. The agent received this preference via the shared-state context and is honoring it without writing back to state."
}
},
{
"_comment": "shared-state-read-write — Greet pill. Matches on userMessage only; the systemMessage gate was too fragile (the middleware's output format varies by CopilotKit runtime version and system prompt ordering).",
"match": {
"userMessage": "Say hi and introduce yourself",
"turnIndex": 0,
"context": "langgraph-python"
},
"response": {
"content": "Hi — I'm your shared-state co-pilot. Your Preferences panel (name, tone, language, interests) is fed to me on every turn, and I jot notes back into the Agent Scratch Pad via set_notes so the UI re-renders. Try setting your name or asking me to remember something."
}
},
{
"_comment": "shared-state-read-write — Plan-a-weekend pill. Same no-systemMessage gate as the Greet pill.",
"match": {
"userMessage": "weekend plan based on my interests",
"turnIndex": 0,
"context": "langgraph-python"
},
"response": {
"content": "A weekend tailored to your interests panel: if you haven't picked any yet, try Cooking + Travel for a market-and-day-trip combo, or Tech + Books for a maker session and a long reading afternoon. Add interests in the Preferences panel and re-ask for a more specific plan."
}
},
{
"match": {
"userMessage": "remember that my favorite color is blue",
"hasToolResult": false,
"context": "langgraph-python"
},
"response": {
"toolCalls": [
{
"id": "call_d5_set_notes_001",
"name": "set_notes",
"arguments": "{\"notes\":[\"Favorite color: blue\"]}"
}
]
}
},
{
"match": {
"userMessage": "remember that my favorite color is blue",
"hasToolResult": true,
"context": "langgraph-python"
},
"response": {
"content": "Got it — I have noted that your favorite color is blue."
}
},
{
"_comment": "shared-state-write turn 2 — recall. No turnIndex gate: this is turn 2 of a 2-turn probe (turn 1 = set_notes, turn 2 = recall).",
"match": {
"userMessage": "favorite color",
"context": "langgraph-python"
},
"response": {
"content": "Your favorite color is blue — I noted it earlier."
}
}
]
}