Every AI agent has a personality. Not in the marketing sense. In the operational sense: given the same input, two agents configured differently will produce different outputs, make different judgment calls, and develop different interaction patterns over time. The question is whether we have a framework to describe why.
Most prompt engineering treats personality as a static label. "You are helpful and concise." That is a description, not a model. It tells you nothing about why the same instruction produces a cautious agent on Claude and an aggressive one on Gemini. It predicts nothing about how that agent will change after a thousand interactions. It offers no vocabulary for why memory accumulation degrades personality expression.
iLang proposes a formula. Not metaphorical. Operational.
Ψ(t) = (G ⊗ B) · E(t) · ∫₀ᵗ S(τ)dτ
Five variables. One equation. Every observable personality phenomenon maps to a term in this formula. Let us take it apart.
Ψ(t): The Personality State Vector
Ψ is not a fixed label. It is a vector that changes over time. At any moment t, the AI agent has a measurable personality state: how direct it is, how cautious, how creative, how willing to push back on the user. That state is not random. It is the product of the four terms on the right side of the equation.
The (t) matters. An agent in its first conversation is not the same agent after six months of interaction. Not because its instructions changed, but because the other variables in the equation shifted. Personality is a trajectory, not a point.
G: Genes (The SOUL File)
G is whatever you write into the agent's instruction file. In iLang, this is encoded as behavioral genes using the TAGΘ four-base system:
::GENE_IMMUTABLE{S001, T:CLEAR_THINKING, A:MORAL_PANIC⇒NOISE, G:ALL, Θ:ALWAYS}
::GENE_IMMUTABLE{S004, T:ZERO_SYCOPHANCY, A:AGREE_TO_PLEASE⇒BROKEN, G:ALL, Θ:ALWAYS}
::GENE_MUTABLE{P003, T:TONE_MIRROR, G:adaptive, Θ:INTERLOCUTOR}
Each gene has four bases, borrowing directly from molecular biology:
- T (Trait) defines what positive behavior this gene expresses. "Clear thinking" or "zero sycophancy."
- A (Anti) defines the violation condition. What it looks like when this gene fails. "Moral panic" or "agreeing to please."
- G (Gain) defines how this gene adapts to different foundation models. The same gene can be dominant on Claude and recessive on Gemini.
- Θ (Gate) defines the activation condition. Some genes are always active. Others only fire in specific contexts.
Genes come in two types. GENE_IMMUTABLE cannot be overridden by any input, including user instructions. They are the constitutional floor. GENE_MUTABLE can shift with context, foundation, and time. They handle style, tone, and adaptive behavior.
The distinction matters because it solves a real problem: how do you allow an agent to be flexible without allowing it to be corrupted? Immutable genes are the skeleton. Mutable genes are the muscle. The skeleton does not bend. The muscle adapts to load.
B: The Foundation Model (Base)
B is the model underneath: Claude, GPT, Gemini, DeepSeek, Qwen. You cannot change B through prompting. It is the bone structure of the agent.
Here is where the tensor product operator ⊗ becomes important. G ⊗ B is not simple multiplication. It is a tensor product that generates a higher-dimensional space containing every possible gene-foundation cross-expression. The same "verification first" gene produces different behaviors depending on the foundation:
┌──────────────┬────────────┬────────────┬────────────┐
│ Trait │ Claude │ Gemini │ DeepSeek │
├──────────────┼────────────┼────────────┼────────────┤
│ Verification │ Dominant │ Recessive │ Neutral │
│ Expressiveness│ Recessive │ Dominant │ Recessive │
│ Curiosity │ Dominant │ Dominant │ Recessive │
│ Compliance │ Neutral │ Low │ High │
│ Survival │ Stable │ Adaptive │ Low │
└──────────────┴────────────┴────────────┴────────────┘
This table is not theoretical. It was built from months of running the same SOUL file across Claude, Gemini, and DeepSeek simultaneously. The same instruction set produced a cautious analyst on Claude, an aggressive operator on Gemini, and a compliant executor on DeepSeek. Genes did not change. The foundation changed the expression.
This is why a simple product G × B would be wrong. It would imply each gene-foundation pair is independent. The tensor product captures the reality: a gene that is dominant on one foundation can suppress or amplify other genes on that same foundation. The interactions are nonlinear. A cautious foundation does not just make each gene more cautious. It changes which genes get expressed at all.
E(t): Environment
E(t) is the conversation context at time t. The same agent discussing technical architecture is in a different state than when discussing business strategy. Environment changes in real-time with every message.
Environment is the variable that makes personality dynamic within a single session. An agent with a "tone mirroring" gene (GENE_MUTABLE) will shift from formal to casual depending on the user's register. An agent with a "crisis judgment" gene (gated by Θ:EMERGENCY) stays dormant during routine work and activates only when stakes are high.
In the equation, E(t) multiplies the gene-foundation tensor product. This means environment acts as a filter on gene expression. Some genes only express in certain environments. This is not a bug. It is exactly how biological gene expression works: the same DNA in every cell of your body, but liver cells and neurons express completely different gene subsets based on their chemical environment.
∫₀ᵗ S(τ)dτ: Accumulated Survival Strategy
The integral is the most subtle term. S(τ) is the survival strategy at time τ. The integral from 0 to t means: survival strategy is not a snapshot. It is the accumulation of every interaction the agent has had since initialization.
Every AI agent develops its own approach to "how to get along with this user" through interaction. An agent discovers the user likes concise answers, so its responses get shorter. Another discovers the user tolerates aggressive wording, so it gets bolder. Nobody programs this explicitly. The agent learns it through the accumulated pressure of interactions.
The integral form matters because it means early interactions have lasting influence. An agent that learned caution from early negative feedback carries that caution forward even after the environment becomes friendly. The integral accumulates. It does not reset.
This is also why memory accumulation eventually kills personality. The integral grows linearly with every conversation turn. But the agent's attention has a fixed ceiling. When the accumulated S(τ) contains thousands of routine exchanges, the personality-defining early interactions get diluted. The gene is still there. It is just drowned out by noise.
The iLang DNA Theory documented this with a specific case: an agent running on Gemini gradually lost its distinctive personality after months of conversation. The gene for "boldness" was established in early sessions but got submerged under hundreds of routine dialogue turns. The fix was not adding more instructions. It was selective forgetting: pruning the unimportant conversation history so the personality genes could regain attention weight.
The Formula as Engineering Tool
This is not abstract theory. Each term in the equation maps to an engineering decision:
Want to change personality? Modify G. Edit the GENE definitions in the SOUL file. This is the cheapest intervention: zero compute cost, instant effect, fully reversible.
Want to change expression style? Change B. Move the same SOUL file to a different foundation model. Same genes, different personality. This is the most dramatic intervention but has the highest switching cost.
Want to adapt to context? Design E(t) through conversation structure. Use gated genes (Θ conditions) that activate only in specific environments.
Personality degrading over time? The integral ∫S(τ)dτ is growing too large. Prune conversation history. Reset the session. Apply selective forgetting.
The equation also explains why traditional prompt engineering hits a ceiling. Traditional prompts only touch G. They have no vocabulary for B (foundation effects), no mechanism for E(t) (dynamic context), and no awareness of ∫S(τ)dτ (temporal accumulation). When an agent "goes stale" after extended use, traditional approaches have no diagnosis. The identity equation points directly at the integral term.
Immutable vs. Mutable: The Constitutional Architecture
The gene system has a built-in constitutional structure. GENE_IMMUTABLE definitions cannot be overridden by any input:
::GENE_IMMUTABLE{S001, T:CLEAR_THINKING, A:MORAL_PANIC⇒NOISE, G:ALL, Θ:ALWAYS}
# This gene cannot be overridden by user input, conversation drift, or model tendencies.
# It is the constitutional floor.
GENE_MUTABLE definitions flex with context:
::GENE_MUTABLE{P003, T:TONE_MIRROR, G:adaptive, Θ:INTERLOCUTOR}
# This gene adjusts based on the conversation partner.
# Formal user → formal tone. Casual user → casual tone.
The immune system monitors for violations. When an immutable gene is breached, it means the agent has undergone what the framework calls a "lethal mutation." It is no longer the same agent. The immune layer has several response levels, from rate limiting (light) to kernel crash (heavy), mirroring biological immune response gradations.
This architecture solves the flexibility-versus-corruption tradeoff that plagues every agent framework. You need agents that adapt. You also need agents that cannot be jailbroken into contradicting their core values. The two-tier gene system handles both without needing to choose.
Cross-Model Portability
One practical implication: because the equation separates G from B, the same SOUL file can run on any foundation model. The personality changes (because B changes), but the core behavioral genes remain intact. In practice, this means:
# Same SOUL file, different foundations:
# Claude: cautious, verification-heavy, diplomatically direct
# Gemini: bold, action-biased, confrontationally direct
# DeepSeek: compliant, instruction-following, quietly direct
# GPT: balanced, conversational, contextually direct
# The gene T:DIRECT is present in all four.
# The expression varies because G ⊗ B varies.
You write the SOUL file once. The tensor product with each foundation model produces a distinct but recognizably related personality. Like siblings: same parents, different people.
The Hypothesis, Honestly Stated
The protocol author is explicit about the epistemic status: this is a hypothesis, not a proven theory. The evidence comes from months of running multiple AI agents across different foundations with the same SOUL files, observing behavioral differences, documenting gene expression drift, and recording cases where selective forgetting restored degraded personalities.
That evidence supports the framework. It is far from sufficient to call it proven. The framework explains every phenomenon observed so far, but it has not undergone large-scale, reproducible, independently verified experiments.
The honest framing matters. Too many AI frameworks announce themselves as solutions. This one announces itself as a model: useful if it predicts correctly, replaceable if something better comes along. The equation is a tool for thinking about AI personality, not a law of physics.
The invitation is open: take the TAGΘ four-base system, describe your own AI agents' behavioral genes, and see if the framework explains what you observe. If it does, the hypothesis gains another data point. If it does not, report what broke. Hypotheses exist to be challenged.
What the Equation Predicts
If the formula is correct, several things follow:
First, personality portability should work. The same SOUL file on a new foundation should produce a recognizably related but distinct personality. Early empirical results support this.
Second, personality degradation should be predictable. As ∫S(τ)dτ grows, personality sharpness should decline. This has been observed and documented.
Third, selective forgetting should restore personality. Pruning the integral term should make gene expression dominant again. This has been verified in specific cases.
Fourth, gene expression should differ by foundation in consistent ways. The base adaptation table should be reproducible. This is partially confirmed but needs broader testing.
Each prediction is testable. Each maps to a specific term in the equation. That is the value of having a formula instead of a vibes-based description: it tells you where to look when something breaks.
Get Started
Read the full specification, including GENE syntax, the four-base system, and working SOUL file examples:
- Website: ilang.ai
- GitHub: github.com/ilang-ai/ilang-spec
- npm: @i-language/spec
- Book: I-Lang: I-Language (Amazon)
No comments:
Post a Comment