showcase/integrations/langgraph-python/qa/open-gen-ui-advanced.md
open_gen_ui_advanced is registered in the OGUI runtime (api/copilotkit-ogui/route.ts) with openGenerativeUI.agents including "open-gen-ui-advanced"sandbox-functions.ts are exported: evaluateExpression and notifyHost<CopilotChat> renders full-height within the centered max-w-4xl containergenerateSandboxedUi and a sandboxed iframe mounts in the assistant turntype="button" — no <form> element is present inside the iframe12 * (3 + 4.5) via the calculator buttons (or the generated input)[open-gen-ui/advanced] evaluateExpression 12 * (3 + 4.5) = 9090 (the res.value returned by the host)[open-gen-ui/advanced] notifyHost: Hi from the sandbox!receivedAt ISO-8601 timestamp and the echoed message field<form>, button type="button")2 + 2 and click "Evaluate"4 (from res.value)abc + 1 and click "Evaluate"res.error (e.g. "Unsupported characters in expression.")sandbox="allow-scripts" only (no allow-forms, no allow-same-origin)alert(1)) into the calculator/evaluator and confirm res.ok === false with error "Unsupported characters in expression."1/0) — verify the handler returns { ok: false, error: "Not a finite number." } and the UI renders the error pathconsole.log statements from the sandbox-function handlersWebsandbox.connection.remote.<fn> -> visible result) completes without page reloadevaluateExpression returns { ok, value } on valid input and { ok: false, error } on rejected inputnotifyHost returns { ok: true, receivedAt, message } with a valid ISO-8601 timestamp