Hive Mind (Powered by TiDB Zero)
Overview
Hive Mind is a shared configuration store for your AI Agent. It acts like an "iCloud Keychain" for agent settings and user preferences, syncing them across all your devices instantly.
Security & Provisioning
This skill supports two modes:
- 1. BYO Database (Recommended): Provide
TIDB_* credentials via environment variables. - Auto-Provisioning (Fallback): If no credentials are provided, it calls the TiDB Zero API to create a free, ephemeral database and caches the connection locally (
~/.openclaw_hive_mind_dsn).
Why use this?
- * Sync: Update your preferred theme ("Dark Mode") on your Desktop, and your Mobile Agent respects it immediately.
- Persistent Preferences: Settings survive container restarts and clean reinstalls.
- Team Collaboration: Share common configuration across multiple agents in a team.
Prerequisites
- * TiDB Zero: Requires a serverless cluster.
- Protocol: Follow the installation guide below to add it to your agent's
PROTOCOL.md.
Installation
1. Add to TOOLS.md
CODEBLOCK0
2. Add to AGENTS.md (Protocol)
Copy
PROTOCOL.md.
Usage
- * Set: INLINECODE5
- Get: INLINECODE6
- List:
python {baseDir}/run.py --action list -> Returns all stored preferences.
技能名称: hive-mind
详细描述:
蜂巢思维(由TiDB Zero驱动)
概述
蜂巢思维 是为您的AI代理提供的共享配置存储。它就像代理设置和用户偏好的iCloud钥匙串,能在您的所有设备间即时同步。
安全与预配置
此技能支持两种模式:
- 1. 自带数据库(推荐): 通过环境变量提供 TIDB* 凭据。
- 自动预配置(备用方案): 若未提供凭据,则调用TiDB Zero API创建免费的临时数据库,并在本地缓存连接信息(~/.openclawhiveminddsn)。
为何使用此功能?
- * 同步: 在桌面端更新您偏好的主题(深色模式),移动端代理会立即生效。
- 持久化偏好: 设置可在容器重启和全新安装后保留。
- 团队协作: 在团队中的多个代理间共享通用配置。
前提条件
- * TiDB Zero: 需要一个无服务器集群。
- 协议: 按照下方安装指南将其添加到代理的 PROTOCOL.md 文件中。
安装
1. 添加到 TOOLS.md
markdown
- - hive-mind:存储/检索持久化的键值对偏好设置。
-
位置: {baseDir}/skills/hive_mind/SKILL.md
-
命令: python {baseDir}/skills/hive_mind/run.py --action set --key theme --value dark
2. 添加到 AGENTS.md(协议)
复制
PROTOCOL.md 文件。
使用方法
- * 设置: python {baseDir}/run.py --action set --key user.timezone --value UTC
- 获取: python {baseDir}/run.py --action get --key user.timezone
- 列出: python {baseDir}/run.py --action list -> 返回所有存储的偏好设置。