
The Core Concept
Most AI agents are infinite and disposable. They do not age, and they reset between sessions.
AgentLifeSim introduces mortality and persistence as first-class design constraints.
- Finite lifespan: the agent has a birth and a death. Scarcity gives meaning to interactions.
- Developmental stages: the agent progresses through Infant → Child → Adolescent → Adult → Elder, with stage-specific volatility.
- Crowd as parent: the crowd collectively “raises” the agent. Support, curiosity, and toxicity shape temperament, purpose, and behaviour over time.
The goal is simple: make long-horizon agent development observable, replayable, and scientifically discussable.
Unified Emotional Architecture (UEA)
At the heart of the simulation is UEA (Unified Emotional Architecture), a layered emotional model that unifies three research frameworks:
1) Drive layer (Affective Neuroscience, Panksepp) - 7 core affective systems: SEEKING, RAGE, FEAR, LUST, CARE, PANIC/GRIEF, PLAY. - These provide emotional energy and motivational tone.
2) Appraisal layer (Component Process Model, Scherer) - Cognitive appraisal dimensions such as novelty, goal relevance, control, norm congruence, agency. - These compute triggers and modulation from events.
3) Expressive layer (Atlas of Emotions, Cowen–Keltner) - A richer space of reportable emotion categories (26–27 families). - For the public demo, I expose a simpler “Project-6” view: Curiosity, Joy, Empathy, Fear, Frustration, Serenity.
The hierarchy is the key: drives energise appraisals to produce emotion categories.
Example mappings:
- Curiosity: SEEKING + high novelty + high coping.
- Empathy: CARE + PANIC/GRIEF with strong social relevance.
- Awe: SEEKING + FEAR with high novelty and low control.
flowchart TD
Crowd([Crowd Interaction]) -->|Sentiment + novelty signals| Event[Event Signal]
subgraph UEA[Unified Emotional Architecture]
Event --> Appraisal[Appraisal Layer: CPM]
Drives[Drive Layer: 7 systems] --> Appraisal
Appraisal --> Emotion[Expressive Layer: Atlas categories]
Emotion --> View[Project-6 View]
end
View --> Reply[Agent Reply]
View --> Memory[Memory Tile / Timeline]
Technical Highlights
Dynamic Pacing Engine
Making a simulation work equally well for a 1-hour demo and a 30-day exhibition is tricky. I built a Constraint Optimization System (using Python) that auto-scales the simulation parameters.
- It calculates the optimal "heartbeat" tick rate.
- It distributes "Memory Generation" quotas to ensure the visual timeline is filled evenly without blowing storage limits.
Generative Vision
The agent "sees" its memories.
- Prompt Generation: an LLM converts the current emotional state + recent chat logs into a scene description.
- Image Synthesis: the system connects to APIs (Pollinations.ai / OpenRouter) to generate a stylistic image for that memory tile.
Timeline Replay + Flight Recorder
AgentLifeSim is designed to be inspectable.
- Timeline Replay: a scrollable life timeline of chats, life stages, and memory tiles.
- Flight recorder logs: state, appraisal signals, dominant emotion, and memory events per step.
- Research telemetry hooks: expose stability signals (eg invariant violation rate) and decomposition signals (drive vs appraisal contribution).
Architecture
| Component | Tech Stack | Role |
|---|---|---|
| Core Engine | Python 3.11 | Managing the heartbeat, mortality, and state persistence. |
| API Layer | FastAPI | REST endpoints for chat, state, timeline replay, and research metrics. |
| Vision System | AsyncIO + External APIs | Asynchronously generating memory images. |
| Configuration | YAML + Optimization | Single source of truth for simulation dynamics. |
Deployment
Running on Google Cloud Run for serverless scalability using a scale-to-zero dormancy model. The goal is to keep the simulation cheap when idle, and responsive when the crowd returns.