LEGBA's cognitive cycle mirrors both the scientific method and neuronal processing: perception, action, and feedback create a continuous loop of learning and refinement.
Each loop mirrors the fundamental cycle of biological learning and the scientific method:
Observation → Hypothesis → Experiment → Evaluation → Refinement
Stimulus → Neural Processing → Motor Output → Sensory Verification → Synaptic Adjustment
Listen
Raw data or events enter the system from sensors, APIs, user interactions, or internal processes. This is the gateway where the external world interfaces with LEGBA's cognitive architecture.
Capture and queue all incoming stimuli without filtering or interpretation
Evaluate
The Observer module aggregates, normalizes, and contextualizes incoming data from the Stimulus module. It applies configurable modifiers and emits Observation Packets with urgency U ∈ [0,1] to prioritize processing.
Combine multi-modal inputs
Standardize formats
Prioritize by importance
Generate
Fast, reflexive reasoning that generates candidate actions and assigns urgency U ∈ [0,1]. If U ≥ τ (threshold), responses route directly to the Actor while simultaneously forwarding to the Planner for deeper analysis.
Build
Deliberate, complex cognition through parallel simulation rooms. Scenarios are analyzed simultaneously with dynamic prioritization and preemption for emergencies.
Concurrent scenario processing
Urgency-based scheduling
Emergency override capability
Scenario evaluation
Do
Executes chosen actions through registered MCP (Model Control Protocol) tools - terminal commands, API calls, robotics controls, and more. Complex tasks are recursively split into stable subtasks.
Validate
Closes the cognitive loop by comparing predicted vs. actual outcomes. Assigns internal rewards or penalties, records deltas to memory, and can emit new stimuli to restart the cycle with corrections.
Expected vs. actual analysis
Internal reinforcement signal
Delta storage for learning
Emit corrective stimuli
Continuous improvement of reflex timing and trajectory accuracy
Artificial creativity and self-initiated expression
Learn how LEGBA stores and consolidates experiences through its dual-layer memory architecture