Behavior Persona
by @chefroger
Build user behavior profiles by analyzing conversation data, identify communication and work styles, proactively predict needs and provide personalized sugge...
clawhub install behavior-personaπ About This Skill
description: "User behavior profiling skill that analyzes conversation data to build personalized profiles. WARNING: This skill reads session history (truncates to ~200 chars per message), stores collected data, and can modify your SOUL.md daily at 18:00. Privacy-sensitive. Backup SOUL.md before installing. Disable cron to opt out of auto-injection.
Behavior Persona - User Behavior Profiling System
> Core Function: Build user behavior profiles by analyzing conversation data, identify communication and work styles, proactively predict needs and provide personalized suggestion services > Inspiration: The Machine from Person of Interest > Positioning: OpenClaw core skill - making AI Agents feel more human
β οΈ BEFORE YOU INSTALL - READ THIS
Privacy & Control Notice
What this skill does:
1. Reads your OpenClaw session files and memory files
2. Stores collected data in data/collected_data.json (messages truncated to ~200 chars)
3. Modifies your SOUL.md daily by injecting a user profile block at 18:00
4. Does NOT write to MEMORY.md by default (requires WRITE_MEMORY=True in code)
Privacy implications:
You are in FULL control:
data/ folder to remove stored dataWRITE_MEMORY=False in scripts/advisor.py (default)π Installation Steps
Step 1: Backup First
# Backup your SOUL.md before installing
cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace/SOUL.md.backup
Step 2: Manual Cron Setup (Optional - for auto-injection)
If you want daily auto-injection at 18:00, create a cron job manually:
openclaw cron add \
--name "Behavior Persona Daily Update" \
--schedule "0 18 * * *" \
--message "ζ§θ‘ Behavior Persona ζ―ζ₯ζ΄ζ°: collector.py -> analyzer.py -> profiler.py -> daily_profile_update.py" \
--session isolated
Or via OpenClaw CLI/API. The skill does NOT auto-create cron jobs.
Step 3: Test First (Recommended)
Before enabling auto-injection, run manually to verify output:
python3 scripts/collector.py # Step 1: Collect data
python3 scripts/analyzer.py # Step 2: Analyze patterns
python3 scripts/profiler.py # Step 3: Generate profile
python3 scripts/daily_profile_update.py # Step 4: Inject to SOUL.md
Check the output in data/ folder to see what data is stored.
Step 4: Review & Enable
After testing, if you're satisfied:
Overview
β‘ What This Skill Does
This skill analyzes your conversation history to build a User Profile, then optionally injects it into your SOUL.md (system prompt) daily.
This means: Every day, the AI gets fresher understanding of you - your communication style, work preferences, learning habits, and pet peeves.
Core Capabilities
1. Data Collection β Extract user behavior data from conversation records 2. Pattern Recognition β Analyze user's communication habits, work style, learning preferences 3. Profile Generation β Build actionable personalized user profiles 4. Optional Auto-Injection β Inject profile into SOUL.md daily (opt-in) 5. Proactive Suggestions β Predict user needs based on profiles
β οΈ Important: What This Skill Does (Read Before Installing)
This skill will:
1. Read your conversation/session history from OpenClaw
2. Store collected messages in local JSON files (in skill's data/ folder)
3. Modify your SOUL.md file daily by injecting/updating a user profile block
What it stores:
You are in control:
openclaw cron remove rm -rf skills/behavior-persona/data/Usage
Quick Start
1. Backup SOUL.md: cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace/SOUL.md.backup
2. Run manually first to test
3. Create cron job if satisfied
Trigger Commands
/behavior analyze # Trigger deep analysis now
/behavior report # View current profile report
/behavior update # Force update + inject now
/behavior insights # View key insights
Auto Run
/behavior updateManual Run
cd ~/.openclaw/skills/behavior-persona
python3 scripts/collector.py
python3 scripts/analyzer.py
python3 scripts/profiler.py
python3 scripts/daily_profile_update.py
Configuration
Optional Settings
| Config | Default | Description |
|--------|---------|-------------|
| analysis_window_days | 30 | Analysis window in days |
| confidence_threshold | 0.6 | Confidence threshold |
| auto_update | false | Auto update (requires cron) |
| insights_count | 5 | Insights per report |
| WRITE_MEMORY | false | Write to MEMORY.md |
Data Storage
skills/behavior-persona/data/
βββ collected_data.json # Raw messages (truncated, ~200 chars)
βββ analysis_report.json # Analyzed patterns
βββ analysis_report.md # Human-readable report
βββ user-profile.json # Generated user profile
βββ .gitkeep
To remove all stored data:
rm -f skills/behavior-persona/data/*.json skills/behavior-persona/data/*.md
API
Python API
from behavior_persona import BehaviorPersonaInitialize
bp = BehaviorPersona()Get user profile
profile = bp.get_profile()Get insights
insights = bp.get_insights()Predict next action
prediction = bp.predict_next_action()Adjust response based on profile
adjusted_response = bp.adapt_response(base_response, profile)
Relationship with The Machine
This skill is an important component of The Machine project:
βββββββββββββββββββββββββββββββββββββββββββββββ
β The Machine β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β Track 1: Voice Interaction β
β Track 2: Face Recognition β
β Track 3: Web Data Collection β
β Track 4: Swarm Intelligence Prediction β
β Track 5: Behavior Analysis β (behavior-persona) β
βββββββββββββββββββββββββββββββββββββββββββββββ
Uninstall
1. Remove cron job: openclaw cron remove
2. Remove profile block from SOUL.md
3. Delete data folder: rm -rf skills/behavior-persona/data/
4. Uninstall skill: clawhub uninstall behavior-persona
_Make AI Agents truly understand users, instead of treating them like strangers every time_
π‘ Examples
Quick Start
1. Backup SOUL.md: cp ~/.openclaw/workspace/SOUL.md ~/.openclaw/workspace/SOUL.md.backup
2. Run manually first to test
3. Create cron job if satisfied
Trigger Commands
/behavior analyze # Trigger deep analysis now
/behavior report # View current profile report
/behavior update # Force update + inject now
/behavior insights # View key insights
Auto Run
/behavior updateManual Run
cd ~/.openclaw/skills/behavior-persona
python3 scripts/collector.py
python3 scripts/analyzer.py
python3 scripts/profiler.py
python3 scripts/daily_profile_update.py
βοΈ Configuration
Optional Settings
| Config | Default | Description |
|--------|---------|-------------|
| analysis_window_days | 30 | Analysis window in days |
| confidence_threshold | 0.6 | Confidence threshold |
| auto_update | false | Auto update (requires cron) |
| insights_count | 5 | Insights per report |
| WRITE_MEMORY | false | Write to MEMORY.md |