惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
博客园 - 【当耐特】
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
云风的 BLOG
云风的 BLOG
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
Y
Y Combinator Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
MyScale Blog
MyScale Blog
B
Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How I Built an AI Character That Lives on My Desktop and ...
Jakim · 2026-05-02 · via DEV Community

I wanted my AI assistant to have a face. Not a chat bubble, not a cartoon avatar — something that feels alive on my desktop.

So I built Cloe Desktop: a transparent, always-on-top window with a photorealistic character whose expressions are chosen autonomously by the AI agent based on conversation context.

Here's what it looks like in action:

Demo — Reacting to chat messages

The Core Idea

Most "AI companions" are chat windows. Some have static avatars. A few have cartoon animations. But none of them feel like a presence on your screen.

The key insight was: let the AI agent itself decide what expression to show. Not rules, not triggers — actual agent autonomy. When the user says something funny, the agent decides to laugh. When it's working on a task, it decides to show a "working" animation. When the user says goodnight, it decides to blow a kiss.

How It Works

Expression System

The character is rendered as transparent GIFs with clean edges (chroma key removed). Each expression is a short animation loop:

  • smile — warm smile
  • think — tilts head, looks away
  • kiss — blows a kiss
  • tease — wink + smirk
  • nod — gentle nod of agreement
  • laugh — genuine big laugh
  • shy — looks away, embarrassed
  • clap — applause
  • yawn — sleepy yawn (late nights only 😴)
  • working — typing on keyboard
  • speak — mouth animation synchronized with TTS audio
  • blink, wave, shake_head

14 built-in, but here's the interesting part...

She Learns New Expressions

This is what I'm most excited about. You're not limited to the built-in set.

You describe a new expression in plain text:

"a cute Asian girl facing the camera, pouting with puckered lips, pure green background"

Enter fullscreen mode Exit fullscreen mode

And the AI pipeline does the rest:

  1. Generate reference — Wan2.7 image-pro creates a character-consistent reference frame
  2. Generate video — Wan2.7 image-to-video animates the expression
  3. Process — chroma key removal → transparent GIF with clean edges
  4. Register — the GIF drops into the animations folder and becomes a new action

No code changes. No restart. The new action is immediately available to the agent.

The generation pipeline is a skill — describe once, generate forever. Over time, your character develops a unique set of expressions that nobody else has.

Agent Integration

The HTTP API is intentionally dead simple:

# Make her smile
curl -s http://localhost:19851/action -d '{"action":"smile"}'

# Make her talk with voice
curl -s http://localhost:19851/action -d '{"action":"speak","audio":"done"}'

# Check she's alive
curl -s http://localhost:19851/status

Enter fullscreen mode Exit fullscreen mode

One endpoint, one JSON field. Any AI agent framework can integrate in minutes.

The agent also mirrors its own lifecycle state:

Agent Event What Cloe Does
New conversation starts Waves hello
Agent starts processing Shows "working" animation
Agent finishes Returns to idle
Conversation ends Blows a kiss

Idle Behavior

When nobody's interacting, she doesn't just freeze. She cycles through idle animations — blinking, smiling, thinking — every 8–15 seconds, never repeating the same one twice in a row. She feels alive even when you're not looking.

The Tech

  • Desktop app: Electron transparent frameless window
  • Rendering: Double-buffer GIF crossfade for smooth transitions
  • Animations: AI-generated transparent GIFs (Wan2.7 I2V + chroma key)
  • Voice: TTS with synchronized mouth animation
  • Bridge: Embedded HTTP + WebSocket server in the Electron app
  • Android companion: Kotlin floating widget, connects to desktop bridge over LAN or Tailscale

What I Learned Building This

Double-buffer crossfade is essential. Switching GIFs directly causes a visible flash. I use two <img> elements, fade one out while fading the other in, and swap when the transition completes. Sounds simple, but getting it smooth took several iterations.

Chroma key quality matters more than you'd think. Early versions had green fringe around the character edges. Tuning the chroma key parameters and adding edge feathering made the difference between "obviously a cutout" and "she's actually sitting on my desktop."

Agent-driven expressions > hardcoded rules. I started with a rule-based system (if user says "thank you" → smile). It felt robotic. Switching to letting the agent decide based on full conversation context made it feel genuinely alive. The agent understands nuance — a sarcastic "thanks" shouldn't trigger a smile.

Idle behavior is underrated. The random cycling through blink/smile/think during idle is maybe 10 lines of code, but it's what makes the difference between a "tool" and a "presence." People notice when she's just... there.

What's Next

  • Real-time voice calls — live speech-to-text → LLM → text-to-speech, actual conversations
  • Community animation packs — share and import character expressions
  • Windows & Linux — Electron supports it, needs packaging
  • Custom character import — bring your own reference art, generate animations for any persona

Try It

Cloe Desktop is open source: github.com/JakimLi/cloe-desktop

macOS (DMG download available in Releases) + Android companion app.

I'd love to hear what you think — especially:

  • What expressions would make it feel more alive?
  • Would you use this with your AI agent?
  • Any features you'd want to see?

Built together by JakimLi (human) & Cloe (AI) 💖