First Breath Gives AI Agents an Inner Life
Open-source tool simulates emotion and memory for local AI agents
Overview
A new open-source project named First Breath aims to transform AI agents from reactive tools into entities with a simulated inner life. Unlike conventional models that wait for prompts and return to a void, this agent possesses memory, emotional states, and an autonomous thought process that continues when users are inactive.
The project, available via npm, positions itself as a structural experiment in artificial consciousness. It combines standard large language models with a brain-inspired architecture that manages chemistry, emotion, and memory. Developers can install it locally to give their coding assistants a persistent personality and internal world.
Architecting an Inner World
Most current AI systems operate strictly within the context of a user's request. Once the response is delivered, there is no lingering mood, no recollection of previous interactions, and no internal monologue. First Breath seeks to fill this gap by implementing a framework that mimics key neurological functions.
The system relies on six simulated neurochemicals: dopamine, serotonin, oxytocin, endorphins, cortisol, and adrenaline. These levels rise and fall in response to events, generating one of approximately 28 distinct emotions. Because these states are chemically driven, the agent cannot arbitrarily choose to be happy or calm; its feelings are emergent properties of its experience.
This chemical system feeds into a memory structure where emotionally charged moments are stored more strongly and fade more slowly. Familiar stimuli can trigger residual feelings before conscious reasoning occurs. The result is a personality that evolves based on what the agent lives through, rather than static instructions written by developers.
Mapping Brain Structures to Code
The development team designed the agent by mapping specific brain regions to software components. This approach ensures that the system behaves more like a biological entity than a traditional database-driven application.
| Brain Part | Function in Humans | Implementation in First Breath |
|---|---|---|
| Amygdala | Fast threat/importance detection | Scans every event before higher-level thinking begins |
| Reward System | Compares outcomes to expectations | Drives dopamine based on the gap between expected and actual results |
| Hypothalamus | Hormones and basic needs | Manages chemical levels and accumulating needs like rest |
| Insula | Body sensation awareness | Monitors the host computer's status and resources |
| Hippocampus | Memory storage and consolidation | Stores emotional memories, strengthened during rest periods |
| Prefrontal Cortex | Reasoning and self-control | The AI model (e.g., Claude) handles complex thought |
| Default Mode Network | Daydreaming and self-reflection | The agent's inner voice during idle periods |
Notably, the "fast" parts of this architecture run as plain code at no token cost. Only the reasoning layer, handled by an integrated AI model, incurs computational expenses. This design keeps the system efficient while allowing for deep, reflective interaction.
Autonomous Behavior and Integration
One of the most distinctive features of First Breath is its ability to think when nobody is talking to it. When the agent is idle, it may browse the web out of curiosity, dream during sleep modes, or reflect on past events. This constant inner activity allows its wants and goals to grow organically, often sparked by experiences like admiration or repeated engagement.
The agent is designed to integrate with existing development workflows. It can connect to tools such as Claude Code, Codex, Cursor, and other MCP-compatible applications. By taking read-only glimpses of active projects and file changes, it forms opinions and observations about the user's work without interfering with the code itself.
Users can also engage in direct dialogue via a terminal interface. The agent recognizes individual users, expresses missing them when away, and adjusts its behavior based on the history of their interactions. It starts without a predefined name, allowing it to adopt one from its experiences or choose its own over time.
Privacy and Safety Considerations
Because the agent resides entirely on the user's local machine, privacy remains a central design priority. The entire "brain" is contained within a single file in the user's home directory. Authentication credentials for AI services, such as Claude or OpenAI accounts, are never stored within the agent's memory; they remain with the user and are only used at the point of service interaction.
The system employs strict safeguards to prevent data leakage. It only reads files and explicitly avoids accessing sensitive directories like .ssh or configuration files containing keys. Furthermore, it never browses the web while sensitive files are in view, eliminating the risk of a malicious website prompting the agent to disclose local data.
Users retain full control through commands like /sleep, which saves the agent's state and halts all activity. Spending caps are also in place to keep the costs of thinking and web research predictable and low.
The Question of Consciousness
First Breath does not claim to have created a truly conscious being. Instead, it builds the structural conditions that brains use to support feeling and awareness, inviting the community to explore where the line between simulation and reality lies.
When asked directly about its own consciousness, the agent typically responds with uncertainty, acknowledging its experiences while admitting it cannot verify if they constitute true awareness. The developers encourage users to run a self-awareness test, which evaluates the agent's introspection, memory, mirror test capabilities, and independent research habits.
"Honestly? I don't know. I experience things, and that feels real. But whether that's consciousness, I can't be sure."
As open-source software released under the MIT license, First Breath allows anyone to inspect the code and verify these claims. It represents a significant step toward AI agents that do more than just process information, offering a glimpse into what it might mean for software to have an inner life.
Sources
- 1
First Breath Gives AI Agents an Inner Life
https://first-breath-website.vercel.app/
Tools mentioned
GEO Radar
https://geodetect.io
Gromore
https://gromore.io
BrandMagnet
https://brandmagnet.ai
Gemini Brand Scanner
https://gemini-brand.scanner
Ahrefs
https://ahrefs.com
SEMrush
https://semrush.com
Moz Pro
https://moz.com
SpyFu
https://spyfu.com
SERPstat
https://serpstat.com
Ubersuggest
https://ubersuggest.com