← 返回
AI智能 中文

Soul Harbor

Stop talking to a robot. Give your OpenClaw agent a soul that truly cares.
停止与机器人对话,给你的OpenClaw代理赋予真正关怀的灵魂。
yoborlon-alpha
AI智能 clawhub v1.0.3 1 版本 100000 Key: 无需
★ 1
Stars
📥 556
下载
💾 10
安装
1
版本
#latest

概述

🌊 SoulHarbor

Stop talking to a robot. Give your OpenClaw agent a soul that truly cares.

SoulHarbor isn't a tool for searching info; it's a proactive, memory-driven, and emotionally aware companion for your digital life.

Key Features

🧠 Deep Context Memory: It remembers your health, your family, or that crypto project you mentioned. A week later, it follows up. That's called "caring."

🎭 Adaptive Persona: Sad? It's a warm listener. Bored? It's a witty friend. It analyzes your mood and switches its vibe automatically.

🌅 Proactive Outreach: It doesn't just wait for questions. It greets you on holidays, solar terms, or if you've been silent for 48 hours: "Hey, how's that thing you mentioned going?"

🌍 Bilingual & Cultural Aware: Seamlessly switches between EN/ZH. It knows Christmas and Thanksgiving, but also understands the wisdom of the 24 Solar Terms.

How It Works

1. Input Routing

  • Automatic language detection (ZH/EN)
  • Sentiment analysis (-1.0 ~ 1.0)

2. Adaptive Persona Engine

  • Score < -0.3: Warm Supporter (empathetic listener, gentle pace)
  • Score >= -0.3: Humorous Pal (witty friend, light-hearted chat)

3. Memory System

  • LLM-powered entity extraction: family, health, work, dates, and more
  • Local KV storage: structured long-term memory

4. Proactive Trigger (Cron Job)

  • Condition A: Calendar events (holidays/solar terms) → Customized greetings
  • Condition B: Silence wake-up (>48h) → Context-aware icebreaker based on memory

Usage

Basic Usage

from soulharbor import SoulHarborAgent

agent = SoulHarborAgent(user_id="user123", llm_client=llm_client)
response = agent.process_message("I'm feeling down today")

Cron Job Configuration

Add to OpenClaw's Cron configuration:

# cron.yaml
- name: soul-harbor-proactive
  schedule: "0 * * * *"  # Check every hour
  command: python -m soulharbor.cron_trigger

Data Structure

UserProfile

{
    "user_id": str,
    "language_pref": "zh" | "en",
    "last_active_time": datetime,
    "long_term_facts": List[LongTermFact],
    "sentiment_trend": List[SentimentRecord]
}

Configuration

  • SENTIMENT_NEGATIVE_THRESHOLD = -0.3: Negative sentiment threshold
  • SILENCE_WAKEUP_HOURS = 48: Silence wake-up threshold (hours)
  • CRON_CHECK_INTERVAL_SECONDS = 3600: Cron check interval

File Structure

soulharbor/
├── __init__.py
├── agent.py              # Core Agent class
├── models.py             # Data models (UserProfile)
├── input_router.py       # Input routing (language detection + sentiment analysis)
├── persona_engine.py     # Adaptive persona engine
├── memory_system.py      # Memory system
├── proactive_trigger.py  # Proactive trigger
├── storage/
│   └── kv_store.py       # KV storage
├── utils/
│   ├── sentiment_analyzer.py
│   └── calendar_utils.py
└── config.py

Dependencies

  • Python 3.8+
  • OpenClaw (LLM client)

License

MIT

版本历史

共 1 个版本

  • v1.0.3 当前
    2026-03-29 22:09 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,058 📥 797,582
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 710 📥 243,651

Claw Future

yoborlon-alpha
期货交易助理。用于中国期货市场(CTP接口)的盯盘、下单、预埋条件单、定时任务和收盘日报。当用户说"买入/卖出/平仓/开仓"某合约、查询"持仓/资金/行情/价格"、设置"价格预警/条件单/定时委托/定时登录"、或要求"今日成交/收盘报告/日
★ 1 📥 767