Build with your coding agent
Paste one prompt to wire Val into your app, or connect the CLI so your agent can design components too.
Set up your app
Section titled “Set up your app”Copy this into Claude Code, Codex, Cursor or any agent working in your app’s repository. It explores first, tells you its plan, then installs the SDKs and wires your LLM route and chat UI.
Set up useval (generative UI) in this app.
useval lets this app's AI assistant answer with interactive components that our team designs. The model never writes UI: it picks a published component and fills in its values with a tool call; the frontend draws it natively.
Work in this order and keep the app's existing behaviour intact:
1. Explore first. Find (a) the backend code that calls the LLM — provider (OpenAI, Anthropic, Vercel AI SDK or other), the chat route and the tool-calling loop — and (b) the frontend that renders assistant replies — React or Flutter. Tell me what you found and your plan before editing anything.
2. Install the SDKs. They ship as archives in the useval release download; ask me for the extracted sdk/ directory if it isn't in the repo.Let your agent design components
Section titled “Let your agent design components”The useval CLI is also an MCP server. Connect it and your agent can create, check and preview components for you.
-
Connect it, from your component project directory.
Terminal window claude mcp add --transport stdio useval -- "$HOME/.local/bin/useval" --dir "$PWD" mcpTerminal window codex mcp add useval -- "$HOME/.local/bin/useval" --dir "$PWD" mcp -
Restart or reconnect your agent so it discovers the tools.
-
Ask for a component.
Create an order summary card with useval. Analyze it and start a local preview. Keep the changes local until I ask you to publish.
Local authoring needs no account. To work with remote projects, sign in first with useval login --console-url https://YOUR-CONSOLE.
To disconnect: claude mcp remove useval or codex mcp remove useval.