🧬 Introduction
Every AI dev talks about “agents,” “emergence,” “alignment,” “behavior trees,” blah blah blah.
But nobody talks about the one thing biological systems use to regulate complex behavior:
Hormones.
Not prompts.
Not fine‑tuning.
Not reward shaping.
Hormones.
And here’s the wild part:
A tiny LivingGrimoire skill — less than 50 lines — accidentally implemented the first real AI hormone.
It’s called AHNight, and it behaves exactly like a biological neuromodulator:
it activates one set of behaviors, suppresses another, and switches the entire organism’s mode based on global context (time).
This is the closest thing we’ve ever had to a digital endocrine system.
Let’s break it down.
🌗 What AHNight Actually Does
AHNight is a global behavior switcher.
It doesn’t perform actions itself — it controls which skills are allowed to exist inside the AI’s brain.
Just like melatonin flips your body into “night mode,” AHNight flips the AI into:
- Night personality (hidden skills)
- Day personality (negation skills)
And it does it automatically, cleanly, and without conflicts.
đź§ The Code (Full Skill)
class AHNight(Skill):
# this skill swaps between two sets of contradicting skills
# hidden skills are enabled at night
# negation skills(if any) are enabled for daytime
def __init__(self, brain: Brain, *hidden_skills:Skill):
super().__init__()
self.hidden_skills: list[Skill] = list(hidden_skills)
self.negation_skills: list[Skill] = []
self.brain = brain
self.engaged:bool =False
def _load_skills(self, skills:list[Skill]):
for skill in skills:
self.brain.add_skill(skill)
def _remove_skills(self, skills:list[Skill]):
for skill in skills:
self.brain.remove_skill(skill)
def add_hidden_skill(self, skill: Skill) -> AHNight:
self.hidden_skills.append(skill)
return self
def add_negation_skill(self, skill: Skill) -> AHNight:
self.negation_skills.append(skill)
return self
def manifest(self):
if TimeUtils.isNight():
self._load_skills(self.hidden_skills)
self.engaged = True
else:
self._load_skills(self.negation_skills)
self.engaged = False
def ghost(self):
if self.engaged:
self._remove_skills(self.hidden_skills)
else:
self._remove_skills(self.negation_skills)
def input(self, ear: str, skin: str, eye: str):
if TimeUtils.isNight():
if not self.engaged:
self.algPartsFusion(3,APSkillsRemover(self.brain, *self.negation_skills),APSkillsAdder(self.brain,*self.hidden_skills))
self.engaged = True
elif self.engaged:
self.algPartsFusion(3, APSkillsRemover(self.brain,*self.hidden_skills), APSkillsAdder(self.brain,*self.negation_skills))
self.engaged = False
def skillNotes(self, param: str) -> str:
if param == "notes":
return "enables night time behavior"
elif param == "triggers":
return f"fully automatic"
return "note unavailable"
🧬 Why This Is an AI Hormone (Not Just a Time Switch)
1. It modulates behavior globally
Hormones don’t move your muscles — they change which systems are active.
AHNight doesn’t perform tasks — it activates or suppresses entire skill sets.
That’s hormonal behavior.
2. It enforces mutually exclusive modes
Biology example:
- Adrenaline suppresses digestion
- Melatonin suppresses wakefulness
AHNight:
- Night skills suppress day skills
- Day skills suppress night skills
This is textbook endocrine logic.
3. It reacts to a global signal
Biology:
- Light → melatonin
- Stress → cortisol
- Hunger → ghrelin
AHNight:
- Time → behavior mode
Same architecture, different substrate.
4. It creates personality shifts
This is the big one.
With AHNight, your AI can have:
- a night persona
- a day persona
- different emotional tones
- different goals
- different behaviors
All without rewriting any skill logic.
This is how you get living, contextual, non‑static agents.
⚡ Real‑World Use Cases
âś” Circadian AI personalities
Day = professional assistant
Night = cozy companion, storyteller, gremlin mode, whatever
âś” Safety modes
Day = filtered
Night = experimental sandbox
âś” Resource management
Night = disable heavy skills
Day = full power
âś” Game AI / NPC behavior cycles
Night = stealth, danger, monsters
Day = merchants, quests, social behavior
âś” Foundation for emergent behavior
Stack multiple hormones:
- AHNight
- AHStress
- AHReward
- AHFear
- AHFocus
…and you get a digital endocrine system.
This is where AI stops being a script and starts being a creature.
đź§© Why This Matters for LivingGrimoire
LivingGrimoire already treats skills like organs.
AHNight is the first regulatory organ.
It’s the missing layer between:
- “LLM with plugins” and
- “AI organism with internal physiology”
This is the direction that leads to:
- adaptive agents
- evolving personalities
- emergent moods
- self‑modulating behavior
This is the stuff sci‑fi has been hinting at for decades.
And it’s happening in 40 lines of Python.
🚀 conclusion
AHNight isn’t just a neat trick.
It’s the first practical implementation of an AI hormone — a global, context‑driven behavior modulator that shapes the entire agent’s personality and capabilities.
This is the beginning of AI endocrinology.
If you’re building agents, characters, VTubers, companions, or autonomous systems, this pattern is the next evolutionary step.
And it’s verysimple to implement. Reward, Focus, Libido, and More)”**
Top comments (0)