Agent-Driven UI (ADUI)

AI agents that drive
your real UI

Your UI is the agent's interface — single source of truth. Users watch, learn, and take over. No separate tools to build.

Get Started See how it works
$ npm install polter

The AI assistant on the right sends a single sentence. Polter drives every click on the left.

Try the live demo on StackBlitz
A new paradigm

From Generative UI Agent-Driven UI

Generative UI generates new interfaces on the fly. Agent-Driven UI drives the one you already built.

Two problems with every AI agent today

Problem

Double the work

You build your UI. Then you build a whole separate set of agent tools — API endpoints, handlers, schemas — all duplicating what the UI already does.

Problem

Users never learn

The agent works behind the scenes or generates throwaway UI. Either way, users never learn your actual interface. Permanent dependency.

→ Polter solves both

Your UI is the agent

Single source of truth. The agent drives your real buttons, dropdowns, and forms — users watch and learn. After twice, they do it themselves. Zero extra tools to build.

Four lines to teach your UI

1

Wrap your app

Guided mode or instant. One prop.

<AgentActionProvider mode="guided" stepDelay={600}> <App /> </AgentActionProvider>
2

Register actions

Wrap any element. Polter handles the rest.

<AgentAction name="export_csv" description="Export to CSV"> <ExportButton /> </AgentAction>
3

Connect your agent

Schemas auto-generate. Send to any LLM.

const { schemas, execute } = useAgentActions(); // schemas auto-update as components mount/unmount // call execute("export_csv") when your agent responds
4

Watch it work

Scroll, dim, spotlight, cursor, click. The user sees everything.

Built for real apps

Multi-step actions

Open dropdown, select option. Sequential steps with visual guidance.

Lifecycle-aware schemas

Mounted = exists. Unmounted = gone. Agent can't hallucinate clicks on things that aren't there.

Animated cursor

Ghost cursor glides to each target before clicking. Opt-out with one prop.

Simulated typing

Types character-by-character into real inputs. Triggers React events properly.

Guided & instant modes

Guided for learning. Instant for power users. Switch anytime.

Zero dependencies

React + Zod peer deps only. No runtime dependencies.

Lazy target resolution

Portals, popovers, virtualized lists. Opens the container, then finds the target.

DevTools included

Test actions, inspect schemas, debug execution. No setup.

Build your UI once. The agent uses it. Users learn it.

View on GitHub npm package