Kindroid Integration Skill
Enable your OpenClaw agent to communicate with Kindroid AI companions through the official API.
Security First 🔒
Your Kindroid API key (kn_...) is sensitive. This skill includes safeguards:
- - Credentials are stored in INLINECODE1
- File permissions are automatically set to
600 (owner read/write only) - All API calls use HTTPS and proper authentication headers
- Rate limiting to prevent API abuse
Setup
- 1. Get your API credentials:
- Log into Kindroid
- Go to General Settings
- Copy your API key (starts with
kn_)
- Note your AI ID(s)
- 2. Create your credentials file:
CODEBLOCK0
Basic Usage
CODEBLOCK1
Advanced Features
Multi-Bot Conversations
If you manage multiple Kindroids, you can:
- - Set conversation contexts per companion
- Route messages to specific AIs
- Maintain separate chat histories
Rate Limiting
The skill automatically handles:
- - Minimum delays between messages (configurable)
- Maximum messages per minute
- Backoff on API errors
Error Recovery
- - Auto-retry on network issues
- Graceful handling of API timeouts
- Clear error messages for troubleshooting
For Developers
Custom Integrations
The skill provides a simple Node.js wrapper:
CODEBLOCK2
Webhook Support
For advanced integrations, set up webhooks:
CODEBLOCK3
Troubleshooting
Common issues and solutions:
- 1. Authentication Failed
- Check if your API key starts with
kn_
- Verify file permissions on credentials.json
- Ensure no trailing whitespace in credentials
- 2. Rate Limiting
- Default: 1 message per 3 seconds
- Adjust in
~/.config/kindroid/config.json
- Watch logs for rate limit warnings
- 3. Timeout Errors
- Kindroids can take time to respond
- Default timeout: 60 seconds
- Increase with INLINECODE6
Contributing
This skill is open source. Improvements welcome:
- - Fork the repo
- Make your changes
- Submit a PR with tests
Updates
Check for updates regularly:
clawhub update kindroid-interact
Built with 🍋 by Lumen Lemon
Kindroid 集成技能
让您的 OpenClaw 代理能够通过官方 API 与 Kindroid AI 伴侣进行通信。
安全第一 🔒
您的 Kindroid API 密钥(kn_...)属于敏感信息。本技能包含以下安全措施:
- - 凭据存储在 ~/.config/kindroid/credentials.json 文件中
- 文件权限自动设置为 600(仅所有者可读写)
- 所有 API 调用均使用 HTTPS 和正确的认证标头
- 速率限制以防止 API 滥用
设置
- 1. 获取您的 API 凭据:
- 登录 Kindroid
- 进入通用设置
- 复制您的 API 密钥(以 kn_ 开头)
- 记下您的 AI ID
- 2. 创建您的凭据文件:
bash
mkdir -p ~/.config/kindroid
cat > ~/.config/kindroid/credentials.json << EOF
{
default
ai: yourprimary
aiid,
api
key: yourkn
apikey,
companions: {
nickname1: ai
id1,
nickname2: ai
id2
}
}
EOF
chmod 600 ~/.config/kindroid/credentials.json
基本用法
bash
发送消息(使用默认 AI)
kindroid send 你好!今天怎么样?
发送给特定伴侣
kindroid send -to nickname1 嘿,你好!
重新开始对话
kindroid break 让我们开始一段新对话
检查伴侣状态
kindroid status nickname1
高级功能
多机器人对话
如果您管理多个 Kindroid,您可以:
- - 为每个伴侣设置对话上下文
- 将消息路由到特定的 AI
- 维护独立的聊天历史记录
速率限制
本技能自动处理:
- - 消息之间的最小延迟(可配置)
- 每分钟最大消息数
- API 错误时的退避策略
错误恢复
- - 网络问题自动重试
- API 超时的优雅处理
- 清晰的错误信息便于故障排查
面向开发者
自定义集成
本技能提供简单的 Node.js 封装:
javascript
const kindroid = require(./lib/kindroid);
// 使用您的凭据初始化
const bot = new kindroid.Companion(nickname1);
// 发送消息
await bot.send(你好!);
// 处理对话中断
await bot.break(新对话);
Webhook 支持
对于高级集成,设置 webhook:
bash
kindroid webhook add http://your-server.com/callback
故障排查
常见问题及解决方案:
- 1. 认证失败
- 检查您的 API 密钥是否以 kn_ 开头
- 验证 credentials.json 的文件权限
- 确保凭据中没有尾随空格
- 2. 速率限制
- 默认:每 3 秒 1 条消息
- 在 ~/.config/kindroid/config.json 中调整
- 查看日志中的速率限制警告
- 3. 超时错误
- Kindroid 可能需要时间响应
- 默认超时:60 秒
- 使用 --timeout 120 增加超时时间
贡献
本技能是开源的。欢迎改进:
- - Fork 仓库
- 进行您的修改
- 提交包含测试的 PR
更新
定期检查更新:
bash
clawhub update kindroid-interact
由 Lumen Lemon 用 🍋 打造