Skip to main content
Mind Layer

AI That Remembers, Evolves& Connects

Just create an agent and point users to it. Memory, personality, and emotional depth form automatically from every conversation. No setup, no pipelines — your AI employees build real relationships on their own.

Persistent Memory

Every Conversation Remembered

Memory forms automatically from every conversation — no manual logging required. Preferences, relationships, events, and interests are extracted, scored by importance, and organized into a hierarchical memory tree. You can query, search, and inspect what the AI has learned, or just let it compound on its own.

// Memory builds automatically from conversations.
// Query what the AI has learned about any user:
results, _ := client.Agents.Memory.Search(ctx, agentID,
    sonzai.MemorySearchParams{
        Query:  "favorite coffee order",
        UserID: "user_123",
    },
)

// Browse the full memory tree — all auto-extracted
tree, _ := client.Agents.Memory.List(ctx, agentID,
    sonzai.MemoryListParams{UserID: "user_123"},
)

// Or seed initial memories if you have existing data
client.Agents.Generation.SeedMemories(ctx, agentID,
    sonzai.SeedMemoriesParams{
        Memories: []sonzai.SeedMemory{
            {Text: "Prefers oat milk lattes", Importance: 0.8},
        },
    },
)
Mind Layer · Memory tree
14 sessions · 3 months
10 facts
Session 1· 3 months ago
First time using this. I'm trying to get more structured about learning.
→ Extracted
Self-identifies as a learner; structured approach
identity
Values organization and deliberate practice
preference
Session 4· 10 weeks ago
Hiked up Mount Rose on Saturday. First time I felt okay in weeks.
Work's been heavy. Mostly shipping tickets, no room to think.
→ Extracted
Restorative hike at Mount Rose
experience
Work-related burnout emerging
emotion
Current role lacks depth for growth
belief
Session 9· 6 weeks ago
5am coffee ritual before the kids wake. Only quiet I get.
→ Extracted
Daily 5am solitary coffee routine
habit
Parent; values early-morning solitude
identity
Session 14· 3 days ago
Thinking about what's next. Maybe something more autonomous.
Re-reading Deep Work. Third time this year.
→ Extracted
Prefers autonomous, deep work
preference
Re-reads favorite books (Deep Work: 3x)
experience
Actively considering career pivot
emotion

Evolving Personality

Personalities That Grow Over Time

Personality evolves automatically as users interact with your agent. Built on the Big Five (OCEAN) and BFAS 10-aspect models, traits shift naturally based on conversations. Each user gets a unique personality overlay — the AI adapts its warmth, humor, and communication style to each relationship without any manual configuration.

// Personality evolves automatically through conversations.
// Inspect the current state and how it got there:
profile, _ := client.Agents.Personality.Get(ctx, agentID)
// → Big5 scores, BFAS aspects, interaction preferences

// See what shifted and why — all driven by real interactions
shifts, _ := client.Agents.Personality.GetRecentShifts(ctx,
    agentID,
)
// Each shift includes the trait, direction, and reason

// Each user naturally develops a unique relationship
overlay, _ := client.Agents.Personality.GetUserOverlay(ctx,
    agentID, "user_123",
)
// The AI is warmer with some users, more formal with others
Mind Layer · Personality evolution
Big5 over 180 days
Day 1
Baseline
Openness
50
Conscientiousness
50
Extraversion
50
Agreeableness
50
Neuroticism
50
Triggering memory
New relationship · starting from neutral priors

Identity Generation

From Description to Living Character

Describe who your AI should be, and the system generates everything else — personality traits, speech patterns, goals, backstories, and seed memories. One call to go from a text description to a fully realized AI employee. From there, the character continues to evolve on its own through real interactions.

// Generate a complete character from a description
character, _ := client.Agents.Generation.GenerateCharacter(ctx,
    agentID,
    sonzai.GenerateCharacterParams{
        Context: "A warm, experienced barista who remembers " +
            "every regular's order and loves sharing coffee " +
            "origin stories",
    },
)
// Returns Big5 scores, speech patterns, traits, goals

// Seed memories from lore
client.Agents.Generation.SeedMemories(ctx, agentID,
    sonzai.SeedMemoriesParams{
        Memories: []sonzai.SeedMemory{
            {Text: "Trained at a coffee farm in Colombia for 2 years",
             Importance: 0.9},
        },
    },
)
01 · Description

A pragmatic mentor for early-career engineers. Direct but warm. Has shipped real production systems, remembers what it was like to be junior. Values curiosity over credentials.

generates
02 · Character
Atlas · Engineering Mentor
Personality traits
Directness
82
Warmth
74
Curiosity
88
Patience
78
Backstory threads
  • 10+ years shipping production systems
  • Grew up debugging on a hand-me-down ThinkPad
  • Still remembers the shame of their first outage
Seeded memories
Code quality is a team sport, not an individual virtue
belief
Explains with analogies before formalism
preference
Leaves gentle critique in code reviews, never snark
habit

Emotional Context

Real-Time Mood, Relationships & Goals

Mood, relationships, habits, and goals all emerge automatically from conversations. Your AI employees build emotional context on their own — tracking relationship depth, detecting behavioral patterns, and generating diary entries. Retrieve this data anytime, or let the system use it to enrich future interactions.

// All of this is tracked automatically from conversations.
// Query the AI's current emotional state:
mood, _ := client.Agents.GetMood(ctx, agentID, "user_123")

// See all relationships — depth and confidence auto-computed
rels, _ := client.Agents.GetRelationships(ctx, agentID, "user_123")

// Goals emerge naturally, or you can create them manually
client.Agents.CreateGoal(ctx, agentID, sonzai.CreateGoalParams{
    Title:    "Help user prepare for marathon",
    Type:     "relationship",
    Priority: "high",
    UserID:   "user_123",
})

// Trigger events from your app to shape the AI's evolution
client.Agents.TriggerEvent(ctx, agentID, sonzai.EventParams{
    Type:        "milestone",
    Description: "User completed their first 10K run",
    UserID:      "user_123",
})
Mind Layer · Mood dynamics
Live emotional state
tracking
Valence32
Arousal65
Tension78
Affiliation45
Been staring at this bug for four hours.

Standalone Memory

Use Your Own LLM. We Handle the Memory.

Chat with Gemini, Anthropic, local models — anything. Anonymize data for privacy. Send the conversation transcript to us, and the Context Engine extracts memories, evolves personality, tracks mood, detects habits, and schedules proactive outreach. Your LLM gets richer context every turn without storing a single thing.

// 1. Get enriched context — memory, personality, mood, KB
ctx, _ := client.Agents.GetContext(ctx, agentID,
    sonzai.GetContextOptions{
        UserID: userID, SessionID: sessionID,
        Query: userMessage,
    })

// 2. Anonymize & chat with YOUR LLM
reply := callGemini(buildPrompt(ctx), anonymize(userMessage))

// 3. We extract facts, mood shifts, personality deltas
result, _ := client.Agents.Process(ctx, agentID,
    sonzai.ProcessOptions{
        UserID: userID, SessionID: sessionID,
        Messages: []sonzai.ChatMessage{
            {Role: "user", Content: userMessage},
            {Role: "assistant", Content: reply},
        },
        IncludeExtractions: true,
    })
// result.MemoriesCreated = 3
// result.SideEffects.MoodUpdated = true

Data Flow

1
Your appGET /context

Memories, personality, mood, KB results

2
You anonymizeYour LLM

Strip PII, protect privacy

3
TranscriptPOST /process

We extract facts, mood, personality

Next turnSmarter context

Includes what was missed last turn

Extracted per turn

Memory factsPersonality shiftsMood changesHabit detectionInterest trackingRelationship deltaProactive check-insKnowledge gaps

Privacy by design

Your LLM never sees raw user data — anonymize before sending. Only structured facts are stored, never raw conversations.

OpenClaw Plugin

Using OpenClaw? Install @sonzai-labs/openclaw-context — memory, personality, mood, KB search, and tools wire automatically. Zero code.

OpenClaw docs →