← 返回
未分类 中文

Behavior Persona

Build user behavior profiles by analyzing conversation data, identify communication and work styles, proactively predict needs and provide personalized sugge...
通过分析对话数据构建用户行为画像,识别沟通与工作风格,主动预测需求并提供个性化建议
chefroger chefroger 来源
未分类 clawhub v2.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 381
下载
💾 0
安装
1
版本
#latest

概述

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:

  • Raw conversation content is stored (truncated)
  • Only stores messages from the last 30 days by default
  • Your SOUL.md will be automatically modified

You are in FULL control:

  • Disable the cron job anytime to stop auto-injection
  • Delete data/ folder to remove stored data
  • Edit/remove the profile block from SOUL.md manually
  • Set WRITE_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:

  • Enable the cron job for daily auto-injection
  • Or run manually when you want to update the profile

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:

  • Messages truncated to ~200 characters
  • Event patterns detected from conversations
  • Channel usage statistics

You are in control:

  • Disable the cron job anytime: openclaw cron remove
  • Delete the profile block manually from SOUL.md
  • Clear all stored data: rm -rf skills/behavior-persona/data/
  • MEMORY.md write is disabled by default

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

  • Not enabled by default - You must manually create the cron job
  • Daily 18:00 (if cron is set up): Full pipeline: collect → analyze → generate profile → inject to SOUL.md
  • On demand/behavior update

Manual 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

ConfigDefaultDescription
------------------------------
analysis_window_days30Analysis window in days
confidence_threshold0.6Confidence threshold
auto_updatefalseAuto update (requires cron)
insights_count5Insights per report
WRITE_MEMORYfalseWrite 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 BehaviorPersona

# Initialize
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_

版本历史

共 1 个版本

  • v2.0.0 当前
    2026-05-07 12:08 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 278 📥 101,504
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 216 📥 71,466
data-analysis

Stock Analysis

udiedrichsen
利用Yahoo Finance数据深度分析股票和加密货币。支持投资组合管理、关注列表与提醒、股息分析、八维度股票评分、热门趋势扫描(热点扫描器)及谣言/早期信号检测。适用于股票分析、投资组合追踪、财报反应、加密货币监控、热门股票发现及在主流
★ 282 📥 58,218