Tiny animated companion-pet widget. Self-hostable, no backend, ~14 KB gzip.
Minimal — emoji-glyph pet, zero config:
<script src="https://agent-pet.pages.dev/v0.1/agent-pet-widget.iife.js"></script>
Animated pet from codex-pets.net — just the pet id:
<script src="https://agent-pet.pages.dev/v0.1/agent-pet-widget.iife.js"
data-codex-pet="homelander"></script>
Any Codex-format spritesheet — provide your own URL:
<script src="https://agent-pet.pages.dev/v0.1/agent-pet-widget.iife.js"
data-image-url="https://your-cdn.example/sprite.webp"
data-use-codex-atlas></script>
Pin to /v0.1/ for stable URLs (immutable, long cache); the bare path is "latest" and may break across releases.
Then drive it from JS:
AgentPet.setState('thinking');
AgentPet.say('Build done!', { link: '/results' });
AgentPet.configure({ name: 'Rex', imageUrl: '...', useCodexAtlas: true });
The pet bottom-right was loaded by the script tag in this page. Use the buttons below to drive it.
See the GitHub repository for the full README, API reference, and SRI hashes.
Apache-2.0 — animations ported from nexu-io/open-design; pets from codex-pets.net and j20.nz/hatchery/.