-
-
Notifications
You must be signed in to change notification settings - Fork 10
Multi Profile Workflows
What are profiles, use cases, and best practices - Separate work/personal contexts, multi-client management, and experimentation with complete isolation guarantees.
Profiles are isolated memory contexts in SuperLocalMemory. Each profile has its own:
- SQLite database
- Knowledge graph
- Learned patterns
- Configuration settings
Think of profiles as completely separate workspaces. Memories in one profile never affect another profile.
Example:
Profile: work
- 500 memories about work projects
- Graph: FastAPI, PostgreSQL, microservices
- Patterns: Python backend, REST APIs
Profile: personal
- 200 memories about personal projects
- Graph: React, Firebase, Next.js
- Patterns: TypeScript frontend, serverless
No context bleeding between them!
Problem:
Without profiles:
- Work memories mixed with personal projects
- AI gets confused about which project you mean
- Privacy concerns (work info in personal context)
Solution:
# Work context
slm switch-profile work
slm remember "Company API uses OAuth2" --tags work,security
# Personal context
slm switch-profile personal
slm remember "My side project uses simple JWT" --tags personalScenario: Freelancer working with 5 clients
# Client A
slm switch-profile client-acme
slm remember "Acme uses AWS, PostgreSQL, React"
# Client B
slm switch-profile client-techcorp
slm remember "TechCorp uses GCP, MySQL, Vue"
# Each client's context completely isolatedBenefits:
- No accidental data leaks between clients
- Clear context switching
- Easy to archive old clients
Scenario: Testing new patterns without polluting main database
# Create experiment profile
slm switch-profile experiment
# Try new patterns
slm remember "Testing new architecture pattern"
slm build-graph --clustering
# If experiment fails, delete profile
slm switch-profile delete experiment --confirmScenario: Team sharing common knowledge base
# Team profile (shared via git)
slm switch-profile team
slm remember "Team standard: Use TypeScript" --tags team
slm remember "Team uses Jest for testing" --tags team
# Each member switches to team profile for shared contextslm switch-profile listOutput:
Available Profiles:
* default (active)
Location: ~/.claude-memory/profiles/default/
Memories: 247
Last used: 2026-02-07 14:23
work
Location: ~/.claude-memory/profiles/work/
Memories: 538
Last used: 2026-02-06 09:15
personal
Location: ~/.claude-memory/profiles/personal/
Memories: 123
Last used: 2026-02-05 18:42
client-acme
Location: ~/.claude-memory/profiles/client-acme/
Memories: 89
Last used: 2026-01-28 11:30
# Basic creation
slm switch-profile create work
# With description
slm switch-profile create work --description "Work projects and decisions"
# With custom location (advanced)
slm switch-profile create work --path /custom/path/workWhat happens:
- Creates new directory:
~/.claude-memory/profiles/work/ - Initializes fresh SQLite database
- Creates empty graph and pattern tables
- Sets up profile metadata
# Switch to profile
slm switch-profile work
# Verify switch
slm statusOutput:
✓ Switched to profile: work
Current Profile: work
Total memories: 538
Knowledge graph: 342 nodes, 789 edges
What changes:
- All subsequent commands use work profile
- Database path:
~/.claude-memory/profiles/work/memory.db - Graph and patterns specific to work
# Delete profile (requires confirmation)
slm switch-profile delete experiment
# Force delete without confirmation
slm switch-profile delete experiment --confirmWarning: This permanently deletes all memories in that profile!
Backup first:
# Backup before deletion
cp -r ~/.claude-memory/profiles/experiment/ ~/backups/experiment-$(date +%Y%m%d)/
slm switch-profile delete experiment --confirmEach profile has:
~/.claude-memory/profiles/work/
├── memory.db # Separate SQLite database
├── graph_data.db # Separate graph storage
├── patterns.db # Separate learned patterns
└── config.json # Profile-specific config
Guarantee: Memories in one profile NEVER appear in another profile.
# Build graph in work profile
slm switch-profile work
slm build-graph
# Creates work-specific graph
# Build graph in personal profile
slm switch-profile personal
slm build-graph
# Creates completely separate graphNo shared nodes or edges between profiles.
# Work profile learns work patterns
slm switch-profile work
# Learns: Python, FastAPI, microservices
# Personal profile learns different patterns
slm switch-profile personal
# Learns: JavaScript, Next.js, serverless
# No pattern leakageSetup:
# Client profiles
slm switch-profile create client-acme --description "Acme Corp (2026)"
slm switch-profile create client-techcorp --description "TechCorp (2026)"
slm switch-profile create client-startup --description "Startup Inc (2026)"
# Personal profile
slm switch-profile create personal --description "Personal projects"Daily workflow:
# Morning: Client Acme
slm switch-profile client-acme
slm recall "last meeting notes"
# Work on Acme project
# Afternoon: Client TechCorp
slm switch-profile client-techcorp
slm recall "API architecture"
# Work on TechCorp project
# Evening: Personal
slm switch-profile personal
slm remember "New blog post idea"Benefits:
- Clear context separation
- No accidental leaks
- Easy billing (track per client)
- Archive old clients easily
Setup:
# Work profile
slm switch-profile create work --description "Day job"
# Personal profile
slm switch-profile create personal --description "Side projects"Work hours:
slm switch-profile work
slm remember "Sprint planning: Implement OAuth2" --tags sprint
slm remember "Code review feedback: Add error handling" --tags reviewAfter hours:
slm switch-profile personal
slm remember "Side project: Build portfolio site with Next.js" --tags project
slm remember "Learn Rust for fun" --tags learningBenefits:
- Mental separation
- Privacy (work info not in personal)
- Different pattern learning
Setup:
# One profile per major project
slm switch-profile create project-api --description "REST API rewrite"
slm switch-profile create project-frontend --description "React dashboard"
slm switch-profile create project-mobile --description "React Native app"Benefits:
- Clear project boundaries
- Easy to archive finished projects
- Project-specific knowledge graphs
- No cross-project confusion
Setup:
# Experiment profile
slm switch-profile create experiment --description "Testing new patterns"
# Try new approaches
slm remember "Experimenting with GraphQL"
slm remember "Testing microservices with gRPC"
slm build-graph --clusteringCleanup:
# Experiment failed, delete profile
slm switch-profile default
slm switch-profile delete experiment --confirmBenefits:
- Safe to try new patterns
- No pollution of main database
- Easy to discard failed experiments
Setup:
# Create team profile
slm switch-profile create team --description "Team shared knowledge"
# Save team decisions
slm remember "Team standard: TypeScript for all new code" --tags standard
slm remember "Team uses Jest for testing" --tags standard
slm remember "Code review checklist: Security, tests, docs" --tags checklistSharing (via git):
# Export team profile
cd ~/.claude-memory/profiles/
tar czf team-profile.tar.gz team/
# Team members import
cd ~/.claude-memory/profiles/
tar xzf team-profile.tar.gz
slm switch-profile teamBenefits:
- Shared context across team
- Consistent recommendations
- Onboarding new members
Good:
slm switch-profile create work-project-api
slm switch-profile create personal-blog
slm switch-profile create client-acme-2026Poor:
slm switch-profile create p1
slm switch-profile create test
slm switch-profile create stuffslm switch-profile create work \
--description "Day job at TechCorp - API team (2026)"Benefits:
- Easy to remember what profile is for
- Shows in
listoutput - Helps team members understand context
# General programming knowledge
slm switch-profile default
slm remember "Python best practices" --tags reference
slm remember "Git cheatsheet" --tags reference
# Switch to project-specific for work
slm switch-profile work# Archive completed project
tar czf ~/archives/client-acme-$(date +%Y%m%d).tar.gz \
~/.claude-memory/profiles/client-acme/
# Delete profile
slm switch-profile delete client-acme --confirm# Backup all profiles (cron)
#!/bin/bash
backup_dir=~/backups/slm-$(date +%Y%m%d)
mkdir -p "$backup_dir"
cp -r ~/.claude-memory/profiles/ "$backup_dir/"# Add to .bashrc or .zshrc
# Auto-prompt for profile on terminal start
if command -v slm &> /dev/null; then
echo "Current profile: $(slm status | grep 'Current Profile' | cut -d: -f2)"
echo "Switch profile? (work/personal/default): "
fiEach profile can have different settings:
Example: ~/.claude-memory/profiles/work/config.json
{
"profile_name": "work",
"description": "Work projects",
"created_at": "2026-02-07T14:23:00",
"settings": {
"default_importance": 5,
"auto_build_graph": true,
"pattern_learning_threshold": 0.5
}
}Global config: ~/.claude-memory/config.json
{
"default_profile": "work",
"mcp_server_enabled": true,
"shell_integration": true
}# Set profile via env var
export SLM_PROFILE=work
slm status # Uses work profile
# Temporary switch
SLM_PROFILE=personal slm recall "blog ideas"Setup (zsh/bash):
# Add to .bashrc or .zshrc
cd() {
builtin cd "$@"
# Auto-switch profile based on directory
if [[ $PWD == ~/work/* ]]; then
export SLM_PROFILE=work
elif [[ $PWD == ~/personal/* ]]; then
export SLM_PROFILE=personal
else
export SLM_PROFILE=default
fi
}# Add to .bashrc or .zshrc
# Work aliases
alias work-slm='SLM_PROFILE=work slm'
alias work-recall='SLM_PROFILE=work slm recall'
# Personal aliases
alias personal-slm='SLM_PROFILE=personal slm'
alias personal-recall='SLM_PROFILE=personal slm recall'
# Usage
work-recall "API architecture"
personal-remember "Blog post idea"Cause: Profile doesn't exist
Solution:
# List available profiles
slm switch-profile list
# Create if needed
slm switch-profile create missing-profileCause: Already using that profile
Solution:
# Check current profile
slm status | grep "Current Profile"
# Switch to different profile
slm switch-profile defaultCause: Database file damaged
Solution:
# Restore from backup
cp ~/backups/slm-20260207/profiles/work/memory.db \
~/.claude-memory/profiles/work/memory.db
# Or rebuild from scratch
slm switch-profile delete work --confirm
slm switch-profile create workCause: Switched to wrong profile or profile empty
Solution:
# Verify current profile
slm status
# List all profiles and memory counts
slm switch-profile list
# Switch to correct profile
slm switch-profile work
# Verify memories exist
slm listDisk space per profile:
- Empty: ~100 KB
- 1,000 memories: ~5 MB
- 10,000 memories: ~50 MB
Switch time:
- ~10ms (instant)
No performance degradation with multiple profiles.
# Switch to source profile
slm switch-profile work
# Export memories
sqlite3 ~/.claude-memory/profiles/work/memory.db \
"SELECT json_group_array(json_object(
'content', content,
'tags', tags,
'project_name', project_name,
'importance', importance
)) FROM memories;" > work_export.json# Switch to destination profile
slm switch-profile personal
# Import memories (Python script)
python3 << 'EOF'
import json, sqlite3
conn = sqlite3.connect("/Users/$(whoami)/.claude-memory/profiles/personal/memory.db")
with open('work_export.json') as f:
data = json.load(f)
for mem in data:
conn.execute(
"INSERT INTO memories (content, tags, project_name, importance) VALUES (?, ?, ?, ?)",
(mem['content'], mem['tags'], mem['project_name'], mem['importance'])
)
conn.commit()
EOF
# Rebuild graph in destination
slm build-graph- Quick Start Tutorial - First-time setup
- CLI Cheatsheet - Command reference
- Configuration - Advanced settings
- Why Local Matters - Privacy benefits
- Pattern Learning - How patterns work
Created by Varun Pratap Bhardwaj Solution Architect • SuperLocalMemory
SuperLocalMemory V3 — Your AI Finally Remembers You. 100% local. 100% private. 100% free.
Part of Qualixar | Created by Varun Pratap Bhardwaj | GitHub
SuperLocalMemory V3
Getting Started
Reference
Architecture
Enterprise
Release Notes
V2 Documentation