Skip to main content

本地个人AI助手

Project description

KangClaw Logo

KangClaw

个人AI智能助手
一个 Gateway,多端接入

Python License Version


特性

  • 多模型支持 — OpenAI / Anthropic / Google Gemini / DeepSeek / Ollama 等 LLM 供应商
  • 多渠道接入 — 终端 CLI、Web UI、QQ 机器人、飞书机器人、钉钉机器人等
  • 内置工具 — 文件读写编辑、Shell 执行、Web 搜索与抓取、定时任务、图片处理、消息发送
  • 智能记忆 — 短期记忆 + 长期记忆,让智能体记住更多重要信息
  • 技能系统 — 通过Skills扩展智能体功能,实现更复杂的任务

快速开始

安装

# 方式一:uv(推荐)
uv tool install kangclaw

# 方式二:pip
pip install kangclaw

# 方式三:从源码安装
git clone https://github.com/lvkangk/KangClaw.git
cd KangClaw
pip install -e .

初始化

kangclaw init

这会在 ~/.kangclaw/ 下创建配置文件和工作区:

~/.kangclaw/
├── config.toml          # 全局配置(模型、渠道、参数等)
└── workspace/
    ├── AGENTS.md        # 智能体行为指令
    ├── SOUL.md          # 助手人格
    ├── USER.md          # 用户画像
    ├── HEARTBEAT.md     # 心跳任务表
    ├── memory/
    │   ├── MEMORY.md    # 长期记忆
    │   └── sessions/    # 会话历史 (JSONL)
    ├── skills/          # 自定义技能
    └── cron/            # 定时任务

启动

# 前台启动 gateway
kangclaw gateway

# 打开 Web UI(推荐)
kangclaw web

# 或

# CLI 终端对话
kangclaw chat

CLI 命令

命令 说明
kangclaw init 初始化配置和工作区
kangclaw gateway 启动 gateway 服务(前台)
kangclaw gateway -d 后台启动 gateway
kangclaw gateway status 查看 gateway 状态
kangclaw gateway stop 停止 gateway
kangclaw gateway restart 重启 gateway
kangclaw chat 终端对话客户端
kangclaw web 打开 Web UI
kangclaw status 查看整体状态
kangclaw skills list 列出已安装技能
kangclaw cron list 查看定时任务
kangclaw cron remove <id> 删除定时任务

渠道配置

建议打开 Web UI配置

QQ 机器人

[[channel]]
name = "qq"
enabled = true
app_id = "${QQ_BOT_APPID}"
app_secret = "${QQ_BOT_APPSECRET}"
allow_from = []

飞书机器人

[[channel]]
name = "feishu"
enabled = true
app_id = "${FEISHU_APP_ID}"
app_secret = "${FEISHU_APP_SECRET}"
allow_from = []

钉钉机器人

[[channel]]
name = "dingtalk"
enabled = true
client_id = "${DINGTALK_CLIENT_ID}"
client_secret = "${DINGTALK_CLIENT_SECRET}"
allow_from = []

技能系统

~/.kangclaw/workspace/skills/ 下创建目录,添加 SKILL.md 即可注册技能:

skills/
└── weather/
    └── SKILL.md

SKILL.md 使用 YAML frontmatter 定义元信息,正文为技能的使用说明和提示词。

开发

# 安装开发依赖
pip install -e .

# 运行测试
pytest tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kangclaw-0.1.1.tar.gz (616.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kangclaw-0.1.1-py3-none-any.whl (612.8 kB view details)

Uploaded Python 3

File details

Details for the file kangclaw-0.1.1.tar.gz.

File metadata

  • Download URL: kangclaw-0.1.1.tar.gz
  • Upload date:
  • Size: 616.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for kangclaw-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ca85617772bb4d057c235ee5e898ce3c040574c038fe1401d98e779a2b926c84
MD5 4a6c52a73d54474fee5dbbaa9be0a1f6
BLAKE2b-256 46a10a18b7d1e61656ec4ae430a094b15b0745fc9357d0ff52597b2e194227b4

See more details on using hashes here.

File details

Details for the file kangclaw-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: kangclaw-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 612.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for kangclaw-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56d94e1dd8a54097456f2dece22922a51b6821741d5d53397be217de1ad6bec0
MD5 5ac53334e019d3b0d4d9c3ecc130fe04
BLAKE2b-256 6c6786e293234eff8aeaef45cf3849e1338902f2e38b998e6d3f3d32d115c53b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page