showcase/integrations/ag2/qa/shared-state-read-write.md
/demos/shared-state-read-write/api/copilotkit GET → agent_status: reachable)OPENAI_API_KEY setshared-state-read-write agent is mounted at /shared-state-read-write on
the FastAPI server (see src/agent_server.py)/demos/shared-state-read-writedata-testid="preferences-card")data-testid="notes-card") with the
empty state copy "No notes yet. Ask the agent to remember something."<CopilotChat /> with the placeholder
"Chat with the agent..."name: "", tone: "casual", language: "English", interests: []Atai) into the Name input. The "Shared state"
JSON inside the card updates immediately to reflect the new name.playful. JSON updates.Spanish. JSON updates.Cooking, Tech). JSON updates and the
buttons show the selected style.data-testid="note-item"),
reflecting the two facts above. The list updates in real time
while/after the agent finishes its turn.set_notes, not just the new one).agent.setState), confirming the UI's write-back was
visible to the agent on its next turn.set_notes call from the agent.