CoolFace
Apppublic

daniel8919/limbic-reasoning-agent

sourceHugging Facemitupdated 5mo agoView on Hugging Face
1likes
App README

🧠 Limbic-Modulated Reasoning Agent

An LLM whose reasoning behavior adapts in real-time based on a simulated neuro-behavioral state engine.

How It Works

User Message β†’ Limbic Engine β†’ Modulate LLM Parameters β†’ Generate Response
                  β”‚                    β”‚
                  β”œβ”€ Arousal/Valence   β”œβ”€ Temperature (fear↓ seeking↑)
                  β”œβ”€ 4 Affective       β”œβ”€ Top-p (fear=tight, seek=wide)
                  β”‚  Engines           β”œβ”€ Behavioral Directive
                  β”œβ”€ Hormones          β”œβ”€ Active Instincts
                  └─ Psychological     └─ Self-Debug Protocol
                     Lattice

Core Formulas (from LIMBIC-system-PACKGE)

FormulaSourceEffect
temp = 1.0 - fearΓ—0.9 + seekingΓ—2.0amygdala.pyFear β†’ deterministic, Seeking β†’ creative
hormone[t+1] = h[t] + (baseline - h[t]) Γ— 0.05endocrine.pyHormones decay toward homeostasis
fear_mod = 1.0 + cortisol - oxytocinΓ—0.5fear.pyCortisol amplifies fear, oxytocin dampens
shadow += 0.1 Γ— suppressed_countlattice.pySuppressed drives build up, may "outburst"

Agentic Patterns (from everything-claude-code)

  • β€”4-Tier Memory: Session β†’ Observations β†’ Instincts β†’ State Store
  • β€”Learned Instincts: Behavioral patterns activated by limbic state
  • β€”4-Phase Self-Debug: Capture β†’ Diagnose β†’ Fix β†’ Report

Architecture

ModuleLinesPurpose
limbic_engine.py480Full limbic state machine with 14 formulas
memory.py3324-tier memory + instincts + self-debugger
training_plan.py468GRPO training recipe + dataset generation
app.py436ZeroGPU Gradio interface

Try It

Type messages with different emotional tones and watch the Limbic Dashboard react:

  • β€”πŸ˜° Fear: "I'm terrified of losing my job" β†’ Low temperature, structured response
  • β€”πŸ” Seeking: "Tell me something fascinating about the brain" β†’ High temperature, creative response
  • β€”πŸ’™ Care: "How can I help my friend with depression?" β†’ Empathetic, supportive response
  • β€”πŸ˜’ Panic: "My best friend is moving away forever" β†’ Warm, validating response

Training Plan

3-stage pipeline to fine-tune a base model:

  1. 1.SFT Warm-Up: 5K synthetic conversations (limbic state β†’ response style)
  2. 2.GRPO Loop Learning: 2K psychology prompts Γ— 4 reward functions
  3. 3.Active Learning: Uncertain predictions β†’ human labels β†’ retrain

See training_plan.py for the complete recipe and runnable script.