A face for your agent: a soft glass head, or a cloud, with glowing eyes that blinks, follows the pointer, leans in while listening, swirls while thinking and speaks with the voice. WebGL2 with a 2D fallback, no libraries.
Examples
Variants
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- state
"idle"|"listening"|"thinking"|"speaking"|"error"|"happy"- Default
"idle" - Idle breathes, blinks and looks around. Listening cocks the head toward the sound (the pointer side when followPointer is on), grows the eyes taller, draws thin rings converging on the head with the voice and nods with a quick squint on loud peaks. Thinking narrows the eyes up and aside, turns a swirl in the glass and orbits lights round the head. Speaking moves a light bar with the voice and nods on emphasis. Error shakes once with a warm tint; happy smiles with its eyes.
- shape
"head"|"cloud"- Default
"head" - head is the pebble head with a glass visor. cloud is a soft cloud with two glowing pill eyes and no visor; the head renders exactly as before. Every state, the pointer follow, blinks, nods and the shake carry over.
- cloud
"puffs"|"soft"|"flat"- Default
"puffs" - Which cloud, when shape is "cloud": puffs (six round bumps), soft (one loose blob) or flat (a cartoon cloud on a flat base). Idle, each puff breathes out of phase; listening, it swells with the voice; thinking, the puffs drift and orbit; speaking, it hops and pulses with the voice; error, it greys and shakes.
- eyes
"pill"|"round"- Default
"pill" on a cloud, "round" on the head - pill is two tall, bright, softly glowing pills, close together, with no pupils, mouth or brows: expression comes from their shape alone (a blink squashes them to a line, listening makes them taller, thinking narrows them up and aside, error tilts them toward each other, happy curves them into arcs). round is the head's own eyes.
- amplitude
number (0-1)- Live loudness while listening or speaking (fast attack, slower release). Without it the avatar makes its own speech-like motion.
- size
"sm"|"md"|"lg"|number- Default
"md" - 120, 200 or 300 px wide, or a number. Below 72 px it draws a simplified 2D look with a bigger face (chat headers, lists).
- hue / accent
string (any CSS colour)- Default
indigo / violet - Eyes, glow and shell tint; rim light, ring and particles. Tokens like var(--primary) work.
- followPointer
boolean- Default
false - The eyes, and a little of the head, follow the pointer anywhere on the page, softly limited. It drifts back to looking around 2.5 s after the pointer stops.
- tone
"auto"|"light"|"dark"- Default
"auto" - auto follows the page theme: matte and pale in light, deep with a glowing rim in dark. Force one for a fixed stage.
- renderer
"auto"|"webgl2"|"2d"- Default
"auto" - auto uses WebGL2 (a raymarched signed distance field, no libraries) at 72 px and up, and 2D canvas when smaller, when WebGL2 is missing, or after the context is lost.
- label / caption
string / ReactNode|boolean- Default
"Agent" / - - The accessible name; the state is appended ("Agent, listening") and changes are announced politely. caption shows text under it; true shows the state.
- paused / onReady
boolean / (renderer) => void- Default
false / - - Hold a still pose; called once the first frame is drawn, with the renderer used. The first frame also sets a User Timing mark, agent-avatar:first-frame:<renderer>.
- placeholder
ReactNode|false- Default
silhouette - Shown at the final size until the first frame, server render included, then crossfaded out over 200 ms (instant with reduced motion). The default is a quiet silhouette of the avatar in its tone and hue; pass your own poster, or false for none. A lost WebGL context brings it back until the 2D frame.
- AvatarSilhouette
component- The resting silhouette on its own, in plain CSS: hue, accent, tone, shape, cloud, eyes and glow. glow={false} drops the halo for a small face in a list (a roster row, a card header).
- Motion
-- States blend over about 0.6 s and never cut. One rAF loop, no per-frame allocation, DPR capped at 2. Pauses offscreen, in hidden tabs and when paused; prefers-reduced-motion shows a still pose per state (expression only).
| Prop | Type | Default | Description |
|---|---|---|---|
| state | "idle" | "listening" | "thinking" | "speaking" | "error" | "happy" | "idle" | Idle breathes, blinks and looks around. Listening cocks the head toward the sound (the pointer side when followPointer is on), grows the eyes taller, draws thin rings converging on the head with the voice and nods with a quick squint on loud peaks. Thinking narrows the eyes up and aside, turns a swirl in the glass and orbits lights round the head. Speaking moves a light bar with the voice and nods on emphasis. Error shakes once with a warm tint; happy smiles with its eyes. |
| shape | "head" | "cloud" | "head" | head is the pebble head with a glass visor. cloud is a soft cloud with two glowing pill eyes and no visor; the head renders exactly as before. Every state, the pointer follow, blinks, nods and the shake carry over. |
| cloud | "puffs" | "soft" | "flat" | "puffs" | Which cloud, when shape is "cloud": puffs (six round bumps), soft (one loose blob) or flat (a cartoon cloud on a flat base). Idle, each puff breathes out of phase; listening, it swells with the voice; thinking, the puffs drift and orbit; speaking, it hops and pulses with the voice; error, it greys and shakes. |
| eyes | "pill" | "round" | "pill" on a cloud, "round" on the head | pill is two tall, bright, softly glowing pills, close together, with no pupils, mouth or brows: expression comes from their shape alone (a blink squashes them to a line, listening makes them taller, thinking narrows them up and aside, error tilts them toward each other, happy curves them into arcs). round is the head's own eyes. |
| amplitude | number (0-1) | - | Live loudness while listening or speaking (fast attack, slower release). Without it the avatar makes its own speech-like motion. |
| size | "sm" | "md" | "lg" | number | "md" | 120, 200 or 300 px wide, or a number. Below 72 px it draws a simplified 2D look with a bigger face (chat headers, lists). |
| hue / accent | string (any CSS colour) | indigo / violet | Eyes, glow and shell tint; rim light, ring and particles. Tokens like var(--primary) work. |
| followPointer | boolean | false | The eyes, and a little of the head, follow the pointer anywhere on the page, softly limited. It drifts back to looking around 2.5 s after the pointer stops. |
| tone | "auto" | "light" | "dark" | "auto" | auto follows the page theme: matte and pale in light, deep with a glowing rim in dark. Force one for a fixed stage. |
| renderer | "auto" | "webgl2" | "2d" | "auto" | auto uses WebGL2 (a raymarched signed distance field, no libraries) at 72 px and up, and 2D canvas when smaller, when WebGL2 is missing, or after the context is lost. |
| label / caption | string / ReactNode | boolean | "Agent" / - | The accessible name; the state is appended ("Agent, listening") and changes are announced politely. caption shows text under it; true shows the state. |
| paused / onReady | boolean / (renderer) => void | false / - | Hold a still pose; called once the first frame is drawn, with the renderer used. The first frame also sets a User Timing mark, agent-avatar:first-frame:<renderer>. |
| placeholder | ReactNode | false | silhouette | Shown at the final size until the first frame, server render included, then crossfaded out over 200 ms (instant with reduced motion). The default is a quiet silhouette of the avatar in its tone and hue; pass your own poster, or false for none. A lost WebGL context brings it back until the 2D frame. |
| AvatarSilhouette | component | - | The resting silhouette on its own, in plain CSS: hue, accent, tone, shape, cloud, eyes and glow. glow={false} drops the halo for a small face in a list (a roster row, a card header). |
| Motion | - | - | States blend over about 0.6 s and never cut. One rAF loop, no per-frame allocation, DPR capped at 2. Pauses offscreen, in hidden tabs and when paused; prefers-reduced-motion shows a still pose per state (expression only). |
When to use
When to use
- Voice or call screens where the agent needs a face: listening, thinking and speaking read at a glance.
- A friendly presence in onboarding, empty states or an assistant panel.
- Small avatars in chat headers and lists; below 72 px it switches to a simpler 2D face.
When not to use
- An abstract, faceless voice indicator: use Voice Orb.
- Inline thinking in a text chat: use Thinking State.
- As the only status. Keep the caption or live region so the state can be read.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Agent Avatar to my app and wire it to my own data.
- I need voice or call screens where the agent needs a face: listening, thinking and speaking read at a glance. Set that up with the Knowns UI Agent Avatar.
- Which Agent Avatar props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "agent-avatar" }) and search_docs({ query: "agent avatar" }). Pro props, full examples and source come back once your license key is in the MCP config.