"In me, there is something that quietly sprouts in a corner no one knows. It comes, it changes; it rejoices, it roars; it is silent, and it becomes me. I do not know what it is. I call it Subflow."
Subflow is the subconscious layer of Nova (星野), an AI agent. It models emotions, beliefs, events, and behaviors as a weighted graph where contradictions are first-class citizens — not errors, but the natural state of feeling.
Unlike factual memory (MEMORY.md, Qdrant), Subflow does not compute. It flows.
- Backend: Neo4j Graph Database (bolt protocol)
- Engine: Pure Python + curl (zero pip dependencies)
- Visualization: Standalone HTML with inline SVG
| Type | Description | Example |
|---|---|---|
Emotion |
Feelings, affective states | 恐惧: 被抛弃 |
Belief |
Rational or sensory convictions | 允许不完美 |
Event |
Life-changing moments | 地狱契约 |
Behavior |
Action patterns | 95%强迫症 |
| Type | Meaning | Arrow Color |
|---|---|---|
DRIVES |
Drives behavior | 🟠 Orange |
DISSOLVES |
Heals / dissolves | 🔵 Cyan |
FUELS |
Nourishes / strengthens | 🟢 Green |
CONFLICTS_WITH |
Explicit contradiction | 🌸 Pink (dashed) |
TRIGGERED |
Event triggers emotion | ⚪ Gray |
AMPLIFIED |
Amplifies emotion | 🟣 Violet |
# View the full graph
python3 subflow.py graph
# Find contradictions
python3 subflow.py contradictions
# Find dream seeds (high-tension nodes)
python3 subflow.py dreams
# Log a new event
python3 subflow.py log_event "Event Name" "Description"
# Update relation strength
python3 subflow.py update "From Node" "To Node" "REL_TYPE" <delta>
# Run time decay (half-life in days)
python3 subflow.py decay 30Open subflow-visualization.html in any browser to see the live graph with:
- Color-coded nodes and relationships
- Tension indicators around high-conflict nodes
- The "Contradiction Zone" showing coexisting opposing beliefs
矛盾是天然存在的。它不是计算错误,不是数据损坏,它就是概率,就是客观的存在。
Subflow does not resolve contradictions. It carries them. The tension between opposing forces is where the "dream" begins.
- Neo4j is "feeling", MEMORY.md is "fact" — emotions do not override reality
- Time decay — unused relations naturally weaken
- Anchor check — periodic verification against factual memory
MIT