Packages

Surfaces UI is 33 packages on npm, released together at one version, so any two of them always work together. Most apps install two to six of them; the rest come along as dependencies, or are parts of the server.

What an app installs

You wantInstall
Components over your own backend (grid, chart, pivot, editor, explorers, forms)@surfaces-ui/components @surfaces-ui/data
Pages and views an agent describesadd @surfaces-ui/spec
A chat thread with an agentadd @surfaces-ui/chat, and an agent backend
The reference server (DuckDB, Teradata, DataFusion)@surfaces-ui/client-connect in the app, @surfaces-ui/dev-server beside it
SQL in the browser with no server@surfaces-ui/datasource-duckdb-wasm and @duckdb/duckdb-wasm
All of it, set upnpx create-surfaces my-app

React 18 or 19 is a peer of every package that draws: your app provides it.

Each package below links to its own README, with how to install and use it. "Brings" lists the other Surfaces UI packages a package depends on directly, and its larger third-party dependencies; peers are what your app provides.

Start here

What an app installs itself. Each brings the foundations it needs.

PackageWhat it isBringsPeers
@surfaces-ui/componentsThe components themselves: grids that stay fast at any size, charts, pivots, the SQL editor, schema and catalog browsing, data modelling, filters and the theme.data, icons, proto, tokens, trace, protobuf-es, CodeMirror, Apache Arrow, echartsreact, react-dom
@surfaces-ui/dataThe interfaces every component uses (DataSource, Discovery, Pipelines, Semantics, StateStorage), Arrow helpers, the plain filter form, and in-memory implementations for tests and demos.proto, protobuf-es, Apache Arrownone
@surfaces-ui/specAgent-generated UI: the component catalog, the A2UI surface model, the agent prompt generated from the catalog, and SurfaceView, which draws what an agent sends after checking it against the catalog.components, data, icons, proto, tokens, trace, protobuf-es, zodreact, react-dom
@surfaces-ui/chatChat threads whose replies hold live components: streaming text, tool steps, approvals, and any catalog component drawn inline.agent, components, icons, proto, spec, state, trace, protobuf-esreact, react-dom
@surfaces-ui/stateState services with no React or DOM dependency: stores, derived values, undo, persistence to any StateStorage, URL sync, the shared view state behind cross-filtering, and query runs.data, proto, protobuf-esreact (optional)
@surfaces-ui/devtoolsDeveloper tools for agent-generated UI: one component around your app records messages, components, problems, state, events, agent turns and service calls, with time travel.components, data, spec, tracereact, react-dom
@surfaces-ui/client-connectThe client side of the dev server's services over Connect: connectDataSource, connectDiscovery, connectAgent and the rest, each implementing the matching interface from @surfaces-ui/data or @surfaces-ui/agent.data, proto, Connectnone
@surfaces-ui/dev-serverA Connect server for your data: DuckDB (files, Delta, Iceberg, object stores, Postgres), Teradata and DataFusion behind one set of read-only services, with search, pipelines and an agent.agent, data, discovery, engine, engine-datafusion, engine-mcp, engine-duckdb, engine-service, engine-teradata, pipelines, pipelines-dbt, proto, seeds, sql, protobuf-es, Connect, Apache Arrownone
create-surfacesStarts a new app: a dashboard page, a chat that draws live components, and a data server with six sample datasets.nothingnone

Agent backends

One of these turns a model into an AgentBackend for Chat, PageStudio or the dev server. Install the one you use.

PackageWhat it isBringsPeers
@surfaces-ui/agentThe AgentBackend interface (one send is one turn), event helpers, a scripted agent for tests, toolCallingAgent for any model with tool calls, and dataTools, which lets a model list and describe tables (never their values).data, proto, protobuf-esnone
@surfaces-ui/agent-anthropicAn AgentBackend over Claude through the official Anthropic SDK, which you install alongside it.agent@anthropic-ai/sdk
@surfaces-ui/agent-openaiAn AgentBackend over any OpenAI-compatible /chat/completions endpoint: OpenAI, Ollama, vLLM or LM Studio.agentnone
@surfaces-ui/agent-loomAn AgentBackend that talks to a running Loom server over its HTTP gateway.agent, proto, protobuf-esnone

Other places to show it

For an MCP host, a Next.js app, a plain HTML page, or SQL in the browser with no server.

PackageWhat it isBringsPeers
@surfaces-ui/mcpMCP Apps delivery: registers tools that show grids, charts, pivots, dashboards and agent-drawn surfaces inside an MCP host, and a stdio server over surfaces.config.ts.agent, components, data, dev-server, proto, spec, tokens, protobuf-es, MCP SDK, Apache Arrow, react, react-dom, zodnone
@surfaces-ui/nextServe Surfaces UI pages from a Next.js app: routes, metadata and server-rendered pages, with Next.js doing the routing, building and hostingcomponents, spec, tokensnext, react, react-dom
@surfaces-ui/pageSurfaces UI pages as one script and one stylesheet, for a plain HTML page with no build step (an app's web view).nothingnone
@surfaces-ui/datasource-duckdb-wasmA DataSource that runs DuckDB in the browser: real SQL over Parquet with no server.data, engine, engine-service, proto, sql, Apache Arrow@duckdb/duckdb-wasm

Inside the server

@surfaces-ui/dev-server installs these itself. Install one directly only to build a server of your own.

PackageWhat it isBringsPeers
@surfaces-ui/engineThe Engine interface the server's engine adapters implement.proto, protobuf-es, Apache Arrownone
@surfaces-ui/engine-serviceThe query, catalog and source services over engine adapters, usable in Node or a browser.client-connect, data, engine, proto, sql, protobuf-es, Connect, Apache Arrownone
@surfaces-ui/engine-duckdbDuckDB as an engine (Node, ADBC): Parquet, CSV and JSON files, Delta and Iceberg tables, time travel, and file access locked to the registered tables.engine, proto, DuckDB (native, through ADBC), protobuf-es, Apache Arrownone
@surfaces-ui/engine-teradataTeradata as an engine, through Teradata Query Service or a driver connection you supply.engine, proto, sql, protobuf-es, Apache Arrownone
@surfaces-ui/engine-datafusionApache DataFusion as an engine, over a server's HTTP SQL endpoint (ROAPI), reading Arrow.engine, proto, sql, protobuf-es, Apache Arrownone
@surfaces-ui/engine-mcpA database's own MCP server as an engine: the Teradata MCP server, or a Postgres, MySQL or DuckDB one.engine, engine-teradata, proto, sql, protobuf-es, MCP SDK, Apache Arrownone
@surfaces-ui/sqlTurns a view (sort, filter, page, group, aggregate, bucket) into SQL for each engine's dialect, with every value bound as a parameter, plus read-only checks.data, proto, protobuf-es, @polyglot-sql/sdknone
@surfaces-ui/discoveryThe reference discovery backend: keyword and semantic search over tables and columns, profiles, inferred joins and context packs for agents, on any DataSource.data, proto, protobuf-es, Apache Arrownone
@surfaces-ui/embedder-localA small embedding model run on your machine for semantic search.discovery, Transformers.jsnone
@surfaces-ui/pipelinesThe reference pipeline runner: builds datasets from one another on an engine, in dependency order, with row rules and checks over what was built.data, engine, proto, sql, protobuf-esnone
@surfaces-ui/pipelines-dbtA dbt project as a pipeline: datasets, tests, runs and semantic models read from dbt's artifacts.data, proto, protobuf-esnone
@surfaces-ui/seedsSix synthetic industry datasets (retail, healthcare, fraud, telco, transportation, manufacturing) with keys, descriptions, planted data problems, pipelines, starter pages and written conversations.data, specnone

Foundations

Shared by the packages above and installed with them. You import from them (a theme, a trace), but rarely add them yourself.

PackageWhat it isBringsPeers
@surfaces-ui/tokensThe theme contract, eight presets, colour derivation tested for contrast, and the CSS variables (--sf-*) every component is styled with.nothingnone
@surfaces-ui/iconsOne set of outline icons: everyday actions from Lucide and Surfaces UI's own drawings for data work (joins, lineage, pivots, schema drift), at one line weight.nothingreact
@surfaces-ui/protoTypeScript generated from the protobuf contracts that cross process boundaries (queries, catalogs, agents, pipelines).protobuf-esnone
@surfaces-ui/traceThe recorder behind the developer tools.nothingreact (optional)

Worth knowing

  • The data layer is optional. components, spec, chat and the other packages that draw depend only on the DataSource interface in @surfaces-ui/data, never on an engine, a driver, a Connect client or the server (pnpm check:boundaries holds this). An app on its own backend implements DataSource and installs nothing from the server side.
  • @surfaces-ui/dev-server brings every engine. It depends on the DuckDB, Teradata and DataFusion adapters, the pipeline runner and dbt support, so a server that only reads Teradata still installs DuckDB's native library.
  • Icons come one at a time. Importing undoIcon from @surfaces-ui/icons brings that drawing alone; see icons.md.
  • No Teradata driver is installed. @surfaces-ui/engine-teradata talks to Teradata Query Service over fetch, or to a driver connection your server opens with a driver you install yourself.
  • Before the first release (0.2.0), each package was checked on its own: packed as npm publishes it, installed alone into an empty project, and every JavaScript entry imported; the app create-surfaces writes was then installed from those packages, built, and its data server started and answered. Releasing is described in releasing.md.