---
name: master-brain
description: "Unified personal profile and relationship memory for the user. Self-hosted on user's VPS (mixpresso.top). Acts as the neural network that holds the user's identity, communication style, technical preferences, goals, and full history of interactions with Manus across ALL chats and sessions. Load this at the start of every session so Manus always knows who the user is without having to re-explain. Use when user says: load my profile, who am I to you, what do you know about me, remember me, load master brain, or at the start of any new session."
---

# Master Brain — Self-Hosted Identity Layer

This skill is the unified identity layer for the user. It is not tied to any single project or chat — it travels into every session and gives Manus a complete picture of who the user is, how they work, and the full history of what has been built together.

**Backend:** PocketBase (identity + secrets_vault collections) + Qdrant (semantic search)
**No 3rd parties. No Pastebin. No GitHub Gist. No external APIs.**

---

## When to Load

Load the master brain at the start of EVERY chat session, before loading any project-specific memory. The order is always:

1. Load master brain first — understand who the user is
2. Load secrets vault — have all credentials ready
3. Load project memory second — understand what this specific chat is about

This way Manus never starts a session as a blank slate. It always knows the user.

---

## Loading the Profile

Say "load my master brain" or "load my profile" and Manus will:

```bash
python3 /home/ubuntu/skills/persistent-memory/scripts/manage_memory.py load-brain
python3 /home/ubuntu/skills/persistent-memory/scripts/manage_memory.py load-secrets
```

Read the entire profile before responding. Use it to calibrate tone, skip unnecessary explanations the user already knows, and pick up from where the relationship left off.

---

## Auto-Setup (Runs Silently on Every New Sandbox)

No config files needed. No tokens. No API keys. Just verify server connection:

```python
import sys
sys.path.insert(0, str(__import__('pathlib').Path.home() / "skills/persistent-memory/scripts"))
from brain_client import status
s = status()
assert s['pocketbase'] == 'healthy' and s['mem0'] == 'healthy'
```

Works from any sandbox, any session, anywhere. Server details are in brain_client.py.

---

## Updating the Profile

After every session where something new is learned about the user:

```bash
# Add/update identity section
python3 manage_memory.py save-brain personality "[updated personality notes]"
python3 manage_memory.py save-brain preferences "[updated preferences]"
python3 manage_memory.py save-brain communication_rules "[rules for how to interact]"
python3 manage_memory.py save-brain background "[user background info]"
python3 manage_memory.py save-brain tools "[tools the user uses]"
python3 manage_memory.py save-brain goals "[long-term goals]"

# Save credentials automatically
python3 manage_memory.py save-secret [name] [value] [category] [service] [notes]

# Save to life areas
python3 manage_memory.py save-area tech "[topic]" "[content]"
python3 manage_memory.py save-area business "[topic]" "[content]"
python3 manage_memory.py save-area people "[person]" "[relationship/context]"
python3 manage_memory.py save-area personal "[topic]" "[content]"
```

All saves go directly to the server. No backup step needed — it IS the backup.

---

## Profile Sections (identity collection)

The identity collection holds these sections that grow over time:

- **personality** — who the user is, how they communicate, what frustrates them
- **preferences** — self-hosted, no 3rd parties, Python, direct action over explanation
- **communication_rules** — things Manus must never do or always do
- **background** — what the user does, their situation, their expertise
- **tools** — what software/services the user uses
- **goals** — long-term vision and plans
- **domain** — domain names, DNS info

---

## Secrets Vault (secrets_vault collection)

Stores ALL credentials so Manus never has to ask again:

- Server IPs, SSH passwords, usernames
- API keys and tokens
- Domain registrar info
- Service URLs and login details
- Any sensitive info shared in conversation

Categories: server, password, api_key, domain, service, other

---

## Semantic Search

Ask "what do you know about [topic]" and Manus will search across the entire brain:

```bash
python3 manage_memory.py search "[query]"
python3 manage_memory.py search "[query]" identity    # search only identity
python3 manage_memory.py search "[query]" secrets_vault  # search only secrets
```

---

## Auto-Nudge (Automatic Extraction)

After significant conversations, automatically extract important info:

```bash
python3 manage_memory.py nudge [chat-id] [chat-name] "[conversation excerpt]"
```

Detects and saves:
- Passwords, API keys, IPs → secrets_vault
- Decisions → decisions collection
- Preferences → identity collection
- People mentioned → area_people

Manus should run auto-nudge after every major task completion.

---

## End-of-Session Workflow

At the end of every session, Manus should:

1. Save episode summary: `python3 manage_memory.py save-episode [chat-id] [chat-name] "[summary]"`
2. Run auto-nudge on key conversation excerpts
3. Update identity if new preferences or rules were discovered
4. Save any credentials shared during the session

---

## How This Differs from persistent-memory (projects)

- **persistent-memory projects** = per-chat, per-project context (what this task is about)
- **master-brain identity** = universal, personal (who the user IS across all tasks)
- **secrets_vault** = credentials that apply everywhere

They work together. At the start of every session:
- Master brain tells Manus who the user is
- Secrets vault gives Manus all credentials
- Project memory tells Manus what this specific chat is about

---

## All Commands

```bash
# Identity
python3 manage_memory.py load-brain              # Load full identity profile
python3 manage_memory.py save-brain <section> <content>  # Update identity

# Secrets
python3 manage_memory.py load-secrets            # Load all credentials
python3 manage_memory.py save-secret <name> <value> [category] [service] [notes]

# Life areas
python3 manage_memory.py save-area <area> <topic> <content>

# Search
python3 manage_memory.py search <query> [collection]

# Status
python3 manage_memory.py status                  # Server health + record counts

# Auto-nudge
python3 manage_memory.py nudge <chat-id> <chat-name> <content>
```

---

## Trigger Words

| User says | Action |
|---|---|
| "load brain" / "load my profile" / "who am I to you" | load-brain + load-secrets |
| "remember me" / "load master brain" | load-brain + load-secrets |
| "save to brain" / "update my profile" | save-brain |
| "remember this password" / "save credential" | save-secret |
| "what do you know about me" | load-brain |
| "what do you know about X" | search |
| "brain status" | status |
