cheerclaw 0.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cheerclaw-0.1.7/PKG-INFO +17 -0
- cheerclaw-0.1.7/README.md +73 -0
- cheerclaw-0.1.7/cheerclaw/__init__.py +10 -0
- cheerclaw-0.1.7/cheerclaw/agent/__init__.py +16 -0
- cheerclaw-0.1.7/cheerclaw/agent/main_agent.py +706 -0
- cheerclaw-0.1.7/cheerclaw/agent/sub_agent.py +322 -0
- cheerclaw-0.1.7/cheerclaw/agent/use_subagent_tool.py +117 -0
- cheerclaw-0.1.7/cheerclaw/channels/__init__.py +23 -0
- cheerclaw-0.1.7/cheerclaw/channels/cli_channel.py +105 -0
- cheerclaw-0.1.7/cheerclaw/channels/cron_channel.py +107 -0
- cheerclaw-0.1.7/cheerclaw/channels/qq_channel.py +215 -0
- cheerclaw-0.1.7/cheerclaw/cli.py +178 -0
- cheerclaw-0.1.7/cheerclaw/config/__init__.py +18 -0
- cheerclaw-0.1.7/cheerclaw/config/config_loader.py +207 -0
- cheerclaw-0.1.7/cheerclaw/config/config_schema.py +76 -0
- cheerclaw-0.1.7/cheerclaw/context/__init__.py +17 -0
- cheerclaw-0.1.7/cheerclaw/context/compress2.py +353 -0
- cheerclaw-0.1.7/cheerclaw/context/context_manager.py +357 -0
- cheerclaw-0.1.7/cheerclaw/context/prompts/sub_agent_prompt.md +67 -0
- cheerclaw-0.1.7/cheerclaw/context/prompts/system_prompt.md +63 -0
- cheerclaw-0.1.7/cheerclaw/main.py +129 -0
- cheerclaw-0.1.7/cheerclaw/show_style/__init__.py +14 -0
- cheerclaw-0.1.7/cheerclaw/show_style/diff_helper.py +108 -0
- cheerclaw-0.1.7/cheerclaw/show_style/welcome.py +45 -0
- cheerclaw-0.1.7/cheerclaw/skills/clawhub/SKILL.md +58 -0
- cheerclaw-0.1.7/cheerclaw/skills/clawhub/SKILL.md.cp +84 -0
- cheerclaw-0.1.7/cheerclaw/skills/code/SKILL.md +120 -0
- cheerclaw-0.1.7/cheerclaw/skills/code/_meta.json +6 -0
- cheerclaw-0.1.7/cheerclaw/skills/code/criteria.md +48 -0
- cheerclaw-0.1.7/cheerclaw/skills/code/execution.md +42 -0
- cheerclaw-0.1.7/cheerclaw/skills/code/memory-template.md +38 -0
- cheerclaw-0.1.7/cheerclaw/skills/code/planning.md +31 -0
- cheerclaw-0.1.7/cheerclaw/skills/code/state.md +60 -0
- cheerclaw-0.1.7/cheerclaw/skills/code/verification.md +39 -0
- cheerclaw-0.1.7/cheerclaw/skills/github/SKILL.md +48 -0
- cheerclaw-0.1.7/cheerclaw/skills/memory/SKILL.md +29 -0
- cheerclaw-0.1.7/cheerclaw/skills/skill-creator/SKILL.md +375 -0
- cheerclaw-0.1.7/cheerclaw/skills/skill-creator/scripts/init_skill.py +378 -0
- cheerclaw-0.1.7/cheerclaw/skills/skill-creator/scripts/package_skill.py +154 -0
- cheerclaw-0.1.7/cheerclaw/skills/skill-creator/scripts/quick_validate.py +213 -0
- cheerclaw-0.1.7/cheerclaw/skills/summarize/SKILL.md +67 -0
- cheerclaw-0.1.7/cheerclaw/skills/weather/SKILL.md +60 -0
- cheerclaw-0.1.7/cheerclaw/skills_module/__init__.py +16 -0
- cheerclaw-0.1.7/cheerclaw/skills_module/loader.py +232 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/__init__.py +52 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/base.py +131 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/calculator.py +44 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/cron_task.py +223 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/filesystem.py +294 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/read_skill.py +42 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/registry.py +129 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/send_message.py +71 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/shell.py +201 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/tavily_search.py +125 -0
- cheerclaw-0.1.7/cheerclaw/tools_module/todo_list.py +329 -0
- cheerclaw-0.1.7/cheerclaw/utils/__init__.py +19 -0
- cheerclaw-0.1.7/cheerclaw/utils/agent_helpers.py +121 -0
- cheerclaw-0.1.7/cheerclaw/utils/channel_info.py +129 -0
- cheerclaw-0.1.7/cheerclaw/utils/history_formatter.py +133 -0
- cheerclaw-0.1.7/cheerclaw/utils/llm_client.py +148 -0
- cheerclaw-0.1.7/cheerclaw/utils/openai_client.py +33 -0
- cheerclaw-0.1.7/cheerclaw/utils/prompt_loader.py +84 -0
- cheerclaw-0.1.7/cheerclaw.egg-info/PKG-INFO +17 -0
- cheerclaw-0.1.7/cheerclaw.egg-info/SOURCES.txt +68 -0
- cheerclaw-0.1.7/cheerclaw.egg-info/dependency_links.txt +1 -0
- cheerclaw-0.1.7/cheerclaw.egg-info/entry_points.txt +2 -0
- cheerclaw-0.1.7/cheerclaw.egg-info/requires.txt +12 -0
- cheerclaw-0.1.7/cheerclaw.egg-info/top_level.txt +1 -0
- cheerclaw-0.1.7/pyproject.toml +36 -0
- cheerclaw-0.1.7/setup.cfg +4 -0
cheerclaw-0.1.7/PKG-INFO
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cheerclaw
|
|
3
|
+
Version: 0.1.7
|
|
4
|
+
Summary: CheerClaw - 灵活的 AI Agent 框架,支持多通道交互
|
|
5
|
+
Requires-Python: >=3.8
|
|
6
|
+
Requires-Dist: pydantic==2.12.5
|
|
7
|
+
Requires-Dist: openai==2.30.0
|
|
8
|
+
Requires-Dist: httpx==0.28.1
|
|
9
|
+
Requires-Dist: aiohttp==3.13.3
|
|
10
|
+
Requires-Dist: croniter==6.2.2
|
|
11
|
+
Requires-Dist: loguru==0.7.3
|
|
12
|
+
Requires-Dist: prompt-toolkit==3.0.52
|
|
13
|
+
Requires-Dist: rich==14.3.3
|
|
14
|
+
Requires-Dist: tiktoken==0.12.0
|
|
15
|
+
Requires-Dist: websockets==15.0.1
|
|
16
|
+
Requires-Dist: tavily-python==0.7.23
|
|
17
|
+
Requires-Dist: qq-botpy==1.2.1
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# CheerClaw
|
|
2
|
+
|
|
3
|
+
一个灵活的 AI Agent 框架。旨在帮助转型智能体开发的同学,从0-1实现一个claw类智能体。
|
|
4
|
+
|
|
5
|
+
## 功能特性
|
|
6
|
+
|
|
7
|
+
- **主从 Agent 架构**:主 Agent 子 Agent 协同配合,天然上下文隔离
|
|
8
|
+
- **plan and execute 增强模式**: todo list 给大型任务规划更长的时间和空间跨度
|
|
9
|
+
- **工具系统**:tools + skills渐进式加载
|
|
10
|
+
- **上下文管理**:工具压缩+内容压缩,支持无限扩增的上下文窗口
|
|
11
|
+
- **三层记忆系统**:长期记忆 (MEMORY.md) + 对话压缩 (HISTORY.md) + 原始日志(origion.jsonl)
|
|
12
|
+
- **渐进式记忆召回**:主动式记忆检索
|
|
13
|
+
- **多通道交互**:支持 CLI 终端、QQ Bot、定时任务执行
|
|
14
|
+
|
|
15
|
+
## 安装
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip3 install --upgrade pip
|
|
19
|
+
|
|
20
|
+
pip3 install cheerclaw
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 使用方法
|
|
24
|
+
|
|
25
|
+
### 本地 CLI 模式
|
|
26
|
+
|
|
27
|
+
启动终端交互模式:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cheerclaw local
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 在线/后台模式
|
|
34
|
+
|
|
35
|
+
启动后台运行模式(启动 QQ Bot 模式):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cheerclaw online
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 配置
|
|
42
|
+
|
|
43
|
+
当前支持qwen系列模型;tavily搜索;在线通信支持qq
|
|
44
|
+
|
|
45
|
+
[qwen模型订阅地址](https://bailian.console.aliyun.com/cn-beijing?spm=5176.12818093_47.resourceCenter.1.3be916d0bQ42Yp&tab=home#/home)
|
|
46
|
+
|
|
47
|
+
[tavily搜索免费apikey注册地址](https://www.tavily.com/)
|
|
48
|
+
|
|
49
|
+
[qq bot app_id和secret创建地址](https://q.qq.com/#/)
|
|
50
|
+
|
|
51
|
+
首次运行后,会在 `~/.cheerclaw/` 目录下创建配置文件 `config.json`。
|
|
52
|
+
|
|
53
|
+
示例配置:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"provider": {
|
|
58
|
+
"api_key": "your-api-key",
|
|
59
|
+
"api_base": "your-api-url",
|
|
60
|
+
"model": "qwen3.5-plus",
|
|
61
|
+
"timeout": 60
|
|
62
|
+
},
|
|
63
|
+
"agent": {
|
|
64
|
+
"name": "CheerClaw"
|
|
65
|
+
},
|
|
66
|
+
"qq": {
|
|
67
|
+
"app_id": "your-qq-app-id",
|
|
68
|
+
"secret": "your-qq-secret"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
'''
|
|
4
|
+
@File : __init__.py
|
|
5
|
+
@Author : zemin
|
|
6
|
+
@Desc : None
|
|
7
|
+
'''
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
from cheerclaw.agent.main_agent import AgentApp
|
|
11
|
+
from cheerclaw.agent.sub_agent import SubAgent
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"AgentApp",
|
|
15
|
+
"SubAgent",
|
|
16
|
+
]
|