<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CX Lab]]></title><description><![CDATA[CX Lab]]></description><link>https://cxlab.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6aa12c681edf6fa951051e33/373d5269-d7d9-447b-8d7d-439b1e3cf009.jpg</url><title>CX Lab</title><link>https://cxlab.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 13:26:56 GMT</lastBuildDate><atom:link href="https://cxlab.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I built an avatar component for a Grok Bot-like AI app, then realized it could also work as a standalone open-source project]]></title><description><![CDATA[I’m working on a small AI project that’s somewhat similar in spirit to Grok Bot. One of the first things I needed was a character/avatar, so I started there.
I ended up spending more time on the avata]]></description><link>https://cxlab.hashnode.dev/i-built-an-avatar-component-for-a-grok-bot-like-ai-app-then-realized-it-could-also-work-as-a-standalone-open-source-project</link><guid isPermaLink="true">https://cxlab.hashnode.dev/i-built-an-avatar-component-for-a-grok-bot-like-ai-app-then-realized-it-could-also-work-as-a-standalone-open-source-project</guid><category><![CDATA[AI]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Components]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[SVG]]></category><category><![CDATA[#agent]]></category><category><![CDATA[avatar]]></category><dc:creator><![CDATA[CX ArtLab]]></dc:creator><pubDate>Wed, 09 Sep 2026 12:16:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6aa12c681edf6fa951051e33/c1d38684-9354-4c9b-8b3f-b5748dd53466.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I’m working on a small AI project that’s somewhat similar in spirit to Grok Bot. One of the first things I needed was a character/avatar, so I started there.</p>
<p>I ended up spending more time on the avatar than I expected. Somewhere along the way I realized it didn’t really need to stay tied to the original project.</p>
<p>So I pulled it out and turned it into <strong>Agent Robot Avatar</strong>, a standalone open-source Web Component.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6aa12c681edf6fa951051e33/dc012b5b-995d-470e-b125-240f884e5d1b.gif" alt="" style="display:block;margin:0 auto" />

<p>The basic idea is simple: the avatar handles the visual side, while the app decides what the AI is actually doing.</p>
<p>It’s built with vanilla JavaScript + SVG and wrapped as a native Web Component. There are no runtime dependencies.</p>
<p>Using it can be as simple as:</p>
<pre><code class="language-html">&lt;agent-robot-avatar id="avatar"&gt;&lt;/agent-robot-avatar&gt;
</code></pre>
<p>Then the app can control its state:</p>
<pre><code class="language-javascript">avatar.play('waiting');
avatar.play('success');
avatar.play('failure');
</code></pre>
<p>There are also states for things like warning, inspect, blocked, error, sleep and wake.</p>
<p>The avatar itself also has some behaviors that don’t need to be triggered manually. It blinks, looks toward the pointer, has a bit of head inertia, does occasional idle movements, and reacts with a jelly-like deformation when dragged.</p>
<h2>Keeping the AI part separate</h2>
<p>One thing I wanted from the beginning was to keep the actual AI completely outside the component.</p>
<p>The avatar doesn’t know anything about your LLM, prompts, backend or agent framework. It just receives a state and reacts visually.</p>
<p>So it doesn’t really matter whether the app behind it is using OpenAI, Claude, Gemini, a local model, or something else.</p>
<p>That separation also makes the component useful outside the original project.</p>
<p>I can imagine it being used for AI assistants, agent interfaces, desktop companions, small AI pets, or probably some things I haven’t thought of yet.</p>
<h2>Why no dependencies?</h2>
<p>Mostly because it’s a small UI component.</p>
<p>Pulling in an animation framework just to make a little robot blink, move its head and react to state changes felt unnecessary.</p>
<p>So I kept it to vanilla JavaScript, SVG and the native Web Component API.</p>
<p>That also means it can be dropped into different kinds of projects without requiring React, Vue or another framework around it.</p>
<h2>Try it</h2>
<p><strong>Live demo:</strong><br /><a href="https://cx-artlab.github.io/agent-robot-avatar/?lang=en">https://cx-artlab.github.io/agent-robot-avatar/?lang=en</a></p>
<p><strong>GitHub:</strong><br /><a href="https://github.com/CX-ArtLab/agent-robot-avatar">https://github.com/CX-ArtLab/agent-robot-avatar</a></p>
<p>It’s MIT licensed and also available on npm:</p>
<pre><code class="language-shell">npm install agent-robot-avatar
</code></pre>
<p>I’m still working on the original AI project, and I’m also thinking about turning this avatar into a little AI pet next.</p>
<p>If you have other interesting or slightly weird ideas for what it could be used for, let me know.</p>
]]></content:encoded></item></channel></rss>