Installation
There are three ways to put a part in your project: one line, a prompt, or the files copied by hand. Every part’s page has all three.
With one line
Open a part and go to its Install tab. Copy the line and run it in your project’s folder. This is the line for the undo window:
npx shadcn@latest add https://ai-agents-ui-iota.vercel.app/r/undo-window.jsonThe line copies the part’s React file and its CSS file into components/agent-parts. If your project has a src folder, they go inside it.
The first part also brings two shared files, kit.css and icons.tsx. A part that draws line icons installs lucide-react too.
The line uses the shadcn CLI only to copy the files. Your project does not need shadcn or Tailwind. It was tested in a Next.js project with both, and in a plain Vite project with neither.
With a prompt
Every part has a Prompt tab, and a Copy prompt button at the top of its page. The prompt describes the part in plain words, with every state and how it moves.
Paste it into your coding agent, and the agent builds the part in your own stack. Use this way when your project is not React, or when the part should follow your own design system.
By hand
Open the React tab and the CSS tab, and copy each file into one folder of your project. Some parts have an Icons tab too. If the React file imports lucide-react, install it:
npm install lucide-reactUse a part
Import the part and pass in your data as props. A part does not call a model. It only shows what you give it.
'use client';
import { useState } from 'react';
import { UndoWindow, type UndoState } from '@/components/agent-parts/undo-window';
export function RefundNotice() {
const [state, setState] = useState<UndoState>('counting');
return (
<UndoWindow
title="Refund sent to Anna Keller"
detail="€48.00 to Visa ending 4421"
undoneTitle="Refund undone"
state={state}
onUndo={() => setState('undone')}
onKeep={() => setState('kept')}
/>
);
}
The path starts with @/, which a Next.js project sets up. In a project without it, write the path from your own file, for example ./components/agent-parts/undo-window. The props are listed at the top of the part’s React file.
A part expects three things from your page:
- A dark page. The parts are drawn for a dark background.
- The usual CSS reset: border-box sizing, no default margins, and buttons that take the page’s font. Tailwind’s preflight gives it, and so does any modern reset.
- Your font. A part uses the font of the page it is on.
The files are yours, so change anything. The words on a part come from its words prop. Its accent colours are variables at the top of its CSS file.
To get a newer version of a part, run its line again with --overwrite at the end. This replaces the files, and your edits with them.
Let your coding agent install parts
A coding agent can find a part by its name and install it for you. It does this through shadcn’s MCP server. Set it up once per project, in two steps.
First, give your project the name of this library:
npx shadcn@latest registry add @agent-parts=https://ai-agents-ui-iota.vercel.app/r/{name}.jsonThen connect the MCP server to your agent. This line is for Claude Code. For Cursor, VS Code, Codex or OpenCode, write cursor, vscode, codex or opencode in place of claude.
npx shadcn@latest mcp init --client claudeNow ask in your own words, for example “Add the undo window from Agent Parts”. The agent looks the part up and runs the install.
After the first step you can also add a part by name yourself:
npx shadcn@latest add @agent-parts/undo-window