Principle:42 evey Hermes plugins Identity Evolution
| Knowledge Sources | |
|---|---|
| Domains | Identity, Self_Improvement, Behavioral_Learning |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
A self-improvement pattern where the agent extracts behavioral rules from its experiences and appends them to its identity file (SOUL.md), evolving its behavior over time through accumulated lessons.
Description
Identity Evolution enables an agent to learn from experience and modify its own behavioral guidelines. The pattern:
- Reflection input: The agent provides a reflection (what it learned) or an explicit behavior rule.
- Rule extraction: If no explicit rule is given, the LLM distills the reflection into a single concise behavioral rule (max 15 words, starting with a verb like "Always", "Never", "Prefer").
- Append to identity: The rule is added to a
## Learned Behaviorssection in SOUL.md with a date annotation. - Bounded growth: Only the most recent N rules (default 10) are kept, preventing unbounded growth while preserving recent learning.
This creates a feedback loop: the agent's experiences produce behavioral rules, which shape future behavior, producing new experiences. The bounded window (10 rules) ensures the identity stays current and doesn't accumulate contradictory or outdated rules.
Usage
Use this principle when an agent should adapt its behavior based on experience. Suitable for long-running autonomous agents that encounter recurring situations. The LLM-based rule extraction ensures rules are concise and actionable. Not suitable for systems where behavior must be fully deterministic and operator-controlled.
Theoretical Basis
The identity evolution loop:
# Abstract pattern (NOT real implementation)
REFLECT_PROMPT = """Extract ONE concise behavioral rule (max 15 words).
Start with a verb (Always, Never, Prefer, Check, Use).
Reflection: {reflection}
Behavioral rule:"""
rule = call_llm(REFLECT_PROMPT.format(reflection=reflection))
behaviors.append(f"- {rule} ({date})")
behaviors = behaviors[-MAX_LEARNED:] # keep last 10
soul_md.update_learned_behaviors(behaviors)
The bounded growth window (last 10) acts as a sliding window of recent behavioral learning, ensuring the agent's identity reflects its most recent experiences rather than its entire history.