showcase/integrations/ms-agent-dotnet/qa/shared-state-read-write.md
/demos/shared-state-read-write on the dashboard host/api/health); GitHubToken (or equivalent) is set on the Railway deployment so the OpenAI client can authenticate; the /shared-state-read-write AG-UI endpoint is mounted in agent/Program.cs/demos/shared-state-read-write; verify the page renders within 3s with the left sidebar (preferences + notes cards) and the right-side CopilotChat panedata-testid="preferences-card" is visible with heading "Your preferences"data-testid="notes-card" is visible with heading "Agent notes" and the empty-state data-testid="notes-empty" reading "No notes yet. Ask the agent to remember something."agent.setState)data-testid="pref-name"; verify data-testid="pref-state-json" updates to include "name": "Atai"data-testid="pref-tone" to formal; verify the JSON preview reflects "tone": "formal"data-testid="pref-language" to Spanish; verify the JSON preview reflects "language": "Spanish"Cooking and Travel interest pills; verify both show the selected style (border #BEC2FF, bg #BEC2FF1A) and the JSON preview's interests array contains both entriesSharedStateReadWriteAgent injects them into the system prompt each turn)set_notes tool)data-testid="notes-list" appears in the notes card and contains at least 2 data-testid="note-item" entries mentioning "morning meetings" and "dairy"data-testid="notes-empty" is no longer renderedset_notes contractdata-testid="notes-clear-button" is visibledata-testid="notes-empty" re-rendersagent.setState({ notes: [] }))playful and add the Music interest; send "Write me a one-line haiku greeting."; verify the reply is playful and references musictone: casual, language: English, empty interests, empty name) and notes reset to empty (state is per-session, seeded by the page's useEffect)pref-state-json synchronously on changenotes-card within 15 seconds of a "remember" prompt, and the full prior list is preserved on subsequent set_notes calls