A desktop pet that actually watches your screen and thinks
B is a floating, emotionally expressive AI companion that reads your active windows, listens, and speaks up only when it has something worth saying.

What it does
B is a PyQt6 overlay creature that lives on your desktop: a 60fps animated face that tracks which window you’re focused on, extracts its content semantically (via UI Automation tree walking, with a Tesseract OCR fallback for apps that don’t cooperate), and feeds that context to an LLM. It listens via Faster-Whisper, talks back through Piper ONNX TTS with a DSP chain (pitch shift, bitcrush, chorus — deliberately robotic), and can decide on its own when to interject.
The interesting bit
The architecture is the real story: every module talks exclusively through a thread-safe pub/sub EventBus, so the window tracker, vision sensors, LLM brain, and face renderer never know about each other. That discipline is unusual in a hobby-scale companion app, and it’s what makes the perception → cognition → expression pipeline coherent rather than spaghetti.
Key highlights
- Semantic screen reading via UIA tree walks, with quality scoring, adaptive cooldown, and OCR fallback
- Dual LLM backends: Groq cloud or local llama-cpp (GGUF models, gitignored) for private inference
- An
AutonomyEnginethat schedules unprompted “proactive thoughts” based on context quality and timing - Emotional state machine (
brain/soul.py) driving blinking, resting, and conversing expressions - Physics-based movement with Bezier interpolation; a Work Mode (
Ctrl+Shift+Alt+W) shifts it toward utility
Caveats
- The README leans heavily on vibe (“soul-wired digital lifeform”) and is truncated mid-section, so the actual capabilities of Work Mode beyond “semantic monitoring” are unclear
- Windows-centric: UI Automation and MSS capture mean this won’t run meaningfully elsewhere
- “Silent by default” is a design claim — how well the autonomy loop respects it in practice isn’t documented
Verdict
Worth a look if you’re building desktop agents, screen-context pipelines, or just want a well-decoupled event-bus architecture to study. If you wanted a plain command-driven assistant, this is deliberately not that.
Frequently asked
- What is AhmadHassan-BTed/B?
- B is a floating, emotionally expressive AI companion that reads your active windows, listens, and speaks up only when it has something worth saying.
- Is B open source?
- Yes — AhmadHassan-BTed/B is open source, released under the MIT license.
- What language is B written in?
- AhmadHassan-BTed/B is primarily written in Python.
- How popular is B?
- AhmadHassan-BTed/B has 2.7k stars on GitHub.
- Where can I find B?
- AhmadHassan-BTed/B is on GitHub at https://github.com/AhmadHassan-BTed/B.