88 lines
3.4 KiB
JSON
88 lines
3.4 KiB
JSON
{
|
|
"_meta": {
|
|
"description": "D6 fixtures for langgraph-fastapi / shared-state-read-write",
|
|
"sourceFile": "d5-all.json",
|
|
"copiedFrom": "langgraph-python",
|
|
"created": "2026-05-21"
|
|
},
|
|
"fixtures": [
|
|
{
|
|
"match": {
|
|
"userMessage": "recall the user preference",
|
|
"turnIndex": 0,
|
|
"context": "langgraph-fastapi"
|
|
},
|
|
"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-fastapi"
|
|
},
|
|
"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-fastapi"
|
|
},
|
|
"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-fastapi"
|
|
},
|
|
"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-fastapi"
|
|
},
|
|
"response": {
|
|
"content": "Got it — I have noted that your favorite color is blue."
|
|
}
|
|
},
|
|
{
|
|
"match": {
|
|
"userMessage": "favorite color",
|
|
"turnIndex": 0,
|
|
"context": "langgraph-fastapi"
|
|
},
|
|
"response": {
|
|
"content": "Your favorite color is blue — I noted it earlier."
|
|
}
|
|
},
|
|
{
|
|
"_comment": "shared-state-read-write — 'What is my favorite color?' recall pill, ungated fallback. In multi-pill demo sessions a PRIOR pill (e.g. set_notes) already left assistant/tool messages in the thread, so turnIndex (thread-global assistant count) is not 0 and the turnIndex:0 fixture above is skipped → strict 503. This content-only fallback matches regardless of thread history; it carries no toolCalls so it is loop-safe and never re-emits a tool.",
|
|
"match": {
|
|
"userMessage": "favorite color",
|
|
"context": "langgraph-fastapi"
|
|
},
|
|
"response": {
|
|
"content": "Your favorite color is blue — I noted it earlier."
|
|
}
|
|
}
|
|
]
|
|
} |