showcase/integrations/langgraph-python/qa/headless-simple.md
/demos/headless-simple on the dashboard host/api/health); OPENAI_API_KEY is set on Railway; LANGGRAPH_DEPLOYMENT_URL points at a LangGraph deployment exposing the neutral sample_agent graphagent="headless-simple" at /api/copilotkit (neutral assistant cell)data-testid attributes. Checks below rely on verbatim visible text, role/button selectors, and Tailwind utility-class structure/demos/headless-simple; verify the page renders within 3s with a centered card (max-width 4xl) on a bg-gray-50 background<h1> — NOT a <CopilotChat /> primitive)<textarea> with placeholder "Type a message. Ask me to 'show a card about cats'." and a disabled <button> labeled "Send"disabled present, visual opacity-50).copilotKitChat, .copilotKitInput, or .copilotKitMessages element in the DOM — the demo is built directly on useAgent and does not render <CopilotChat />disabled) and its background is the solid blue utility bg-blue-600Enter (without Shift); verify the message submits, the textarea clears, and the user bubble appears right-aligned with bg-blue-600 text-white rounded styling and max-width 80%Shift+Enter; verify a newline is inserted inside the textarea and the message is NOT submittedagent.isRunning is truebg-gray-100 text-gray-900 rounded styling, max-width 90%, containing the assistant's text responseagent.isRunning flipped false) and the Send button re-enables when the textarea has contentuseComponent (show_card)show_card frontend tool and a ShowCard renders inline inside the assistant bubble area with:
font-semibold text-gray-900text-sm text-gray-700 with whitespace-pre-wrapborder border-gray-300 and a small shadowcopilotkit.runAgent({ agent }) (frontend tools registered via useComponent reach the agent) — confirm by the card rendering at all; if the route had used agent.runAgent() directly the card would not appearagent.isRunning is true (long response streaming), verify:
disabledsend() guard if (!text || agent.isRunning) return; blocks concurrent sends).catch(() => {})) and no uncaught error is surfaced in DevTools → Console, but the user bubble remains and agent.isRunning eventually returns falseshow_card renders within 15 seconds of the triggering promptbg-blue-600 text-white, max-width 80%bg-gray-100 text-gray-900, max-width 90%useComponent tool (show_card) renders inline via useRenderToolCall inside the assistant message