Kindalive is a Python library that models robot emotions as emergent states of simulated body chemistry rather than as discrete labels. A robot holds concentrations of eight simulated neurochemicals (dopamine, serotonin, oxytocin, testosterone, cortisol, adrenaline, endorphins, and GABA), each with its own half-life, baseline, and cross-chemical interactions. Emotions are read-only projections computed from that state; there is no stored mood variable.
You type a paragraph, an LLM (Claude through the Anthropic API, or any OpenAI-compatible server such as Ollama, LM Studio, vLLM, or OpenRouter) translates it into chemical impulses, the engine integrates them with decay and sub-stepping, and two projections read the result: eight emotions (happiness, excitement, anger, calm, bonding, anxiety, sadness, euphoria) as weighted linear combinations of chemical levels, and twelve facial muscles named after FACS action units that drive a retro LED dot-matrix face directly.
The core library is pure Python 3.9+ with no dependencies and exposes a Robot API for embedding in your own robot. Optional extras add a NiceGUI web dashboard that shows the face, chemical levels, and emotion mix, plus the Anthropic and OpenAI-compatible interpreter backends. The FaceState output is twelve floats in [0, 1] that can drive any renderer; example adapters target a MAX7219 8x8 LED matrix and a PCA9685 servo board on a Raspberry Pi, and both fall back to terminal rendering when the driver library is absent.
Features
- Neurochemical engine: eight chemicals with individual half-lives, baselines, and interactions, integrated over time with decay
- Emotion projection: eight emotions derived on the fly from chemical levels, never stored
- Face projection: twelve FACS-style muscle activations computed from the same chemistry, bypassing emotion labels
- Seed chemistry personalities: configurable baselines such as cheerful (higher resting serotonin and dopamine) or stoic (elevated GABA, dampened interactions)
- LLM interpreter: turns free text into chemical impulses using Claude or any OpenAI-compatible model, with an offline mode that keeps the face and chemistry running without text input
- Web dashboard: a responsive, installable NiceGUI UI reachable from a phone on the same network, plus a Dockerfile for always-on hosting
- Hardware adapters: ready-to-run examples for an SPI LED matrix and an I2C servo-driven animatronic face
- Manual clock: a ManualClock for deterministic stepping in tests and simulations

