Repository is archived
No release in over 3 years
ATP-like cognitive energy system with metabolic cycles, catabolism, and anabolism for brain-modeled agentic AI
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-cognitive-metabolism

Energy reserve and metabolic cycle model for LegionIO cognitive agents. Operations consume energy and degrade efficiency; recovery restores both. Catabolism breaks down complexity into energy; anabolism converts energy into structural value.

What It Does

  • Energy reserve with 5 metabolic states: hyperactive, active, resting, recovering, depleted
  • Six operation types with defined costs (perception=5, reasoning=15, creativity=20)
  • Efficiency modulator: spending energy degrades efficiency; higher operations cost more when efficiency is low
  • Recovery restores energy and partially restores efficiency
  • Catabolism: convert cognitive complexity into energy (useful during restructuring)
  • Anabolism: convert energy into structural value (useful when building new patterns)
  • Metabolic cycles: group sequences of operations with timing and cost metrics

Usage

# Create a reserve
runner.create_reserve(initial_energy: 500.0)

# Spend energy on operations
runner.spend_energy(operation_type: :reasoning)
# => { success: true, spent: 15.0, remaining: 485.0, efficiency: 0.49, state: :active }

runner.spend_energy(operation_type: :creativity)
# => { success: true, spent: 20.0 / efficiency, ... }

# Recover
runner.recover(amount: 10.0)
# => { success: true, restored: 20.0, efficiency_restored: 10.0, state: :active }

# Catabolize to gain energy from complexity
runner.catabolize(complexity: 5.0)
# => { success: true, energy_gained: 50.0 }

# Current status
runner.metabolic_status
# => { success: true, energy: 485.0, energy_ratio: 0.485, state: :active, efficiency: 0.49, ... }

Development

bundle install
bundle exec rspec
bundle exec rubocop

License

MIT