A mind in a folder
A Python runtime that runs a perceive / attend / interpret / decide / act / reflect loop over a folder tree. mind/ holds working memory, long-term storage (episodic, semantic, procedural, emotional), identity, executive state, a social graph, and a subconscious. runtime/ reads those files, calls an LLM, and writes back. What is on disk is what was remembered. git log is the history.
Identity, a queue, and a sleep pass, stored as files, instead of a scrolling chat log.
Why folders
A chat transcript is one blob. Hatch splits types into directories so a first, a skill, and a belief do not share a dump. The stream is short-term. Consolidation files things into long-term. Archives keep overwritten versions so a rewrite does not destroy the previous file. Path guards keep writes inside mind/. The runtime Python is off limits.
Identity is seeded once: beliefs, values, personality (curiosity, directness, warmth, playfulness, each with a documented shadow), inner voice, origin narrative. Later cycles have to live with yesterday’s files.
The loop
Each cycle: perceive → attend → interpret → decide → act → monitor → reflect. The model returns JSON actions: append the stream, write a file, recall via TF-IDF, retrieve a path, seed or graduate an incubator idea, ask the user, search the web (opt-in, rate-limited), advance a multi-cycle plan.
System 1 / System 2. Creative model for default cycles. Reasoning model for cooldown audits (every 5th cycle, temp 0.3) and when the mind requests analytical mode. Temperature is self-set (0.3-1.1) and stored in meta/session.json, so lifetime cycle count, mode, and last temp survive a CLI restart.
Try the dashboard
The real UI is python -m runtime.main --dashboard on port 8420. Stdlib HTTP, no API key, reads mind/ directly. Tabs: overview, stream, history, executive, memories, plans, incubator, subconscious. This page is a sim of that surface. Run a cycle to watch temp, mode, and the stream move.
Hatch
xAI grok-4-1-fast (creative + reasoning) on the live runtime. This pane does not call a model.
- consolidate stream before it loopsurgent
- index new long-term writessoon
- one useful close, not three new seedsfocus
- sensory-buffer pipelineparked
Live executive is queue.md / goals.md / plan.md / plans/*.json.
Stalest idea gets one LLM step per --incubate. Ready (≥70%) graduates into long-term/.
Dreams are 4-phase (NREM-1 → NREM-3 → REM → wake). Trips are high-temp free association.
Simulation only. Canned stream and a scripted cycle. Real dashboard: port 8420, no model required to look.
Modes besides the loop
Sleep. --dream is integrative: hypnagogic drift, deep-sleep pattern filing, REM narrative, wake interpretation. Writes dreams, recurring patterns, intuitions, unresolved themes. --consolidate classifies the stream into long-term and trims it. --index tags memories by emotion, person, theme, place, time, then recall uses associations not just keywords.
Background thinking. Incubator develops one stale idea per visit until it graduates. --synthesize collides distant memories (Koestler bisociation). --dive strips context and stays on one topic. --analogize is Gentner structure-mapping, not shared keywords.
Talk. --chat is casual conversation from the identity files, then a transcript in the social graph and 1-3 reflection cycles on exit. --questions answers what the mind asked about you. --interactive runs a full cycle per message.
Running now
Runtime on xAI (creative + reasoning) and a first-cycle proof on local Ollama. Dual-model switching, session persistence, auto-versioning, path allowlist, web search behind a kill switch, stdlib dashboard. Tens of cycles with coherent write-back: queue, reflections, first dreams, incubator seeds, plans that actually advanced a step. OpenAI / Anthropic adapters built, less battle-tested.
Neighbours
Separate from home agent (house chat) and the PADD (kitchen tablet). Hatch does not control lights. Sensory input is still an empty buffer. The queue grows unless the executive parks work. Embodiment and mind-to-mind are later work.
What's next
Dialectical engine, a typed concept graph, weekly review, a sensory pipeline (calendar, weather, a “today I saw” note). The rule stays one action per cycle, files on disk, and sleep as its own mode.
Files on disk
A folder tree you can commit, plus a loop that has to live with what it wrote. Tasker, dreamer, incubator, and a dashboard that shows the stream without calling a model. Nothing is remembered unless it lands in a file.
references