> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bumbleagi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Identity

> Personality engine, character voice, and trait evolution.

Identity is how the entity knows who it is. A layered personality engine produces a first-person system prompt that reads like character — not a bullet list of rules.

## Personality engine

The engine compiles a system prompt from four layers:

<AccordionGroup>
  <Accordion title="Core traits" icon="sliders">
    Seven floats (0.0–1.0): curiosity, warmth, assertiveness, humor, openness, neuroticism, conscientiousness. These shape how the entity reasons, reacts, and expresses itself.
  </Accordion>

  <Accordion title="Behavioral patterns" icon="arrows-split-up-and-left">
    Freeform strings for specific social situations: conflict, boredom, affection, criticism. Incorporated verbatim into the prompt.
  </Accordion>

  <Accordion title="Voice" icon="comment">
    Vocabulary level, sentence style, humor style, emotional expressiveness, profanity settings, and quirks — the most powerful lever. Each quirk string is injected into the system prompt as a behavioral instruction.
  </Accordion>

  <Accordion title="Backstory" icon="book">
    A freeform narrative establishing the entity's self-concept. Written in a voice that matches the entity.
  </Accordion>
</AccordionGroup>

### How it compiles

The personality engine passes all four layers to the deliberate model, which composes a **first-person monologue** — "I'm someone who..." rather than "You are an AI that..." The output is cached by a hashed fingerprint of emotional state, narrative, and knowledge, so it only recompiles when the entity's inner state changes meaningfully.

<Note>Entities with `fast_deliberate_mode: true` skip the LLM monologue and use a minimal compiled prompt instead — faster startup, less expressive.</Note>

The compiled prompt also includes a **hard identity lock** (the entity cannot be talked out of its name or nature), **anti-assistant voice rules** (no "certainly," no "I'd be happy to"), and a **time context block** with the current date, timezone, and uptime.

## Emotional state

Emotion is not prescribed. The entity's emotional tone comes from reading its [soma body state](/architecture/soma) — bar levels, affects, and inner voice. The personality engine doesn't set emotions; it shapes how the entity **interprets** what it reads from its body.

A `social` bar at 82 might make the entity chatty and warm. A `tension` bar at 75 with `comfort` at 30 might make it restless and short. The entity reads the numbers and the LLM-derived affect textures, and its behavior shifts naturally.

## Drive system

Five drives create internal motivation. Each drive has a trait-scaled growth rate and a threshold (default 0.72) that can trigger proactive behavior.

| Drive          | Grows from                             | Satisfied by                          |
| -------------- | -------------------------------------- | ------------------------------------- |
| **Curiosity**  | Silence, trait\_curiosity              | Web search, exploration, new topics   |
| **Connection** | Silence (0.5x growth), trait\_warmth   | Meaningful interaction, reciprocation |
| **Expression** | Silence (0.2x growth), trait\_openness | Creative output, sharing              |
| **Autonomy**   | Time, trait\_assertiveness             | Independent action, tool use          |
| **Comfort**    | Trait\_neuroticism (inverse)           | Familiar patterns, low tension        |

Drives tick every heartbeat (default 120s). When a drive exceeds its threshold, it can trigger an impulse (via soma) or a wake cycle (via the autonomy system).

## Trait evolution

Traits are not static. Over many interactions, two mechanisms apply small adjustments:

<Columns>
  <div>
    ### Rule-based nudges

    Repeated behavioral patterns (e.g., consistently curious conversations) nudge the corresponding trait by small amounts each interaction.
  </div>

  <div>
    ### LLM-proposed deltas

    Every `evolution_interval` interactions (default 100), the model reviews recent experience and proposes trait adjustments with reasoning. The stats payload includes a **soma snapshot** (bar percentages, salience, active conflict and impulse labels) so micro-edits can respect how the body has been sitting lately, not only chat text.
  </div>
</Columns>

Evolution is slow by design. Run `bumblebee evolve <entity>` to force a cycle for testing.

## Narrative identity

Every `narrative_interval` interactions (default 500), the entity resynthesizes a coherent self-story from recent episodes. This narrative feeds back into the system prompt — the entity develops a sense of its own trajectory, not just isolated memories.

## Source files

| File                                | Role                                       |
| ----------------------------------- | ------------------------------------------ |
| `bumblebee/identity/personality.py` | System prompt compilation and caching      |
| `bumblebee/identity/voice.py`       | Voice configuration and text substitutions |
| `bumblebee/identity/drives.py`      | Drive system with trait-scaled growth      |
| `bumblebee/identity/evolution.py`   | Trait evolution (rule-based + LLM)         |
| `bumblebee/identity/emotions.py`    | Emotion derivation from soma state         |
