Aster

A three-stroke agent mascot. One custom element, zero dependencies, and every emote pulled by springs so switching never cuts.

RoleCharacter, interaction design, frontend engineering
TimelineNov 2026 · 2 hours
TeamSolo
ToolsSVG · Web Components · Springs · JavaScript
PlatformWeb
THE IDEA

A scribble that became a face

Aster started as a scribble in my rough book. Just three strokes, drawn while thinking. It looked a little like an asterisk that had become a person.

The original scribble, from the rough book.

When an AI agent is doing something, its interface often tells you very little. A spinner, a line of text, or sometimes just a blinking cursor.

I wanted to give that waiting a face. Something that could show, at a glance, whether an agent was thinking, working, listening or done.

The scribble was already there. Turning it into a small working package took a couple of hours.

THE SHAPE

Three strokes, many expressions

Every Aster emote uses the same three strokes. They move, bend and overlap to create different expressions.

Idle is the original asterisk. Listening turns the strokes upright. Sleep lays them flat. Error crosses them into an X. Sad lets the outer strokes droop.

Nothing new is added between states. It stays the same little character, even while it changes.

That also makes it work at small sizes, like a browser favicon. The strokes can be rounded by default, or kept flat with rounded="false" — closer to the original sketch.

Fifteen states, one set of strokes.

THE MOTION

Let the strokes find their way

I didn't want Aster to jump from one expression to another.

With keyframes, changing an animation halfway through can feel like starting over. The old pose stops, and the new one begins.

Aster uses spring motion instead. Each emote is a target shape, and the strokes move towards it with a little momentum.

If the target changes while they're moving, they simply change direction from where they are. No reset, no sudden cut.

It's a small detail, but it makes the character feel a little more present.

THE PACKAGE

Small enough to drop in

Aster is a custom element, so using it doesn't require a framework or a new setup.

npm install aster-mascot
<aster-mascot emote="thinking" size="64"></aster-mascot>

You can change its size, color, speed and shape, pause it, or give it an accessible label. From code, play() changes its emote, and an aster-emote event lets the rest of your app know when that happens.

I wanted it to be easy to use in real projects, so it also pauses when it's off-screen, respects reduced-motion preferences, and shares one animation loop across instances.

The element's attributes.

Connecting it to an agent

Agent states don't always map neatly to expressions. A tool call and a long-running task might both mean "working". Waiting for approval might feel more like "listening".

So I added emoteFor(), a small helper that maps common agent states to Aster's emotes. You can use the defaults or pass in your own mapping.

For accessibility, Aster can include its current state in its accessible name — "Aster, thinking" — and optionally announce changes through a polite live region. Announcements are debounced, so a burst of updates doesn't become a burst of speech.

A couple of side experiments

I also wanted Aster to show up outside the page.

aster-mascot/favicon lets it animate in the browser tab, so you can see an agent's state while you're looking at another tab.

A small character in the browser tab.

And aster-mascot/core is the motion engine without the DOM. It returns path data each frame, so the same idea can be used with canvas, React Native or WebGL.

THE DEMO

Watching it work

The demo page now has a scripted agent on it. Its replies are written in advance, but each step calls Aster the way a real agent would — thinking while it plans, working while a tool runs, speaking while it streams, listening while you type or while it waits for approval, then success, error or sad when things end.

You can type, pick a suggestion, approve a deploy, cancel it, or stop it mid-reply.

The panel on the right is the part I wanted to show. It lists the agent state, the emote it maps to, what a screen reader would hear, and the call count. A minute of chatting came to 453 play() calls and 43 changes. That gap is why play() does nothing when the emote is already showing: you can call it on every token without it costing anything.

WHERE IT STANDS

Out in the open

Aster is published on npm as aster-mascot, under the MIT license.

The demo is at aster-mascot.vercel.app, with a scripted agent you can talk to, and the source is on GitHub.

It's still a small project, but it now has a few ways to use it: the custom element, agent-state mapping, screen-reader announcements, an animated favicon, and the motion engine on its own.

BY THE NUMBERS

Small by design

Aster is small enough to stay out of the way.

  • 15.7 kB npm package download
  • 47.1 kB unpacked size, across 8 files
  • 0 dependencies
  • 1,083 lines of JavaScript and types
  • 15 emotes and 15 agent states
  • 4 entry points for different ways to use it

The custom element is 9 kB gzipped, while the core motion engine is just 6.3 kB.

For something built around animation, I wanted the package itself to stay pretty quiet.