A2UI, OpenAI, and Gravity UI integration guide
Gravity AI UI turns prompts into product interfaces by combining OpenAI generation, the compose_gravity_interface contract, A2UI transport messages, and trusted Gravity UI components.
Model output
OpenAI generation is constrained to the compose_gravity_interface payload shape instead of arbitrary JSX.
Protocol boundary
The server validates the payload and materializes A2UI messages for deterministic client rendering.
Trusted UI
The client renders only curated, trusted Gravity UI components from the local registry.
Agent access
The Streamable HTTP MCP server exposes search, fetch, generate, and refine tools for agent-native workflows.
Streamable HTTP MCP
Agents can use the public MCP server to call the same generation path without scraping the UI. The MCP response returns structured content, generated interface payloads, and copyable React code.