Base-X UI: A component library that talks to AI agents

View source

At the time of writing, agents write frontend code blind. They guess at prop names, hallucinate imports, misuse components. Base-X UI ships with an MCP server and 10 tools an agent can call before writing a single line of code. It describes what it wants in plain language, gets back the right component, exact imports, required props, and a warning if it's about to make a mistake. No docs page. The agent never leaves the tool.

Built on Base UI (unstyled, accessible primitives) and StyleX (Meta's build-time CSS extraction). Every component ships with structured metadata an agent can reason about: what it does, when to use it, what it composes with, and what to avoid. The MCP server returns data, not documentation. The agent gets what it needs to write correct code on the first pass.

Where it's at

The docs are live. The core idea (a component library designed for agent consumers, not just human ones) is proving out. One thing is for sure: agents write cleaner code when they can query the library directly instead of guessing from docs.

<Button variant="solid" />
<Dialog />
<Menu />