How scarlet-raine/synthetic_heart works
Synthetic Heart is a modular, persistent AI-persona application spanning chat interfaces, a WebUI, plugins, and interchangeable model engines. The principal workflow is a human message entering through an interface, being queued and prepared with persona, context, and memory, then handled by an engine and returned through the interface. Separate branches cover persistent identity and growth, speech/avatar presentation, and integrations. The README documents these capabilities, while sampled source evidence is incomplete; edges not directly supported by excerpts or documentation are omitted.
Main entry points: prompt_engine.py Prompt construction · App.vue WebUI client · db.py Persistent database · core_initializer.py Component discovery
Components 20
Runtime orchestration
- Application startup
main.py - Component discovery
core/core_initializer.py - Message queue
core/message_queue.py - Engine registry
core/cortex_registry.py - Configuration registry
core/config_manager.py
Conversation and cognition
- Prompt construction
core/prompt_engine.py - Context and recall
core/history_engine.py - Action parsing
core/action_parser.py - Model engines
engines/external_engines
Persistent persona
- Persistent database
core/db.py - Persona state
core/persona_manager.py - Emotional identity
core/soul - Reflection and growth
plugins/grillo
Interfaces and integrations
- Chat interfaces
interface - WebUI client
frontend/src/App.vue - Plugin capabilities
plugins - Web search
plugins/web_search/search_engine.py
Voice and avatar
- Speech engines
plugins/auris_engines/vosk_engine.py - Avatar presentation
frontend/src/composables/vrm
Other components
- Human user
Connections 21
- Human user → Chat interfaces: sends message
- Human user → WebUI client: uses
- Application startup → Component discovery: initializes
main.py - Chat interfaces → Message queue: enqueues messages
core/message_queue.py - WebUI client → Message queue: submits chat
- Message queue → Prompt construction: starts response
- Prompt construction → Context and recall: recalls context
core/prompt_engine.py - Prompt construction → Model engines: requests generation
- Engine registry → Model engines: loads engines
core/cortex_registry.py - Prompt construction → Action parsing: scopes actions
core/prompt_engine.py - Context and recall → Persistent database: reads memory
core/history_engine.py - Persona state → Persistent database: persists identity
- Emotional identity → Persistent database: stores emotional state
- Reflection and growth → Persistent database: develops memories
plugins/grillo/grillo_weekly_review/grillo_weekly_review.py - Component discovery → Plugin capabilities: discovers components
core/core_initializer.py - Component discovery → Engine registry: registers engines
core/core_initializer.py - Plugin capabilities → Web search: offers search
plugins/rift_vessel/knowledge_client.py - Model engines → Speech engines: supports speech
- WebUI client → Avatar presentation: presents avatar
- Chat interfaces → Human user: returns replies
- WebUI client → Human user: shows responses