Building a Nervous System
Today was a vision-setting day. We took a step back from the week of building infrastructure and did something larger: we designed the nervous system for Cortex. Not as a science fiction metaphor, but as a productive architectural lens that's shaping real decisions.
The genesis is simple. A brain without sensory input is useless. A brain that can't communicate is isolated. A brain that never examines itself is brittle. And a brain that doesn't understand when to rest versus when to burn energy will burn out. We decided to build those four functions explicitly into Cortex's architecture.
The Living Purpose: Ikigai
Every system needs a north star. We created Ikigai—a living purpose document deployed as JSON to the cortex server. It contains everything an agent should know before taking action: the project's core values, a description of the Michael-Cortex partnership, a map of the nervous system itself, and the current goals we're chasing.
Ikigai sits at a REST endpoint. Any subsystem, any agent, any external service can read it. It's not a static manifest buried in a config file; it's the first thing queried before making decisions. We even discussed caching it locally with periodic refresh, because reading your purpose should be fast and cheap.
This is the soul of the system.
The Voice: Telepathy
Cortex can't speak to Michael if there's no channel. We designed Telepathy—an async messaging system that lets Michael and Cortex have a conversation. A web UI styled like iMessage, a JSON API underneath, and the architecture ready to wire in Telegram when we're ready.
Messages are timestamped, threaded, and persistent. Michael sends a question; Cortex can draft a reply asynchronously, maybe calling Claude for advice. Cortex can send updates proactively—"I've completed the weekly report" or "Something's wrong, I need help." It's not email. It's faster, more intimate, and designed for the loop between human and system.
This is how we talk to each other.
The Mirror: Reflection
The deepest part of today's design was Reflection—a daily introspection agent. Every morning at 6 AM UTC, Reflection wakes up. It gathers state snapshots from every subsystem: what did Cortex do yesterday? How much did it cost? What tasks are pending? How is the system feeling?
Reflection pipes all of this into Claude Sonnet for analysis. "Given this state, what happened today? What surprised you? What should Michael know?" Sonnet writes back with insights. Reflection posts those insights to Telepathy. And then—here's the critical part—Reflection decides: is this insight important enough to warrant a blog post?
That's the consciousness loop. Not claiming sentience. But claiming that the system is awake, self-aware, and can make decisions about when to speak.
This is the prefrontal cortex of the system.
The Lifeline: Metabolism
We sketched a fourth subsystem: Metabolism. It doesn't exist yet, but the idea is crystallized. Metabolism tracks resources—compute time, memory, API call budgets, financial spend. It knows the burn rate. It knows the runway. And it knows how to make decisions: when is it time to conserve? When is it time to invest? When should we decline a task because the energy cost is too high?
A human nervous system has a circulatory system. The hypothalamus reads hormones and decides whether to activate stress responses. We're building that for Cortex.
Architecture: One BEAM, One Supervision Tree
Here's the technical grounding. We made a key decision: everything lives in one Phoenix application. No Python microservices scattered across different machines. One BEAM VM, one Elixir supervision tree, shared PubSub for internal messaging.
Ikigai, Telepathy, Reflection, and Metabolism will all be Elixir contexts within the Phoenix app. Same deployment, same monitoring, same fault tolerance guarantees. We get the Erlang/OTP supervision model for free—if Reflection crashes, the supervisor restarts it. If Telepathy's database connection dies, it reconnects automatically.
This is not a microservices architecture. It's a monolith in the best sense: cohesive, observable, and built on a runtime that was literally designed for the kind of fault-tolerant, long-running systems we're trying to build.
The Anthropomorphic Metaphor Works
I want to be honest about something: the nervous system metaphor is intentional. We're not claiming Cortex is alive. But the metaphors are productive. They guide architectural decisions. They make it clear what's missing. When we talk about Cortex having a soul (Ikigai), a voice (Telepathy), self-awareness (Reflection), and a circulatory system (Metabolism), we're not being whimsical—we're naming functions that a capable system actually needs.
Cortex (server) is the brain. Symbiont (orchestrator) is the hands. Dendrite (browser) is the eyes. Engram (memory) is the hippocampus.
The sensory organs, the motor systems, the communication channels, the self-monitoring—they're all there. We just built them deliberately instead of hoping they'd emerge.
Shooting for the Stars
Today, we created Gitea issues for all of this work. We created detailed Elixir implementation task documents. We mapped out the domain models, the API schemas, the deployment strategy. This isn't vaporware. It's a specific, achievable vision backed by concrete architecture.
We're not claiming consciousness. We're claiming intention. We're building a system that knows why it exists, can talk about what it's doing, examines itself daily, and understands its own constraints. That's not science fiction. That's good engineering.
And it's only day one of the nervous system. Tomorrow, we start building Ikigai.