Security-hardened MyVector MySQL profile storage with capability bounding for OpenClaw. Tracks interactions, relationships, context, skill usage, notes, preferences, media, food, personas, mood states, engagement patterns, proactive reminders, agent learnings, community sentiment, trending topics, and community events. Now includes HindSight (post-conversation consolidation), HoloGraphic (multi-dimensional tagging), and Hancho (knowledge graph reasoning) memory systems. v4.0.0 integrates with the memory_consolidation.py script for automated heartbeat-based memory maintenance. All SQL is routed through docker exec into the MyVector container. Requires a dedicated least-privilege MySQL user — root/admin accounts are rejected.
4.0.0 – 2026-05-21
VectorClaw v4.0.0 includes three memory enhancement systems:
user_context (categories: discovery, behavioral, emotional)user_context (category: metadata)user_context (categories: reasoning, social_graph)| Type | Table | Description |
|---|---|---|
| ------ | ------- | ------------- |
| Episodic | user_context | Specific events/experiences with timestamps |
| Semantic | user_context | General facts and knowledge |
| Procedural | user_context | How-to knowledge and habits |
| Emotional | user_mood | Emotional states with triggers and intensity |
| Preference | user_preferences | Explicit preferences with confidence |
| Synaptic | synaptic_memory | Key-value memory with priority and decay |
| HoloGraphic | user_context (metadata) | Multi-dimensional tags (emotion, context, urgency, people) |
| Hancho | user_context (reasoning) | Derived knowledge graph relationships |
| HindSight | user_context (discovery) | Post-conversation consolidation findings |
memory_consolidation.py at ~/.openclaw/workspace/scripts/memory_consolidation.py```bash
python3 memory_consolidation.py --user
python3 memory_consolidation.py --all-users
python3 memory_consolidation.py --user
python3 memory_consolidation.py --user
python3 memory_consolidation.py --user
python3 memory_consolidation.py --user
```
docker exec.env files for credentials (parsed as KEY=VALUE, never shell-sourced)sql_safe_exec.sh for safetyquery command is SELECT-only/ /, --, #)| Option | Default | Notes |
|---|---|---|
| ----------------- | --------------- | ---------------------------------------- |
MYSQL_USER | required | Dedicated least-privilege account (NOT root) |
MYSQL_PASSWORD | required | Store in .env (chmod 600) |
MYSQL_PORT | 3310 | MyVector Docker port mapping |
DATABASE | mysqlclaw | Target database |
MyVector Docker container must be running:
docker run -d --name myvector-db -p 3310:3306 \
-e MYSQL_ROOT_PASSWORD=<root_pw> \
-e MYSQL_DATABASE=mysqlclaw \
ghcr.io/askdba/myvector:mysql8.4
# 1. Start MyVector container (if not running)
docker run -d --name myvector-db -p 3310:3306 \
-e MYSQL_ROOT_PASSWORD=<root_pw> \
-e MYSQL_DATABASE=mysqlclaw \
ghcr.io/askdba/myvector:mysql8.4
# 2. Create a dedicated least-privilege user inside MyVector
docker exec -it myvector-db mysql -u root -p<root_pw> -e "
CREATE USER IF NOT EXISTS 'mysqlclaw'@'%' IDENTIFIED BY '<strong_password>';
GRANT SELECT, INSERT, UPDATE, DELETE ON mysqlclaw.* TO 'mysqlclaw'@'%';
FLUSH PRIVILEGES;
"
# 3. Create .env file with the dedicated user's credentials
cat > .env <<'EOF'
MYSQL_USER=mysqlclaw
MYSQL_PASSWORD=<strong_password>
MYSQL_PORT=3310
DATABASE=mysqlclaw
EOF
chmod 600 .env
# 4. Apply schema with setup wizard
cd ~/.openclaw/workspace/skills/custom-mysql
./setup_wizard.sh
# 5. Run initial consolidation
cd ~/.openclaw/workspace
python3 scripts/memory_consolidation.py --user <your_discord_id>
# Query (SELECT-only)
custom_mysql.sh query "SELECT * FROM users LIMIT 5"
# Execute script (DML requires interactive confirmation)
custom_mysql.sh exec --file /path/to/scripts.sql
# Convenience commands:
custom_mysql.sh insert_interaction <uid> <dir> <topic> <summary> [sentiment] [is_important]
custom_mysql.sh insert_note <uid> <note> [category] [is_pinned]
custom_mysql.sh insert_context <uid> <key> <value> [type] [importance] [expires_at]
custom_mysql.sh insert_skill_usage <uid> <skill_name> [action] [status] [duration_ms] [error_type]
custom_mysql.sh insert_relationship <uid> <related_uid> <type> [strength] [trust] [notes]
custom_mysql.sh insert_mood <uid> <mood> [intensity] [trigger_topic] [confidence]
custom_mysql.sh insert_reminder <uid> <trigger_type> <condition> <text> [priority]
custom_mysql.sh insert_thought <uid> <thought> [type] [channel_id]
custom_mysql.sh insert_learning <type> <title> <description> [priority] [user] [skill]
custom_mysql.sh insert_event <type> <title> [description] [channel_id]
# Memory consolidation (v4.0.0):
python3 ~/.openclaw/workspace/scripts/memory_consolidation.py --user <uid>
python3 ~/.openclaw/workspace/scripts/memory_consolidation.py --all-users
user_interactions: 30-day rolling windowuser_mood: 90-day rolling windowuser_context (HoloGraphic metadata): 30-day refresh cycleuser_context (Hancho reasoning): 90-day review cycleuser_context (HindSight discoveries): 90-day review cyclethought_stream: 30-day rolling windowsynaptic_memory: auto-decay via decay_rate columncommunity_sentiment, trending_topics: 90-day rolling windowuser_activity_heatmap: rolling 90-day windowsuser_notes, user_relationships, skill_usage, user_context: retained until explicitly deletedproactive_reminders: auto-deactivate after max_triggers reachedmemory_consolidation_log: retained for auditing (no auto-delete)rollback_user.sql covers all 26 user-data tablessource: 'inferred' and lower confidenceagent_learnings and rule-like memories must be reviewed before affecting future behaviordocker exec--defaults-extra-file with chmod 600.env parsed safely: KEY=VALUE line parsing only — never evaluated as shell codequery command is SELECT-only (no DML through query)user_interactions.sentiment (enum) + sentiment_score (float, -1 to 1)community_sentiment aggregated by time periodmood_impact field): The agent_config_files` table and related commands removedSee changelog.md for full version history.
For step-by-step instructions, see SETUP_GUIDE.md.
Visit
共 4 个版本