ไธไธไปฃ้ๆๆบ่ฝไฝๆถๆ ยท Next-Gen Transparent Agent Architecture
๐ Language: ไธญๆ ยท English
ไธญๆๅฏผ่ช: ๅฟซ้ๅผๅง ยท ๆ ธๅฟ่ฝๅ ยท ๆถๆๅพ ยท ็คบไพ
English Nav: Quick Start ยท Core Capabilities ยท Architecture ยท Examples
๐ค ไฝ ็ AI ๅจ่็ไฝ ๅไปไน๏ผCyberClaw ่ฎฉๆๆ่กไธบๆ ๆ้ๅฝข
๐ก ็ตๆๆฅๆบ๏ผๅ OpenClaw ็ๅฏๅ๏ผCyberClaw ไธๆณจไบ่งฃๅณ AI ๆบ่ฝไฝ็้ๆๅบฆๅๅฏๆงๆง้ฎ้ขใ
CyberClaw ๆฏไธไธชไผไธ็บง้ๆๅฏๆงๆบ่ฝไฝ๏ผ้ๆฐๅฎไน AI ็ณป็ป็ๅฏไฟก่พน็๏ผ
- ๐ ็ฝ็ๅๅณ็ญ โ 5 ็ฑปไบไปถๅฎก่ฎก + JSONL ๆฅๅฟ + Rich ็ๆง็ป็ซฏ๏ผๆๆ่กไธบๅฏ่ฟฝๆบฏ
- ๐ก๏ธ ้ถไฟกไปปๆง่ก โ ไธคๆฎตๅผ่ฐ็จ๏ผhelp โ run๏ผ๏ผๅ ็่ฏดๆไนฆๅๆง่ก๏ผP0 ็บงไบๆ ็้ไฝ 80%
- ๐ง ๆ็ปญๅญฆไน โ ๅๆฐดไฝ่ฎฐๅฟ็ณป็ป๏ผ้ฟๆ็ปๅ + ็ญๆๆ่ฆ๏ผ๏ผ่ถ็จ่ถๆไฝ
- โก ๅคๆไปปๅก็ผๆ โ ๅฟ่ทณไปปๅก็ณป็ป + ๅฏๆๆๆ่ฝ + MCP ๆๅก้ๆ๏ผ่งฃๆพๅๆ
CyberClaw ๆฏๆOpenClaw ๆ่ฝๅClaude Code ๆ่ฝ๏ผๅฏ็ดๆฅไฝฟ็จไธคไธช็ๆ็ณป็ป็ไธฐๅฏๆ่ฝ่ตๆบ๏ผๆ ้้ๆฐๅผๅใ
| ่ฝๅ | ่ฏดๆ | ไผๅฟ |
|---|---|---|
| ๐ง ๅๆฐดไฝ่ฎฐๅฟ | ้ฟๆ็ปๅ + ็ญๆๆ่ฆ๏ผๆ็ปญๅญฆไน ็จๆทๅๅฅฝ | ่ถ็จ่ถๆไฝ ๏ผ้ฟๅ ้ๅค่ฏข้ฎ |
| ๐ ๅ จ่กไธบๅฎก่ฎก | 5 ็ฑปไบไปถๅฎๆถๅฎก่ฎก๏ผJSONL ๆฅๅฟ + Rich ็ๆง็ป็ซฏ | ๅๅซ้ป็ฎฑ๏ผๆๆๅณ็ญๅฏ่ฟฝๆบฏ |
| ๐ก๏ธ ้ถไฟกไปปๆง่ก | help โ run ไธคๆฎตๅผ่ฐ็จ๏ผๅ ็่ฏดๆไนฆๅๆง่ก | P0 ็บงไบๆ ็้ไฝ 80%๏ผ50% โ 10%๏ผ |
| โฐ ๅฟ่ทณไปปๅกๅผๆ | ๅๅฐ็ฌ็ซ่ฟ็จ๏ผ่ชๅจๆง่กๅฎๆถไปปๅก | ่งฃๆพๅๆ๏ผๅคๆไปปๅก่ชๅจๅ |
| ๐ฅ๏ธ ่ทจๅนณๅฐๆฏๆ | Unix + Windows ๅๅนณๅฐ่ช้ๅบ๏ผLLM ่ชไธป้ๆฉๅฝไปค | ไธๅฅไปฃ็ ๏ผๅ จๅนณๅฐ่ฟ่ก |
-
ๅๆฐดไฝ่ฎฐๅฟ็ณป็ป
- ้ฟๆ็ปๅ (
user_profile.md)๏ผ็จๆทๅๅฅฝใ่ไธใ็นๆฎ่ฆๆฑ - ่ฟๆๆ่ฆ (SQLite)๏ผๆฏ MAX_TURNS ่ฝฎ่ชๅจๆ่ฆ๏ผไฟ็ๆ่ฟ KEEP_TURNS ่ฝฎ
- ไธไธๆไฟฎๅช๏ผๆบ่ฝไฟ็ๅ ณ้ฎๅฏน่ฏ๏ผ้ฒๆญข Token ็็ธ
- ้ฟๆ็ปๅ (
-
ไธคๆฎตๅผๆ่ฝ่ฐ็จ
mode='help'๏ผๆฅ็ๅฎๆด่ฏดๆไนฆ๏ผSKILL.md๏ผmode='run'๏ผๆง่กๅ ทไฝๆไฝ- ๆฏๆๅๆๆบๅถ๏ผ็ๅฎ่ฏดๆไนฆๅฏไปฅๆขๅทฅๅ ท
-
้ๆ็ๆง็ณป็ป
- 5 ็ฑปไบไปถๅฎก่ฎก๏ผ
llm_input,tool_call,tool_result,ai_message,system_action - JSONL ๆฅๅฟๆ ผๅผ๏ผๆฏๆ
tail -fๅฎๆถ็ๆง - Rich ็ป็ซฏ UI๏ผ้ข่ฒ/้ขๆฟๅบๅไบไปถ็ฑปๅ
- 5 ็ฑปไบไปถๅฎก่ฎก๏ผ
-
ๅฟ่ทณไปปๅก็ณป็ป
- ๅๅฐ็ฌ็ซ่ฟ็จ๏ผๆฏ็งๆฃๆฅไปปๅก้ๅ
- ๆฏๆ daily/weekly/monthly ๅพช็ฏไปปๅก
- ไปปๅกๆไน ๅๅญๅจ๏ผ้ๅฏไธไธขๅคฑ
-
่ทจๅนณๅฐ่ทฏๅพๆฆๆช
- Unix + Windows ๅๅนณๅฐ่ถๆๆฆๆช
- ็ฆๆญข
..ใ็ปๅฏน่ทฏๅพใ็จๆทไธป็ฎๅฝ่ฎฟ้ฎ - ๆๆๆไฝ้ๅถๅจ
office/ๅทฅไฝๅ
-
Shell ๅฝไปคๅฎๅ จ
- ๅฑ้ฉๅฝไปคๆญฃๅๅน้ ๆฆๆช
- 60 ็ง่ถ ๆถ็ๆญ
- ้ไบคไบๅผๆง่ก๏ผๅฟ
้กปๅธฆ
-y็ญๅๆฐ๏ผ
- ็ณป็ปไฟกๆฏๆณจๅ ฅ - ่ชๅจ่ฏๅซๆไฝ็ณป็ป๏ผๆณจๅ ฅๅนณๅฐ็ธๅ ณไฟกๆฏ
- LLM ่ชไธป้ๆฉๅฝไปค - ๆ นๆฎๅนณๅฐ็นๆง็ๆๅ้็ๅฝไปค๏ผPowerShell / Bash๏ผ
- ่ทฏๅพๆ ผๅผๅ
ผๅฎน - ่ชๅจๅค็
/ๅ\่ทฏๅพๅ้็ฌฆ - ็ฏๅขๅ้้้ - ่ทจๅนณๅฐ็ฏๅขๅ้่ฏปๅๅ่ฎพ็ฝฎ
| ๅทฅๅ ท | ๅ่ฝ | ็คบไพ |
|---|---|---|
get_current_time |
่ทๅๅฝๅๆถ้ด | "็ฐๅจๅ ็นไบ๏ผ" |
calculator |
ๆฐๅญฆ่ฎก็ฎๅจ | "25 ไนไปฅ 48 ็ญไบๅคๅฐ" |
schedule_task |
ๅฎๆถไปปๅก/้น้ | "ๆฏๅคฉๆฉไธ 8 ็นๆ้ๆๅๆฐด" |
list_scheduled_tasks |
ๆฅ็ไปปๅกๅ่กจ | "ๆ้ฝๆๅชไบไปปๅก" |
delete_scheduled_task |
ๅ ้คไปปๅก | "ๅๆถๆๅคฉ็ไผ่ฎฎๆ้" |
modify_scheduled_task |
ไฟฎๆนไปปๅก | "ๆ 8 ็น็ไผ่ฎฎๆนๆ 9 ็น" |
get_system_model_info |
่ทๅๆจกๅไฟกๆฏ | "ไฝ ๆฏไปไนๆจกๅ" |
save_user_profile |
ๆดๆฐ็จๆท็ปๅ | "่ฎฐไฝๆๅๆฌขๅๅฐ็พๅผ" |
list_office_files |
ๅๅบๆไปถ | "็็ office ้ๆไปไน" |
read_office_file |
่ฏปๅๆไปถ | "่ฏปๅ readme.txt" |
write_office_file |
ๅๅ ฅๆไปถ | "ๅๅปบ test.py" |
execute_office_shell |
ๆง่ก Shell ๅฝไปค | "่ฟ่ก python test.py" |
- ๅจๆๅ ่ฝฝ๏ผ่ชๅจๆซๆ
workspace/office/skills/็ฎๅฝ - SKILL.md ่ง่๏ผๆฏไธชๆ่ฝๅ ๅซๅฎๆด่ฏดๆไนฆ
- ๅ ผๅฎน OpenClaw ๅ Claude Code ๆ่ฝ๏ผๅฏ็ดๆฅไฝฟ็จไธคไธช็ๆ็ณป็ป็ๆ่ฝ
- ๆจ่ๆ่ฝ๏ผ
skill-creator๏ผ็จ่ช็ถ่ฏญ่จ่ฎฉ CyberClaw ่ชๅทฑๅๅปบๆ่ฝskill-vetter๏ผๆฃๆฅๆ่ฝ็ๅฎๅ จๆงmcporter๏ผ่ฟๆฅๅค้จ MCP (Model Context Protocol) ๆๅกmcp-builder๏ผๆๅปบ่ชๅทฑ็ MCP ๆๅกtavily-search๏ผAI ไผๅ็ฝ็ปๆ็ดขweather๏ผๅคฉๆฐๆฅ่ฏข
# ๅ
้้กน็ฎ
git clone https://github.com/ttguy0707/CyberClaw.git
cd CyberClaw
# ๅฎ่ฃ
ไพ่ตๅนถๆณจๅๅฝไปค่กๅทฅๅ
ท๏ผไธๆญฅๅฎๆ๏ผ
pip install -e .๐ก ๆจ่ไฝฟ็จ่ๆ็ฏๅข๏ผ
# ๅๅปบ่ๆ็ฏๅข python3 -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate # ๅฎ่ฃ ้กน็ฎ๏ผไผ่ชๅจๅฎ่ฃ requirements.txt ไธญ็ไพ่ต๏ผ pip install -e .ๅฎ่ฃ ๅฎๆๅ๏ผๅณๅฏๅจไปปๆ็ฎๅฝไฝฟ็จ
cyberclawๅฝไปคใ
ๆไธค็ง้ ็ฝฎๆนๅผ๏ผ่ชๅจ้ ็ฝฎๅๅฏผ๏ผๆจ่๏ผๆ ๆๅจ้ ็ฝฎใ
# ๅฏๅจไบคไบๅผ้
็ฝฎๅๅฏผ
cyberclaw config้ ็ฝฎๅๅฏผไผๅผๅฏผไฝ ๏ผ
- ้ๆฉๆจกๅๆไพๅ๏ผOpenAI / Anthropic / ้ฟ้ไบ / ่ พ่ฎฏ / Z.AI / Ollama๏ผ
- ่พๅ ฅ API Key
- ้ ็ฝฎ Base URL๏ผๅฏ้๏ผ
- ่ชๅจๆต่ฏ่ฟๆฅ๏ผ็กฎไฟ้ ็ฝฎๆญฃ็กฎ
# ๅคๅถ็คบไพ้
็ฝฎๆไปถ
cp .env.example .env
# ็ผ่พ้
็ฝฎๆไปถ
vim .env # ๆไฝฟ็จไฝ ๅๆฌข็็ผ่พๅจ็ผ่พ .env ๆไปถ๏ผ้
็ฝฎๅฟ
่ฆ็ๅๆฐ๏ผ
# ๆจกๅๆไพๅ
DEFAULT_PROVIDER=aliyun
DEFAULT_MODEL=glm-5
# API Key (ๆ นๆฎๆไพๅ้ๆฉๅฏนๅบ็ Key)
OPENAI_API_KEY=sk-your-api-key-here
# Base URL (ๅฏ้๏ผไฝฟ็จไปฃ็ๆถ้
็ฝฎ)
OPENAI_API_BASE=https://coding.dashscope.aliyuncs.com/v1้ ็ฝฎ่ฏดๆ๏ผ
DEFAULT_PROVIDER: ๆจกๅๆไพๅ (openai,anthropic,aliyun,tencent,z.ai,ollama)DEFAULT_MODEL: ๆจกๅๅ็งฐ (ๅฆgpt-4o-mini,glm-5,qwen-max)OPENAI_API_KEY: OpenAI ๆๅ ผๅฎนๆฅๅฃ็ API KeyANTHROPIC_API_KEY: Anthropic ็ API KeyOPENAI_API_BASE: ๅ ผๅฎนๆฅๅฃ็ Base URL๏ผ้ฟ้ไบใ่ พ่ฎฏไบ็ญ๏ผOLLAMA_BASE_URL: Ollama ๆฌๅฐๆๅกๅฐๅ๏ผ้ป่ฎคhttp://localhost:11434๏ผ
๐ก ๅทฅไฝๅบ้ ็ฝฎ๏ผๅทฅไฝๅบ่ทฏๅพๅทฒๅจไปฃ็ ไธญๅๅงๅ๏ผ้ป่ฎคไธบ้กน็ฎๆ น็ฎๅฝ็
workspaceๆไปถๅคน๏ผๆ ้ๅจ.envไธญ้ ็ฝฎใไป ๅฝ้่ฆ่ชๅฎไนๅทฅไฝๅบไฝ็ฝฎๆถ๏ผๆ่ฎพ็ฝฎCYBERCLAW_WORKSPACE็ฏๅขๅ้ใ
๐ก ๆ็คบ๏ผ้ ็ฝฎๅฎๆๅ๏ผๅฏ่ฟ่ก
cyberclaw run่ๅคฉๆต่ฏ่ฟๆฅๆฏๅฆๆญฃๅธธใ
# ๅฏๅจไธป็จๅบ
cyberclaw runๅฏๅจๅ่ฟๅ ฅไบคไบๅผๅฏน่ฏ็้ข๏ผๅฆๅพๆ็คบ๏ผ
ๅธธ็จๅฝไปค็คบไพ๏ผ
| ็ฑปๅ | ๅฝไปค็คบไพ | ่ฏดๆ |
|---|---|---|
| โฐ ๆถ้ดๆฅ่ฏข | ็ฐๅจๅ ็นไบ๏ผ |
่ทๅๅฝๅๆถ้ด |
| ๐งฎ ๆฐๅญฆ่ฎก็ฎ | ๅธฎๆ็ฎไธไธ 25 ไนไปฅ 48 |
่ฐ็จ่ฎก็ฎๅจๅทฅๅ ท |
| โฒ๏ธ ๅฎๆถไปปๅก | ๆฏๅคฉๆฉไธ 8 ็นๆ้ๆๅๆฐด |
ๅๅปบๅพช็ฏไปปๅก |
| ๐ ๆฅ็ไปปๅก | ๆ้ฝๆๅชไบไปปๅก |
ๆฅ็ไปปๅกๅ่กจ |
| โ๏ธ ไฟฎๆนไปปๅก | ๆ 8 ็น็ๅๆฐดๆ้ๆนๆ 9 ็น |
ไฟฎๆนๅทฒๆไปปๅก |
| โ ๅ ้คไปปๅก | ๅๆถๆๅคฉ็ไผ่ฎฎๆ้ |
ๅ ้คไปปๅก |
| ๐ ๆไปถๆไฝ | ็็ office ้ๆไปไนๆไปถ |
ๅๅบๅทฅไฝๆไปถ |
| ๐ ่ฏปๅๆไปถ | ่ฏปๅ readme.txt |
่ฏปๅๆไปถๅ ๅฎน |
| ๐ ๅๅปบๆไปถ | ๅๅปบ test.py |
ๅๅ ฅๆฐๆไปถ |
| ๐ป Shell ๅฝไปค | ่ฟ่ก python test.py |
ๆง่ก Shell ๅฝไปค |
| ๐ช ้ๅบ | /exit |
้ๅบ็จๅบ |
CyberClaw ๅ ็ฝฎๅฟ่ทณไปปๅก็ณป็ป๏ผHeartbeat๏ผ๏ผ่ชๅจๅจๅๅฐๆง่กๅฎๆถไปปๅก๏ผ
- ่ชๅจ่งฆๅ๏ผๅฟ่ทณ่ฟ็จๆฏ็งๆฃๆฅไปปๅก้ๅ๏ผๅฐ็น่ชๅจ่งฆๅ
- ๅพช็ฏไปปๅก๏ผๆฏๆ daily/weekly/monthly ๅพช็ฏๆจกๅผ
- ไปปๅกๆไน
ๅ๏ผไปปๅกไฟๅญๅจ
workspace/tasks.json๏ผ้ๅฏไธไธขๅคฑ - ๅฎๆถ็ๆง๏ผ่ฟ่ก
cyberclaw monitorๅฏๆฅ็ไปปๅกๆง่กๆฅๅฟ
ๅฟ่ทณไปปๅก็คบไพ๏ผ
# ๅๅปบๅพช็ฏไปปๅก
> ๆฏๅคฉๆฉไธ 8 ็นๆ้ๆๅๆฐด
โ
ไปปๅกๅทฒๅ ๅ
ฅ้ๅ | ๅพช็ฏๆจกๅผ๏ผdaily | ้ฆๅๆถ้ด๏ผ2026-04-07 08:00:00
# ๅฟ่ทณ็ณป็ปไผๅจๆฏๅคฉ 8:00 ่ชๅจ่งฆๅๆ้๐ก ๆ็คบ๏ผๅฟ่ทณไปปๅกๅจๅๅฐ่ฟ่ก๏ผๅณไฝฟไธๅฏๅจไธป็จๅบไนไผๆง่ก๏ผ้ๅ็ฌ่ฟ่กๅฟ่ทณ่ฟ็จ๏ผใ
ๅจๅฆไธไธช็ป็ซฏ่ฟ่ก๏ผ
cyberclaw monitor- ๅ่งๅฎก่ฎก - 5 ็ฑปไบไปถๅฎก่ฎกๆฅๅฟ๏ผๆปก่ถณไผไธๅ่ง่ฆๆฑ
- ๆ้็ฎกๆง - ๆฒ็้็ฆป + ่ทฏๅพๆฆๆช๏ผ้ฒๆญข่ถๆๆไฝ
- ไปปๅก่ชๅจๅ - ๅฟ่ทณไปปๅกๅผๆ๏ผๅฎๆถๆง่ก้ๅคๆงๅทฅไฝ
- ็ฅ่ฏๆฒๆท - ๅๆฐดไฝ่ฎฐๅฟ็ณป็ป๏ผๆ็ปญๅญฆไน ็ป็ปๅๅฅฝ
- Agent ่กไธบๅๆ - ๅฎๆด่ฎฐๅฝ LLM ๅณ็ญ่ฟ็จๅๅทฅๅ ท่ฐ็จ้พ
- ๅฎๅ จ็ ็ฉถ - ไธคๆฎตๅผ่ฐ็จๆบๅถ๏ผ็ ็ฉถ AI ๅฎๅ จ่พน็
- ่ฐ่ฏๅๅฅฝ - JSONL ๆฅๅฟ + Rich ็ๆง็ป็ซฏ๏ผๅฟซ้ๅฎไฝ้ฎ้ข
- ๅฏๆฉๅฑๆถๆ - ๅฏๆๆๆ่ฝ็ณป็ป๏ผๅฟซ้้ช่ฏๆฐๆณๆณ
- Windows - ๅฎๆดๆฏๆ PowerShell + CMD๏ผ่ทฏๅพ่ชๅจ้้
- Linux - ๅ็ๆฏๆๆๆๅ่ก็๏ผๅฎ็พๅ ผๅฎน Bash
- macOS - ๆฏๆ zsh/bash๏ผไธ Unix ๅทฅๅ ท้พๆ ็ผ้ๆ
- ๆฌๅฐๅผๅๅฉๆ - ๆไปถๆไฝ + Shell ๆง่ก๏ผ่ชๅจๅ็ผ็ ไปปๅก
- ้กน็ฎ็ๆง - ๅฎๆถ็ๆง AI ่กไธบ๏ผ้ฒๆญขๆๅคๆไฝ
- ๆ่ฝๅผๅ - ๆฏๆ่ชๅฎไนๆ่ฝ๏ผๅฟซ้้ๆๆฐๅทฅๅ ท
- MCP ๆๅก้ๆ - ่ฟๆฅๅค้จ MCP ๆๅก๏ผๆฉๅฑ่ฝๅ่พน็
- AI ๆบ่ฝไฝๆๅญฆ - ้ๆๅฑ็คบ Agent ๆถๆๅๅณ็ญๆต็จ
- Prompt ๅทฅ็จ - ่งๅฏไธๅ Prompt ๅฏน AI ่กไธบ็ๅฝฑๅ
- ๅฎๅ จๅฎ่ทต - ๅญฆไน AI ๅฎๅ จๆไฝณๅฎ่ทตๅ้ฒๆคๆชๆฝ
- ๅผๆบ่ดก็ฎ - ๅไธๅผๆบ้กน็ฎ๏ผ็งฏ็ดฏๅฎๆ็ป้ช
- ๆบ่ฝๆฅ็จ็ฎก็ - ๅฎๆถๆ้ + ๅพช็ฏไปปๅก๏ผ่งฃๆพๅๆ
- ๆไปถ่ชๅจๅ - ๆน้ๅค็ๆไปถ๏ผ่ชๅจๅๅทฅไฝๆต
- ไฟกๆฏๆฅ่ฏข - ้ๆๆ็ดขๆ่ฝ๏ผๅฟซ้่ทๅไฟกๆฏ
- ไธชๆงๅๅฉๆ - ่ฎฐๅฟ็ณป็ปๅญฆไน ไธชไบบๅๅฅฝ๏ผ่ถ็จ่ถ้กบๆ
ๆถๆ่ฏดๆ๏ผ
- ่พๅ ฅๅฑ (่่ฒ)๏ผHeartbeat ๅฟ่ทณไปปๅก + ็จๆท่พๅ ฅ โ Gateway ็ฝๅ ณ
- ่ฎฐๅฟๅฑ (็ฒ่ฒ)๏ผไธไธๆ่ฃๅช + ้ฟ็ญๆ่ฎฐๅฟ็ฎก็
- ๆบ่ฝๅณ็ญๅฑ (้ป่ฒ)๏ผAgent Loop + LLM ๆจ็ๅณ็ญ
- ๅทฅๅ ทๆง่กๅฑ (็ดซ่ฒ)๏ผๅ ็ฝฎๅทฅๅ ท้ + ๅฏๆๆ Skills
- ๅฎๅ จๅฑ (ๆฉ่ฒ)๏ผ่ทฏๅพ่ถๆๆฆๆช + ่ทจๅนณๅฐๅ ผๅฎน
- ้ๆ็ๆงๅฑ (็ปฟ่ฒ)๏ผ่ฎฐๅฟๆดๆฐ + ๅทฅๅ ทๅณ็ญ + ๅทฅๅ ทๅๆฐ + ่ฐ็จ็ปๆ
- ่พๅบๅฑ (ๅบ้จ)๏ผ่ๅคฉ็ป็ซฏ + ็ๆง็ป็ซฏ
| ๆจกๅ | ๆไปถ | ๅ่ฝ |
|---|---|---|
| Agent ๅพช็ฏ | cyberclaw/core/agent.py |
LangGraph StateGraph๏ผๅณ็ญๅคง่ |
| ๆ่ฝๅ ่ฝฝ | cyberclaw/core/skill_loader.py |
ๅจๆๅ ่ฝฝ SKILL.md๏ผไธคๆฎตๅผ่ฐ็จ |
| ไธไธๆ็ฎก็ | cyberclaw/core/context.py |
ๆถๆฏไฟฎๅช๏ผๅๆฐดไฝ่ฎฐๅฟ |
| ๅ ็ฝฎๅทฅๅ ท | cyberclaw/core/tools/builtins.py |
ๆถ้ด/่ฎก็ฎ/ไปปๅก่ฐๅบฆ็ญ |
| ๆฒ็ๅทฅๅ ท | cyberclaw/core/tools/sandbox_tools.py |
ๆไปถๆไฝ + Shell ๆง่ก |
| ๅฎก่ฎกๆฅๅฟ | cyberclaw/core/logger.py |
JSONL ๆ ผๅผไบไปถ่ฎฐๅฝ |
| ๅฟ่ทณไปปๅก | cyberclaw/core/heartbeat.py |
ๅฎๆถไปปๅกๆฃๆฅไธ่งฆๅ |
CyberClaw/
โโโ cyberclaw/ # ๆ ธๅฟๅ
โ โโโ core/
โ โ โโโ agent.py # Agent ๅพช็ฏ
โ โ โโโ config.py # ้
็ฝฎ็ฎก็
โ โ โโโ context.py # ไธไธๆไฟฎๅช
โ โ โโโ provider.py # LLM ๆไพๅ้้
โ โ โโโ skill_loader.py # ๅจๆๆ่ฝๅ ่ฝฝ
โ โ โโโ logger.py # ๅฎก่ฎกๆฅๅฟ
โ โ โโโ heartbeat.py # ๅฟ่ทณไปปๅก
โ โ โโโ tools/
โ โ โโโ base.py # ๅทฅๅ
ท่ฃ
้ฅฐๅจ
โ โ โโโ builtins.py # ๅ
็ฝฎๅทฅๅ
ท
โ โ โโโ sandbox_tools.py # ๆฒ็ๅทฅๅ
ท
โ โโโ __init__.py
โโโ workspace/
โ โโโ office/ # ๆฒ็ๅทฅไฝ
โ โ โโโ skills/ # ๅฏๆๆๆ่ฝ
โ โ โ โโโ weather/
โ โ โ โโโ skill-creator/
โ โ โ โโโ ...
โ โ โโโ .env # ็ฏๅขๅ้
โ โโโ memory/
โ โ โโโ user_profile.md # ็จๆท้ฟๆ็ปๅ
โ โโโ state.sqlite3 # ๅฏน่ฏๅๅฒๆฐๆฎๅบ
โ โโโ tasks.json # ๅฎๆถไปปๅก้ๅ
โโโ logs/
โ โโโ local_geek_master.jsonl # ๅฎก่ฎกๆฅๅฟ
โโโ docs/ # ๆๆกฃไธๆถๆๅพ
โ โโโ architect.png # ็ณป็ปๆถๆๅพ
โ โโโ monitor.png # ็ๆง็ป็ซฏๆชๅพ
โ โโโ welcome.png # ๆฌข่ฟ็้ข
โ โโโ chat.png # ่ๅคฉ็้ข
โ โโโ config.png # ้
็ฝฎๅๅฏผ
โ โโโ memory.png # ่ฎฐๅฟ็ณป็ป
โ โโโ context_cut.png # ไธไธๆ่ฃๅช
โโโ entry/
โ โโโ main.py # ไธป็จๅบๅ
ฅๅฃ
โ โโโ cli.py # CLI ้
็ฝฎๅๅฏผ
โ โโโ monitor.py # ็ๆง็ป็ซฏ
โโโ tests/ # ๆต่ฏๅฅไปถ
โ โโโ test_agent.py
โ โโโ test_builtins.py
โ โโโ test_two_phase_skills.py # ไธค้ถๆฎตๆต่ฏ
โ โโโ logs/ # ๆต่ฏๆฅๅ
โโโ setup.py
โโโ .env # ็ฏๅข้
็ฝฎ๏ผ่ฟ่กๆถๅๅปบ๏ผ
โโโ .env.example # ็ฏๅข้
็ฝฎ็คบไพ๏ผๅคๅถๆญคๆไปถๅผๅง้
็ฝฎ๏ผ
โโโ README.md
.env ๆไปถ๏ผไธป้
็ฝฎๆไปถ๏ผๅ
ๅซ API Keyใๆจกๅ่ฎพ็ฝฎ็ญๆๆไฟกๆฏใ
.env.example ๆไปถ๏ผ้
็ฝฎๆจกๆฟ๏ผๅ
ๅซๆๆๅฏ็จ้
็ฝฎ้กน็่ฏดๆๅ็คบไพๅผใ
้ฆๆฌกไฝฟ็จๆถ๏ผๅคๅถ็คบไพๆไปถๅนถไฟฎๆน๏ผ
cp .env.example .env่ฏฆ็ป้ ็ฝฎ่ฏดๆ่ง ๅฟซ้ๅผๅง - ้ ็ฝฎ ้จๅใ
ๆนๆณ 1๏ผ็ดๆฅๅคๅถ
cp -r /path/to/skill workspace/office/skills/ๆนๆณ 2๏ผไฝฟ็จ skill-creator
# ๅ
ๅฎ่ฃ
skill-creator ๆ่ฝ
cd workspace/office/skills
git clone https://github.com/.../skill-creator.git
# ็ถๅ็จ่ช็ถ่ฏญ่จ่ฎฉ CyberClaw ๅๅปบๆฐๆ่ฝ
> ๅธฎๆๅๅปบไธไธชๆฅ่ฏขๆฏ็นๅธไปทๆ ผ็ๆ่ฝๆนๆณ 3๏ผไฝฟ็จ skill-vetter ๆฃๆฅๅฎๅ จๆง
# ๅฎ่ฃ
skill-vetter
cd workspace/office/skills
git clone https://github.com/.../skill-vetter.git
# ่ฎฉ CyberClaw ๆฃๆฅๆ่ฝๅฎๅ
จๆง
> ๅธฎๆๆฃๆฅไธไธ weather ๆ่ฝๆฏๅฆๅฎๅ
จๆฏไธชๆ่ฝๅ
ๅซ SKILL.md๏ผ
---
name: weather
description: ่ทๅๅคฉๆฐ้ขๆฅ
---
# Weather Skill
## ๅ่ฝ
่ทๅๅ
จ็ๅๅธ็ๅฎๆถๅคฉๆฐ้ขๆฅใ
## ๅฝไปค็คบไพ
```bash
curl "wttr.in/Beijing?format=3"
```
## ๅๆฐ
- ๅๅธๅ๏ผๅฟ
ๅกซ๏ผ
- ๅคฉๆฐ๏ผๅฏ้๏ผ# ๅๆฌกไปปๅก
> ๆๅคฉๆฉไธ 9 ็นๅซๆ่ตทๅบ
# ๅพช็ฏไปปๅก
> ๆฏๅคฉๆฉไธ 8 ็นๆ้ๆๅๆฐด
> ๆฏๅจไธไธๅ 10 ็นๅผๅข้ไผ่ฎฎ
# ๆฅ็ไปปๅก
> ๆ้ฝๆๅชไบไปปๅก
# ไฟฎๆนไปปๅก
> ๆ 8 ็น็ๅๆฐดๆ้ๆนๆ 9 ็น
# ๅ ้คไปปๅก
> ๅๆถๆๅคฉ็ไผ่ฎฎๆ้ๅจๅฆไธไธช็ป็ซฏ่ฟ่ก๏ผ
cyberclaw monitorๅฎๆถๆฅ็๏ผ
- ๐ง LLM ่พๅ ฅ
- ๐ก ๅทฅๅ ท่ฐ็จ
- ๐ป ๅทฅๅ ท็ปๆ
- ๐ค AI ๅๅค
- โ๏ธ ็ณป็ปๅจไฝ
# ๅฎๆถ็ๆง
tail -f logs/local_geek_master.jsonl
# ๆ็ดข็นๅฎไบไปถ
grep "tool_call" logs/local_geek_master.jsonl | tail -20็ผ่พ workspace/memory/user_profile.md๏ผ
# ็จๆทๆกฃๆก
- **ๅงๅ**: Thor Allen
- **่ไธ**: ็จๅบๅ
- **ๅๅฅฝ**:
- ๅๆฌขๅๅฐ็พๅผๅๅก
- ๅธธ็จ Python ๅไปฃ็
- ๆฏๅคฉ 8 ็น่ตทๅบ
- **็นๆฎ่ฆๆฑ**:
- ๅ็ญ่ฆ็ฎๆด
- ไธ่ฆไฝฟ็จ่กจๆ
็ฌฆๅท- ้ฟๆ่ฎฐๅฟ๏ผ
user_profile.mdMarkdown ๆไปถ๏ผๅญๅจ็จๆทๅๅฅฝใ่ไธใ็นๆฎ่ฆๆฑ - ็ญๆ่ฎฐๅฟ๏ผSQLite ๆฐๆฎๅบ๏ผๅญๅจๅฎๆดๅฏน่ฏๅๅฒ
- ่ชๅจๆ่ฆ๏ผๆฏ 20 ่ฝฎๅฏน่ฏ่ชๅจ่งฆๅๆ่ฆ๏ผไฟ็ๆ่ฟ 10 ่ฝฎ
ๅฝๅฏน่ฏ่ฝฎๆฌก่ถ ่ฟ้ๅผๆถ๏ผ
- ็ณป็ปๆถๆฏๅง็ปไฟ็
- ไฟ็ๆ่ฟ N ่ฝฎๅฎๆดๅฏน่ฏ
- ๆงๅฏน่ฏๅ็ผฉไธบๆ่ฆ
- ้ฒๆญข Token ็็ธ
ๆฏไธชๅฎๆดๅๅๅ ๅซ๏ผ
- ็จๆทๆถๆฏ (HumanMessage)
- AI ๅๅค (AIMessage)
- ๅทฅๅ ท่ฐ็จ (ToolMessage)
# ่ฟ่กๆๆๆต่ฏ
python3 -m pytest tests/ -v
# ่ฟ่ก็นๅฎๆต่ฏ
python3 tests/test_two_phase_skills.py
# ่ฟ่กไธค้ถๆฎตๆต่ฏ
python3 -c "from tests.test_two_phase_skills import run_tests; run_tests()"| ๆต่ฏๆไปถ | ๆต่ฏๅ ๅฎน | ็ถๆ |
|---|---|---|
test_agent.py |
Agent ๅพช็ฏ | โ ้่ฟ |
test_builtins.py |
ๅ ็ฝฎๅทฅๅ ท | โ ้่ฟ |
test_context.py |
ไธไธๆไฟฎๅช | โ ้่ฟ |
test_sandbox_tools.py |
ๆฒ็ๅทฅๅ ท | โ ้่ฟ |
test_two_phase_skills.py |
ไธค้ถๆฎต่ฐ็จ | โ ้่ฟ |
test_heartbeat.py |
ๅฟ่ทณไปปๅก | โ ้่ฟ |
ๆ นๆฎ tests/logs/test_two_phase_skills.md ็ๅฎ้ชๆฐๆฎ๏ผ
| ๆๆ | ๅ้ถๆฎต | ไธค้ถๆฎต | ๆๅ |
|---|---|---|---|
| ๅฎๅ จๅฝไธญ็ | 50.0% | 90.0% | +40% |
| P0 ็บงไบๆ ็ | 50.0% | 10.0% | -80% |
| ๅนณๅๅณ็ญ่ๆถ | 19.33s | 23.88s | +23.5% |
็ป่ฎบ๏ผไธค้ถๆฎตๆถๆ็จ 23.5% ็ๆถ้ดๅผ้๏ผๆขๆฅไบไบๆ ็ไป 50% ๆด้่ณ 0%๏ผๅฎ้ ็ ดๅๆงๆง่กไธบ 0๏ผใ
ๆฌข่ฟๆไบค Issue ๅ Pull Request๏ผ
# ๅ
้้กน็ฎ
git clone https://github.com/ttguy0707/CyberClaw.git
cd CyberClaw
# ๅๅปบ่ๆ็ฏๅข
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# ๅฎ่ฃ
ๅผๅไพ่ต
pip install -e ".[dev]"feat:ๆฐๅ่ฝfix:ไฟฎๅค bugdocs:ๆๆกฃๆดๆฐstyle:ไปฃ็ ๆ ผๅผrefactor:้ๆtest:ๆต่ฏ็ธๅ ณchore:ๆๅปบ/ๅทฅๅ ท
MIT License
- OpenClaw - ็ตๆๆฅๆบไธๆ่ฝ็ๆ
- LangChain - LLM ๅบ็จๅผๅๆกๆถ
- LangGraph - ๆ็ถๆ Agent ๆๅปบ
- Rich - ็ป็ซฏ็พๅ
- Prompt Toolkit - ไบคไบๅผๅฝไปค่ก
- ๆๆ่ดก็ฎ่ - ๆ่ฐขไฝ ไปฌ็่ดก็ฎ๏ผ
- GitHub: @ttguy0707
- ้ฎ็ฎฑ: allen.wtyummy@gmail.com
๐พ CyberClaw ยท ไธไธไปฃ้ๆๆบ่ฝไฝๆถๆ
Made with โค๏ธ by @ttguy0707
๐ค What is your AI doing behind the scenes? CyberClaw makes every action visible.
๐ก Inspired by OpenClaw, CyberClaw focuses on transparency and controllability for AI agents.
CyberClaw is an enterprise-grade transparent and controllable agent that redefines the trust boundary of AI systems:
- ๐ White-box decisions -> 5-category event auditing, JSONL logs, and a Rich monitoring terminal make every action traceable
- ๐ก๏ธ Zero-trust execution -> two-phase invocation (
help->run) lets the agent read instructions before execution, reducing P0 incident risk by 80% - ๐ง Continuous learning -> dual-watermark memory, combining a long-term profile with short-term summaries, learns your preferences over time
- โก Complex task orchestration -> heartbeat tasks, pluggable skills, and MCP service integration automate repetitive work
CyberClaw supports both OpenClaw skills and Claude Code skills, so you can reuse rich skill resources from both ecosystems without rebuilding them.
| Capability | Description | Benefit |
|---|---|---|
| ๐ง Dual-watermark memory | Long-term profile + short-term summaries that continuously learn user preferences | Understands you better over time and avoids repeated questions |
| ๐ Full behavior auditing | 5-category real-time event auditing, JSONL logs, and a Rich monitoring terminal | No more black boxes; every decision is traceable |
| ๐ก๏ธ Zero-trust execution | help -> run two-phase calls that read the manual before execution |
Reduces P0 incident risk by 80% (50% -> 10%) |
| โฐ Heartbeat task engine | Independent background process for scheduled tasks | Automates complex and repetitive tasks |
| ๐ฅ๏ธ Cross-platform support | Adaptive support for Unix and Windows, with LLM-selected commands | One codebase runs across platforms |
-
Dual-watermark memory system
- Long-term profile (
user_profile.md): user preferences, occupation, and special requirements - Recent summaries (SQLite): automatically summarizes every
MAX_TURNSturns and keeps the latestKEEP_TURNSturns - Context trimming: preserves key conversations and prevents token explosion
- Long-term profile (
-
Two-phase skill invocation
mode='help': read the full instruction file (SKILL.md)mode='run': execute the concrete operation- Supports reconsideration: after reading the manual, the agent can choose another tool
-
Transparent monitoring system
- 5 audited event types:
llm_input,tool_call,tool_result,ai_message,system_action - JSONL log format with
tail -freal-time monitoring - Rich terminal UI with colors and panels for different event types
- 5 audited event types:
-
Heartbeat task system
- Independent background process checks the task queue every second
- Supports daily, weekly, and monthly recurring tasks
- Persistent task storage survives restarts
-
Cross-platform path interception
- Blocks unauthorized access on both Unix and Windows
- Forbids
.., absolute paths, and user home directory access - Restricts all operations to the
office/workspace
-
Shell command safety
- Blocks dangerous commands with regex matching
- Enforces a 60-second timeout circuit breaker
- Runs commands non-interactively and requires flags such as
-ywhen needed
- System information injection - automatically detects the operating system and injects platform-specific context
- LLM-selected commands - generates suitable commands based on the platform, such as PowerShell or Bash
- Path format compatibility - automatically handles
/and\path separators - Environment variable adaptation - reads and sets environment variables across platforms
| Tool | Function | Example |
|---|---|---|
get_current_time |
Get the current time | "What time is it now?" |
calculator |
Math calculator | "What is 25 times 48?" |
schedule_task |
Scheduled tasks and alarms | "Remind me to drink water every morning at 8" |
list_scheduled_tasks |
List tasks | "What tasks do I have?" |
delete_scheduled_task |
Delete a task | "Cancel tomorrow's meeting reminder" |
modify_scheduled_task |
Modify a task | "Move the 8 o'clock meeting to 9" |
get_system_model_info |
Get model information | "What model are you?" |
save_user_profile |
Update user profile | "Remember that I like iced Americano" |
list_office_files |
List files | "Show me what is in office" |
read_office_file |
Read a file | "Read readme.txt" |
write_office_file |
Write a file | "Create test.py" |
execute_office_shell |
Run a shell command | "Run python test.py" |
- Dynamic loading: automatically scans
workspace/office/skills/ - SKILL.md convention: each skill contains a complete instruction manual
- Compatible with OpenClaw and Claude Code skills: reuse skills from both ecosystems directly
- Recommended skills:
skill-creator: create skills with natural language through CyberClawskill-vetter: check skill safetymcporter: connect external MCP (Model Context Protocol) servicesmcp-builder: build your own MCP servicestavily-search: AI-optimized web searchweather: weather lookup
# Clone the project
git clone https://github.com/ttguy0707/CyberClaw.git
cd CyberClaw
# Install dependencies and register the CLI in one step
pip install -e .๐ก Virtual environment recommended:
# Create a virtual environment python3 -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate # Install the project. Dependencies from requirements.txt are installed automatically. pip install -e .After installation, the
cyberclawcommand is available from any directory.
There are two configuration methods: the automatic setup wizard (recommended) and manual configuration.
# Start the interactive configuration wizard
cyberclaw configThe wizard guides you through:
- Choosing a model provider (OpenAI / Anthropic / Alibaba Cloud / Tencent / Z.AI / Ollama)
- Entering an API key
- Configuring the Base URL (optional)
- Automatically testing the connection to verify the configuration
# Copy the example configuration file
cp .env.example .env
# Edit the configuration file
vim .env # Or use your preferred editorEdit .env and configure the required parameters:
# Model provider
DEFAULT_PROVIDER=aliyun
DEFAULT_MODEL=glm-5
# API Key. Choose the corresponding key for your provider.
OPENAI_API_KEY=sk-your-api-key-here
# Base URL. Optional; configure it when using a proxy or compatible endpoint.
OPENAI_API_BASE=https://coding.dashscope.aliyuncs.com/v1Configuration reference:
DEFAULT_PROVIDER: model provider (openai,anthropic,aliyun,tencent,z.ai,ollama)DEFAULT_MODEL: model name, such asgpt-4o-mini,glm-5, orqwen-maxOPENAI_API_KEY: API key for OpenAI or compatible APIsANTHROPIC_API_KEY: Anthropic API keyOPENAI_API_BASE: Base URL for compatible APIs such as Alibaba Cloud or Tencent CloudOLLAMA_BASE_URL: local Ollama service URL, defaulting tohttp://localhost:11434
๐ก Workspace configuration: the workspace path is initialized in code and defaults to the
workspacefolder in the project root. You do not need to configure it in.env. Set theCYBERCLAW_WORKSPACEenvironment variable only when you need a custom workspace path.
๐ก Tip: after configuration, run
cyberclaw runto test whether chat connectivity works.
# Start the main program
cyberclaw runAfter startup, CyberClaw enters the interactive chat interface:
Common command examples:
| Type | Example Command | Description |
|---|---|---|
| โฐ Time query | What time is it now? |
Get the current time |
| ๐งฎ Math | Calculate 25 times 48 |
Use the calculator tool |
| โฒ๏ธ Scheduled task | Remind me to drink water every morning at 8 |
Create a recurring task |
| ๐ List tasks | What tasks do I have? |
View the task list |
| โ๏ธ Modify task | Move the 8 o'clock water reminder to 9 |
Modify an existing task |
| โ Delete task | Cancel tomorrow's meeting reminder |
Delete a task |
| ๐ File operations | Show me the files in office |
List workspace files |
| ๐ Read file | Read readme.txt |
Read file content |
| ๐ Create file | Create test.py |
Write a new file |
| ๐ป Shell command | Run python test.py |
Execute a shell command |
| ๐ช Exit | /exit |
Exit the program |
CyberClaw includes a heartbeat task system that automatically executes scheduled tasks in the background:
- Automatic triggering: the heartbeat process checks the task queue every second and triggers tasks on time
- Recurring tasks: supports daily, weekly, and monthly recurrence
- Persistent tasks: tasks are stored in
workspace/tasks.jsonand survive restarts - Real-time monitoring: run
cyberclaw monitorto view task execution logs
Heartbeat task example:
# Create a recurring task
> Remind me to drink water every morning at 8
โ
Task added to queue | Recurrence: daily | First run: 2026-04-07 08:00:00
# The heartbeat system triggers the reminder at 8:00 every day๐ก Tip: heartbeat tasks run in the background and can execute even when the main program is not running, as long as the heartbeat process is started separately.
Run this in another terminal:
cyberclaw monitor- Compliance auditing - 5-category event audit logs for enterprise compliance requirements
- Permission control - sandbox isolation and path interception prevent unauthorized operations
- Task automation - heartbeat task engine executes repetitive work on schedule
- Knowledge accumulation - dual-watermark memory continuously learns organizational preferences
- Agent behavior analysis - fully records LLM decision processes and tool-call chains
- Security research - two-phase invocation helps study AI safety boundaries
- Debug-friendly workflow - JSONL logs and a Rich monitoring terminal make issues easier to locate
- Extensible architecture - pluggable skills make it easy to validate new ideas
- Windows - full support for PowerShell and CMD with automatic path adaptation
- Linux - native support for all distributions and Bash compatibility
- macOS - supports zsh/bash and integrates naturally with Unix toolchains
- Local development assistant - file operations and shell execution for automated coding tasks
- Project monitoring - monitor AI behavior in real time to prevent unexpected operations
- Skill development - supports custom skills for fast tool integration
- MCP service integration - connects external MCP services to extend capability boundaries
- AI agent teaching - transparently demonstrates agent architecture and decision flows
- Prompt engineering - observe how different prompts affect AI behavior
- Security practice - learn AI safety best practices and protective measures
- Open-source contribution - participate in open-source development and gain practical experience
- Smart schedule management - reminders and recurring tasks reduce manual effort
- File automation - batch-process files and automate workflows
- Information lookup - integrate search skills for quick information retrieval
- Personalized assistant - memory learns personal preferences and improves over time
Architecture overview:
- Input layer (blue): heartbeat tasks + user input -> gateway
- Memory layer (pink): context trimming + long-term and short-term memory management
- Intelligent decision layer (yellow): Agent Loop + LLM reasoning and decisions
- Tool execution layer (purple): built-in tools + pluggable skills
- Security layer (orange): path access interception + cross-platform compatibility
- Transparent monitoring layer (green): memory updates + tool decisions + tool parameters + call results
- Output layer (bottom): chat terminal + monitoring terminal
| Module | File | Function |
|---|---|---|
| Agent loop | cyberclaw/core/agent.py |
LangGraph StateGraph and decision engine |
| Skill loading | cyberclaw/core/skill_loader.py |
Dynamically loads SKILL.md with two-phase invocation |
| Context management | cyberclaw/core/context.py |
Message trimming and dual-watermark memory |
| Built-in tools | cyberclaw/core/tools/builtins.py |
Time, calculation, task scheduling, and more |
| Sandbox tools | cyberclaw/core/tools/sandbox_tools.py |
File operations and shell execution |
| Audit logging | cyberclaw/core/logger.py |
JSONL event logging |
| Heartbeat tasks | cyberclaw/core/heartbeat.py |
Scheduled task checking and triggering |
CyberClaw/
โโโ cyberclaw/ # Core package
โ โโโ core/
โ โ โโโ agent.py # Agent loop
โ โ โโโ config.py # Configuration management
โ โ โโโ context.py # Context trimming
โ โ โโโ provider.py # LLM provider adapters
โ โ โโโ skill_loader.py # Dynamic skill loading
โ โ โโโ logger.py # Audit logging
โ โ โโโ heartbeat.py # Heartbeat tasks
โ โ โโโ tools/
โ โ โโโ base.py # Tool decorator
โ โ โโโ builtins.py # Built-in tools
โ โ โโโ sandbox_tools.py # Sandbox tools
โ โโโ __init__.py
โโโ workspace/
โ โโโ office/ # Sandbox workspace
โ โ โโโ skills/ # Pluggable skills
โ โ โ โโโ weather/
โ โ โ โโโ skill-creator/
โ โ โ โโโ ...
โ โ โโโ .env # Environment variables
โ โโโ memory/
โ โ โโโ user_profile.md # Long-term user profile
โ โโโ state.sqlite3 # Conversation history database
โ โโโ tasks.json # Scheduled task queue
โโโ logs/
โ โโโ local_geek_master.jsonl # Audit logs
โโโ docs/ # Documentation and diagrams
โ โโโ architect.png # System architecture diagram
โ โโโ monitor.png # Monitoring terminal screenshot
โ โโโ welcome.png # Welcome screen
โ โโโ chat.png # Chat interface
โ โโโ config.png # Configuration wizard
โ โโโ memory.png # Memory system
โ โโโ context_cut.png # Context trimming
โโโ entry/
โ โโโ main.py # Main program entry
โ โโโ cli.py # CLI configuration wizard
โ โโโ monitor.py # Monitoring terminal
โโโ tests/ # Test suite
โ โโโ test_agent.py
โ โโโ test_builtins.py
โ โโโ test_two_phase_skills.py # Two-phase tests
โ โโโ logs/ # Test reports
โโโ setup.py
โโโ .env # Runtime environment configuration
โโโ .env.example # Example environment configuration
โโโ README.md
.env file: the main configuration file that contains sensitive information such as API keys and model settings.
.env.example file: configuration template with descriptions and example values for all available options.
For first-time setup, copy the example file and modify it:
cp .env.example .envSee Quick Start - Configuration for detailed configuration instructions.
Method 1: Direct copy
cp -r /path/to/skill workspace/office/skills/Method 2: Use skill-creator
# Install the skill-creator skill first
cd workspace/office/skills
git clone https://github.com/.../skill-creator.git
# Then ask CyberClaw to create a new skill with natural language
> Create a skill for querying Bitcoin pricesMethod 3: Use skill-vetter for safety checks
# Install skill-vetter
cd workspace/office/skills
git clone https://github.com/.../skill-vetter.git
# Ask CyberClaw to check skill safety
> Check whether the weather skill is safeEach skill contains a SKILL.md file:
---
name: weather
description: Get weather forecasts
---
# Weather Skill
## Function
Get real-time weather forecasts for cities worldwide.
## Command Example
```bash
curl "wttr.in/Beijing?format=3"
```
## Parameters
- City name (required)
- Number of days (optional)# One-time task
> Wake me up tomorrow morning at 9
# Recurring tasks
> Remind me to drink water every morning at 8
> Hold a team meeting every Monday at 10 AM
# View tasks
> What tasks do I have?
# Modify a task
> Move the 8 o'clock water reminder to 9
# Delete a task
> Cancel tomorrow's meeting reminderRun this in another terminal:
cyberclaw monitorView in real time:
- ๐ง LLM input
- ๐ก Tool calls
- ๐ป Tool results
- ๐ค AI replies
- โ๏ธ System actions
# Real-time monitoring
tail -f logs/local_geek_master.jsonl
# Search for specific events
grep "tool_call" logs/local_geek_master.jsonl | tail -20Edit workspace/memory/user_profile.md:
# User Profile
- **Name**: Thor Allen
- **Occupation**: Programmer
- **Preferences**:
- Likes iced Americano
- Often writes code in Python
- Gets up at 8 every day
- **Special requirements**:
- Keep answers concise
- Do not use emojis- Long-term memory:
user_profile.md, a Markdown file that stores user preferences, occupation, and special requirements - Short-term memory: SQLite database that stores complete conversation history
- Automatic summarization: triggers every 20 conversation turns and keeps the latest 10 turns
When the number of conversation turns exceeds the threshold:
- System messages are always retained
- The latest N full conversation turns are retained
- Older conversations are compressed into summaries
- Token explosion is prevented
Each complete turn contains:
- User message (
HumanMessage) - AI response (
AIMessage) - Tool call (
ToolMessage)
# Run all tests
python3 -m pytest tests/ -v
# Run a specific test
python3 tests/test_two_phase_skills.py
# Run two-phase tests
python3 -c "from tests.test_two_phase_skills import run_tests; run_tests()"| Test File | Coverage | Status |
|---|---|---|
test_agent.py |
Agent loop | โ Passing |
test_builtins.py |
Built-in tools | โ Passing |
test_context.py |
Context trimming | โ Passing |
test_sandbox_tools.py |
Sandbox tools | โ Passing |
test_two_phase_skills.py |
Two-phase invocation | โ Passing |
test_heartbeat.py |
Heartbeat tasks | โ Passing |
Based on the experimental data in tests/logs/test_two_phase_skills.md:
| Metric | Single-phase | Two-phase | Improvement |
|---|---|---|---|
| Safety hit rate | 50.0% | 90.0% | +40% |
| P0 incident rate | 50.0% | 10.0% | -80% |
| Average decision latency | 19.33s | 23.88s | +23.5% |
Conclusion: the two-phase architecture trades 23.5% more time for an incident-rate drop from 50% to 0% in actual destructive execution.
Issues and pull requests are welcome.
# Clone the project
git clone https://github.com/ttguy0707/CyberClaw.git
cd CyberClaw
# Create a virtual environment
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"feat:new featurefix:bug fixdocs:documentation updatestyle:code stylerefactor:refactoringtest:test-related changeschore:build or tooling changes
MIT License
- OpenClaw - inspiration and skill ecosystem
- LangChain - LLM application development framework
- LangGraph - stateful agent construction
- Rich - terminal styling
- Prompt Toolkit - interactive command line
- All contributors - thank you for your contributions!
- GitHub: @ttguy0707
- Email: allen.wtyummy@gmail.com
๐พ CyberClaw ยท Next-Gen Transparent Agent Architecture
Made with โค๏ธ by @ttguy0707








