# otieno2/eva architecture

> Architecture diagram of the GitHub repository otieno2/eva, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/otieno2/eva
- Repository: https://github.com/otieno2/eva

## Overview

EVA is a digital-life agent that learns from interaction, develops internal state and memory, and can grow its brain and acquire tools. The principal user workflow is to open the voice-first UI, interact with the running EVA, and observe its responses and recorded state. Headless curiosity-driven training is a distinct learning path. The graph preserves documented capabilities such as self-modification, reproduction, and transparency; unsampled subsystems are connected only where the README or source index supports the relationship.

Main entry points: [`eva/training/loop.py`](https://github.com/otieno2/eva/blob/main/eva/training/loop.py) (Training loop), [`eva/ui/server.py`](https://github.com/otieno2/eva/blob/main/eva/ui/server.py) (Web UI), [`eva/core/baby_brain.py`](https://github.com/otieno2/eva/blob/main/eva/core/baby_brain.py) (Growable brain), [`eva/curiosity/reward.py`](https://github.com/otieno2/eva/blob/main/eva/curiosity/reward.py) (Curiosity reward)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Interaction &amp; runtime"]
  node_entry["Command entry<br/>[run.py]"]
  node_ui["Web UI<br/>[server.py]"]
end

subgraph group_learning["Learning &amp; cognition"]
  node_brain["Growable brain<br/>[baby_brain.py]"]
  node_tokenizer["Source tokenizer<br/>[tokenizer.py]"]
  node_training["Training loop<br/>[loop.py]"]
  node_environment["Learning environment<br/>[base.py]"]
  node_curiosity["Curiosity reward<br/>[reward.py]"]
  node_affect["Affective state<br/>[affect.py]"]
  node_developmental_emotions["Emotion milestones<br/>[developmental.py]"]
end

subgraph group_development["Growth &amp; identity"]
  node_evolver["Lifetime evolution<br/>[evolver.py]"]
  node_self_model["Self model<br/>[self_model.py]"]
  node_self_modifier["Self modification<br/>[self_modifier.py]"]
  node_reproduction["Birth &amp; genome"]
end

subgraph group_memory["Memory &amp; transparency"]
  node_episodic["Episodic memory<br/>[episodic.py]"]
  node_persistent[("Persistent memory<br/>[persistent.py]")]
  node_transparency["Transparency &amp; safety"]
end

subgraph group_support["Guidance &amp; tools"]
  node_caregiver["Caregiver guidance<br/>[caregiver.py]"]
  node_tools["Tool subsystem"]
end

node_user(("User"))
node_web_search{{"Web search"}}

node_user -->|"starts"| node_entry
node_entry -->|"launches UI"| node_ui
node_user -->|"interacts via"| node_ui
node_ui -->|"constructs"| node_brain
node_ui -->|"constructs"| node_tokenizer
node_ui -->|"reads and records"| node_persistent
node_ui -->|"configures"| node_tools
node_training -->|"trains"| node_brain
node_training -->|"uses"| node_tokenizer
node_training -->|"steps"| node_environment
node_training -->|"computes reward"| node_curiosity
node_training -->|"updates"| node_affect
node_training -->|"updates"| node_developmental_emotions
node_training -->|"stores experience"| node_episodic
node_training -->|"requests guidance"| node_caregiver
node_curiosity -->|"measures information gain"| node_brain
node_curiosity -->|"scores tool use"| node_tools
node_evolver -->|"grows"| node_brain
node_self_modifier -.->|"modifies self"| node_self_model
node_reproduction -->|"births fresh brains"| node_brain
node_ui -->|"serves memory views"| node_persistent
node_transparency -.->|"inspects memory"| node_persistent
node_tools -.->|"searches web"| node_web_search

click node_entry "https://github.com/otieno2/eva/blob/main/run.py"
click node_ui "https://github.com/otieno2/eva/blob/main/eva/ui/server.py"
click node_brain "https://github.com/otieno2/eva/blob/main/eva/core/baby_brain.py"
click node_tokenizer "https://github.com/otieno2/eva/blob/main/eva/core/tokenizer.py"
click node_training "https://github.com/otieno2/eva/blob/main/eva/training/loop.py"
click node_environment "https://github.com/otieno2/eva/blob/main/eva/environment/base.py"
click node_curiosity "https://github.com/otieno2/eva/blob/main/eva/curiosity/reward.py"
click node_affect "https://github.com/otieno2/eva/blob/main/eva/emotions/affect.py"
click node_developmental_emotions "https://github.com/otieno2/eva/blob/main/eva/emotions/developmental.py"
click node_evolver "https://github.com/otieno2/eva/blob/main/eva/evolution/evolver.py"
click node_self_model "https://github.com/otieno2/eva/blob/main/eva/autonomy/self_model.py"
click node_self_modifier "https://github.com/otieno2/eva/blob/main/eva/autonomy/self_modifier.py"
click node_reproduction "https://github.com/otieno2/eva/tree/main/eva/reproduction"
click node_episodic "https://github.com/otieno2/eva/blob/main/eva/memory/episodic.py"
click node_persistent "https://github.com/otieno2/eva/blob/main/eva/memory/persistent.py"
click node_transparency "https://github.com/otieno2/eva/tree/main/eva/transparency"
click node_caregiver "https://github.com/otieno2/eva/blob/main/eva/guidance/caregiver.py"
click node_tools "https://github.com/otieno2/eva/tree/main/eva/tools"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_ui,node_user toneBlue
class node_brain,node_tokenizer,node_training,node_environment,node_curiosity,node_affect,node_developmental_emotions toneAmber
class node_evolver,node_self_model,node_self_modifier,node_reproduction toneMint
class node_episodic,node_persistent,node_transparency toneRose
class node_caregiver,node_tools,node_web_search toneIndigo
```

## Components

### Interaction & runtime

- [Command entry](https://github.com/otieno2/eva/blob/main/run.py): `run.py`
- [Web UI](https://github.com/otieno2/eva/blob/main/eva/ui/server.py): `eva/ui/server.py`

### Learning & cognition

- [Growable brain](https://github.com/otieno2/eva/blob/main/eva/core/baby_brain.py): `eva/core/baby_brain.py`
- [Source tokenizer](https://github.com/otieno2/eva/blob/main/eva/core/tokenizer.py): `eva/core/tokenizer.py`
- [Training loop](https://github.com/otieno2/eva/blob/main/eva/training/loop.py): `eva/training/loop.py`
- [Learning environment](https://github.com/otieno2/eva/blob/main/eva/environment/base.py): `eva/environment/base.py`
- [Curiosity reward](https://github.com/otieno2/eva/blob/main/eva/curiosity/reward.py): `eva/curiosity/reward.py`
- [Affective state](https://github.com/otieno2/eva/blob/main/eva/emotions/affect.py): `eva/emotions/affect.py`
- [Emotion milestones](https://github.com/otieno2/eva/blob/main/eva/emotions/developmental.py): `eva/emotions/developmental.py`

### Growth & identity

- [Lifetime evolution](https://github.com/otieno2/eva/blob/main/eva/evolution/evolver.py): `eva/evolution/evolver.py`
- [Self model](https://github.com/otieno2/eva/blob/main/eva/autonomy/self_model.py): `eva/autonomy/self_model.py`
- [Self modification](https://github.com/otieno2/eva/blob/main/eva/autonomy/self_modifier.py): `eva/autonomy/self_modifier.py`
- [Birth & genome](https://github.com/otieno2/eva/tree/main/eva/reproduction): `eva/reproduction`

### Memory & transparency

- [Episodic memory](https://github.com/otieno2/eva/blob/main/eva/memory/episodic.py): `eva/memory/episodic.py`
- [Persistent memory](https://github.com/otieno2/eva/blob/main/eva/memory/persistent.py): `eva/memory/persistent.py`
- [Transparency & safety](https://github.com/otieno2/eva/tree/main/eva/transparency): `eva/transparency`

### Guidance & tools

- [Caregiver guidance](https://github.com/otieno2/eva/blob/main/eva/guidance/caregiver.py): `eva/guidance/caregiver.py`
- [Tool subsystem](https://github.com/otieno2/eva/tree/main/eva/tools): `eva/tools`

### Other components

- **User**
- **Web search**

## Connections

- User → Command entry: starts
- Command entry → Web UI: launches UI (evidence: `run.py`)
- User → Web UI: interacts via
- Web UI → Growable brain: constructs (evidence: `eva/ui/server.py`)
- Web UI → Source tokenizer: constructs (evidence: `eva/ui/server.py`)
- Web UI → Persistent memory: reads and records (evidence: `eva/ui/server.py`)
- Web UI → Tool subsystem: configures (evidence: `eva/ui/server.py`)
- Training loop → Growable brain: trains (evidence: `eva/training/loop.py`)
- Training loop → Source tokenizer: uses (evidence: `eva/training/loop.py`)
- Training loop → Learning environment: steps (evidence: `eva/training/loop.py`)
- Training loop → Curiosity reward: computes reward (evidence: `eva/training/loop.py`)
- Training loop → Affective state: updates (evidence: `eva/training/loop.py`)
- Training loop → Emotion milestones: updates (evidence: `eva/training/loop.py`)
- Training loop → Episodic memory: stores experience (evidence: `eva/training/loop.py`)
- Training loop → Caregiver guidance: requests guidance (evidence: `eva/training/loop.py`)
- Curiosity reward → Growable brain: measures information gain (evidence: `eva/curiosity/reward.py`)
- Curiosity reward → Tool subsystem: scores tool use (evidence: `eva/curiosity/reward.py`)
- Lifetime evolution → Growable brain: grows (evidence: `eva/evolution/evolver.py`)
- Self modification → Self model: modifies self
- Birth & genome → Growable brain: births fresh brains
- Web UI → Persistent memory: serves memory views (evidence: `eva/ui/server.py`)
- Transparency & safety → Persistent memory: inspects memory
- Tool subsystem → Web search: searches web
