Repository is archived
No release in over 3 years
Raichle (2001) Default Mode Network for brain-modeled agentic AI — resting-state activation for self-referential processing, mind-wandering, spontaneous planning, and social replay when the agent is not task-focused.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

 Project Readme

lex-default-mode-network

Default Mode Network simulation for the LegionIO brain-modeled cognitive architecture.

What It Does

Models the brain's resting-state network that activates during idle time. When the agent has no active task, the DMN generates wandering thoughts across four categories: self-reflection, social replay, spontaneous planning, and associative wandering. Tracks idle duration and transitions through activity modes.

After 30 seconds of no external stimuli: daydreaming mode. After 5 minutes: deep reflection mode.

Usage

client = Legion::Extensions::DefaultModeNetwork::Client.new

# Signal that an external event occurred (resets idle timer)
client.register_external_stimulus(source: :user_request)
# => { success: true, previous_mode: :idle, current_mode: :active }

# Check current mode
client.dmn_mode_status
# => { mode: :idle, mode_label: :daydreaming, idle_duration: 45.2, thought_count: 3 }

# Generate a thought explicitly
client.trigger_self_reflection
# => { success: true, thought: { seed: :values, association_chain: [:values, :purpose, :goals], salience: 0.6, ... } }

client.trigger_spontaneous_plan(goal: :pending_task)
client.trigger_social_replay(interaction: :recent_conversation)

# Get the most salient active thoughts
client.salient_thoughts(count: 5)

# Run the periodic tick (advance mode, decay thoughts, generate idle thought if idle)
client.update_dmn
# => { mode: :idle, faded_count: 1, thought_count: 8, new_thought: { ... } }

Activity Modes

Mode Label Trigger
:active :task_focused stimulus received
:transitioning :shifting brief transition
:idle :daydreaming 30s of no stimulus
:deep_idle :deep_reflection 300s of no stimulus

Development

bundle install
bundle exec rspec
bundle exec rubocop

License

MIT