Skip to content

ttguy0707/CyberClaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

49 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CyberClaw Logo

CyberClaw

ๅฝ“ AI ๅผ€ๅง‹"้ป‘็ฎฑๆ“ไฝœ"๏ผŒไฝ ้œ€่ฆไธ€ๅŒ้€่ง†็œผ

CyberClaw Python LangGraph LangChain License Tests GitHub

ไธ‹ไธ€ไปฃ้€ๆ˜Žๆ™บ่ƒฝไฝ“ๆžถๆž„ ยท 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๏ผŒ้ขœ่‰ฒ/้ขๆฟๅŒบๅˆ†ไบ‹ไปถ็ฑปๅž‹
  • ๅฟƒ่ทณไปปๅŠก็ณป็ปŸ

    • ๅŽๅฐ็‹ฌ็ซ‹่ฟ›็จ‹๏ผŒๆฏ็ง’ๆฃ€ๆŸฅไปปๅŠก้˜Ÿๅˆ—
    • ๆ”ฏๆŒ 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๏ผšๅคฉๆฐ”ๆŸฅ่ฏข

๐Ÿš€ ๅฟซ้€Ÿๅผ€ๅง‹

1๏ธโƒฃ ๅฎ‰่ฃ…

# ๅ…‹้š†้กน็›ฎ
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 ๅ‘ฝไปคใ€‚

2๏ธโƒฃ ้…็ฝฎ

ๆœ‰ไธค็ง้…็ฝฎๆ–นๅผ๏ผš่‡ชๅŠจ้…็ฝฎๅ‘ๅฏผ๏ผˆๆŽจ่๏ผ‰ๆˆ– ๆ‰‹ๅŠจ้…็ฝฎใ€‚

ๆ–นๅผไธ€๏ผš่‡ชๅŠจ้…็ฝฎๅ‘ๅฏผ๏ผˆๆŽจ่๏ผ‰

# ๅฏๅŠจไบคไบ’ๅผ้…็ฝฎๅ‘ๅฏผ
cyberclaw config

้…็ฝฎๅ‘ๅฏผไผšๅผ•ๅฏผไฝ ๏ผš

  1. ้€‰ๆ‹ฉๆจกๅž‹ๆไพ›ๅ•†๏ผˆOpenAI / Anthropic / ้˜ฟ้‡Œไบ‘ / ่…พ่ฎฏ / Z.AI / Ollama๏ผ‰
  2. ่พ“ๅ…ฅ API Key
  3. ้…็ฝฎ Base URL๏ผˆๅฏ้€‰๏ผ‰
  4. ่‡ชๅŠจๆต‹่ฏ•่ฟžๆŽฅ๏ผŒ็กฎไฟ้…็ฝฎๆญฃ็กฎ

้…็ฝฎๅ‘ๅฏผ

ๆ–นๅผไบŒ๏ผšๆ‰‹ๅŠจ้…็ฝฎ

# ๅคๅˆถ็คบไพ‹้…็ฝฎๆ–‡ไปถ
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 Key
  • ANTHROPIC_API_KEY: Anthropic ็š„ API Key
  • OPENAI_API_BASE: ๅ…ผๅฎนๆŽฅๅฃ็š„ Base URL๏ผˆ้˜ฟ้‡Œไบ‘ใ€่…พ่ฎฏไบ‘็ญ‰๏ผ‰
  • OLLAMA_BASE_URL: Ollama ๆœฌๅœฐๆœๅŠกๅœฐๅ€๏ผˆ้ป˜่ฎค http://localhost:11434๏ผ‰

๐Ÿ’ก ๅทฅไฝœๅŒบ้…็ฝฎ๏ผšๅทฅไฝœๅŒบ่ทฏๅพ„ๅทฒๅœจไปฃ็ ไธญๅˆๅง‹ๅŒ–๏ผŒ้ป˜่ฎคไธบ้กน็›ฎๆ น็›ฎๅฝ•็š„ workspace ๆ–‡ไปถๅคน๏ผŒๆ— ้œ€ๅœจ .env ไธญ้…็ฝฎใ€‚ไป…ๅฝ“้œ€่ฆ่‡ชๅฎšไน‰ๅทฅไฝœๅŒบไฝ็ฝฎๆ—ถ๏ผŒๆ‰่ฎพ็ฝฎ CYBERCLAW_WORKSPACE ็Žฏๅขƒๅ˜้‡ใ€‚

๐Ÿ’ก ๆ็คบ๏ผš้…็ฝฎๅฎŒๆˆๅŽ๏ผŒๅฏ่ฟ่กŒ cyberclaw run ่Šๅคฉๆต‹่ฏ•่ฟžๆŽฅๆ˜ฏๅฆๆญฃๅธธใ€‚

3๏ธโƒฃ ่ฟ่กŒ

# ๅฏๅŠจไธป็จ‹ๅบ
cyberclaw run

ๆฌข่ฟŽ็•Œ้ข

4๏ธโƒฃ ๅŸบๆœฌ็”จๆณ•

ๅฏๅŠจๅŽ่ฟ›ๅ…ฅไบคไบ’ๅผๅฏน่ฏ็•Œ้ข๏ผŒๅฆ‚ๅ›พๆ‰€็คบ๏ผš

่Šๅคฉ็•Œ้ข

ๅธธ็”จๅ‘ฝไปค็คบไพ‹๏ผš

็ฑปๅž‹ ๅ‘ฝไปค็คบไพ‹ ่ฏดๆ˜Ž
โฐ ๆ—ถ้—ดๆŸฅ่ฏข ็Žฐๅœจๅ‡ ็‚นไบ†๏ผŸ ่Žทๅ–ๅฝ“ๅ‰ๆ—ถ้—ด
๐Ÿงฎ ๆ•ฐๅญฆ่ฎก็ฎ— ๅธฎๆˆ‘็ฎ—ไธ€ไธ‹ 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 ่‡ชๅŠจ่งฆๅ‘ๆ้†’

๐Ÿ’ก ๆ็คบ๏ผšๅฟƒ่ทณไปปๅŠกๅœจๅŽๅฐ่ฟ่กŒ๏ผŒๅณไฝฟไธๅฏๅŠจไธป็จ‹ๅบไนŸไผšๆ‰ง่กŒ๏ผˆ้œ€ๅ•็‹ฌ่ฟ่กŒๅฟƒ่ทณ่ฟ›็จ‹๏ผ‰ใ€‚

5๏ธโƒฃ ็›‘ๆŽง็ปˆ็ซฏ

ๅœจๅฆไธ€ไธช็ปˆ็ซฏ่ฟ่กŒ๏ผš

cyberclaw monitor

็›‘ๆŽง็ปˆ็ซฏ


๐Ÿข ้€‚็”จๅœบๆ™ฏ

๐Ÿ”’ ไผไธš็บงๅบ”็”จ

  • ๅˆ่ง„ๅฎก่ฎก - 5 ็ฑปไบ‹ไปถๅฎก่ฎกๆ—ฅๅฟ—๏ผŒๆปก่ถณไผไธšๅˆ่ง„่ฆๆฑ‚
  • ๆƒ้™็ฎกๆŽง - ๆฒ™็›’้š”็ฆป + ่ทฏๅพ„ๆ‹ฆๆˆช๏ผŒ้˜ฒๆญข่ถŠๆƒๆ“ไฝœ
  • ไปปๅŠก่‡ชๅŠจๅŒ– - ๅฟƒ่ทณไปปๅŠกๅผ•ๆ“Ž๏ผŒๅฎšๆ—ถๆ‰ง่กŒ้‡ๅคๆ€งๅทฅไฝœ
  • ็Ÿฅ่ฏ†ๆฒ‰ๆท€ - ๅŒๆฐดไฝ่ฎฐๅฟ†็ณป็ปŸ๏ผŒๆŒ็ปญๅญฆไน ็ป„็ป‡ๅๅฅฝ

๐Ÿงช AI ็ ”็ฉถไธŽๅผ€ๅ‘

  • 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 ็‚น

# ๅˆ ้™คไปปๅŠก
> ๅ–ๆถˆๆ˜Žๅคฉ็š„ไผš่ฎฎๆ้†’

้ซ˜็บง็”จๆณ•

1. ไฝฟ็”จ็›‘ๆŽงๅ™จ

ๅœจๅฆไธ€ไธช็ปˆ็ซฏ่ฟ่กŒ๏ผš

cyberclaw monitor

ๅฎžๆ—ถๆŸฅ็œ‹๏ผš

  • ๐Ÿง  LLM ่พ“ๅ…ฅ
  • ๐Ÿ’ก ๅทฅๅ…ท่ฐƒ็”จ
  • ๐Ÿ’ป ๅทฅๅ…ท็ป“ๆžœ
  • ๐Ÿค– AI ๅ›žๅค
  • โš™๏ธ ็ณป็ปŸๅŠจไฝœ

2. ๆŸฅ็œ‹ๅฎก่ฎกๆ—ฅๅฟ—

# ๅฎžๆ—ถ็›‘ๆŽง
tail -f logs/local_geek_master.jsonl

# ๆœ็ดข็‰นๅฎšไบ‹ไปถ
grep "tool_call" logs/local_geek_master.jsonl | tail -20

3. ่‡ชๅฎšไน‰็”จๆˆท็”ปๅƒ

็ผ–่พ‘ workspace/memory/user_profile.md๏ผš

# ็”จๆˆทๆกฃๆกˆ

- **ๅง“ๅ**: Thor Allen
- **่Œไธš**: ็จ‹ๅบๅ‘˜
- **ๅๅฅฝ**: 
  - ๅ–œๆฌขๅ–ๅ†ฐ็พŽๅผๅ’–ๅ•ก
  - ๅธธ็”จ Python ๅ†™ไปฃ็ 
  - ๆฏๅคฉ 8 ็‚น่ตทๅบŠ
- **็‰นๆฎŠ่ฆๆฑ‚**:
  - ๅ›ž็ญ”่ฆ็ฎ€ๆด
  - ไธ่ฆไฝฟ็”จ่กจๆƒ…็ฌฆๅท

๐Ÿง  ่ฎฐๅฟ†็ณป็ปŸ

ๅŒๆฐดไฝ่ฎฐๅฟ†ๆžถๆž„

่ฎฐๅฟ†็ณป็ปŸ

  • ้•ฟๆœŸ่ฎฐๅฟ†๏ผšuser_profile.md Markdown ๆ–‡ไปถ๏ผŒๅญ˜ๅ‚จ็”จๆˆทๅๅฅฝใ€่Œไธšใ€็‰นๆฎŠ่ฆๆฑ‚
  • ็ŸญๆœŸ่ฎฐๅฟ†๏ผšSQLite ๆ•ฐๆฎๅบ“๏ผŒๅญ˜ๅ‚จๅฎŒๆ•ดๅฏน่ฏๅކๅฒ
  • ่‡ชๅŠจๆ‘˜่ฆ๏ผšๆฏ 20 ่ฝฎๅฏน่ฏ่‡ชๅŠจ่งฆๅ‘ๆ‘˜่ฆ๏ผŒไฟ็•™ๆœ€่ฟ‘ 10 ่ฝฎ

ไธŠไธ‹ๆ–‡่ฃๅ‰ช

ไธŠไธ‹ๆ–‡่ฃๅ‰ช

ๅฝ“ๅฏน่ฏ่ฝฎๆฌก่ถ…่ฟ‡้˜ˆๅ€ผๆ—ถ๏ผš

  1. ็ณป็ปŸๆถˆๆฏๅง‹็ปˆไฟ็•™
  2. ไฟ็•™ๆœ€่ฟ‘ N ่ฝฎๅฎŒๆ•ดๅฏน่ฏ
  3. ๆ—งๅฏน่ฏๅŽ‹็ผฉไธบๆ‘˜่ฆ
  4. ้˜ฒๆญข 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: ไฟฎๅค bug
  • docs: ๆ–‡ๆกฃๆ›ดๆ–ฐ
  • style: ไปฃ็ ๆ ผๅผ
  • refactor: ้‡ๆž„
  • test: ๆต‹่ฏ•็›ธๅ…ณ
  • chore: ๆž„ๅปบ/ๅทฅๅ…ท

๐Ÿ“„ ่ฎธๅฏ่ฏ

MIT License


๐Ÿ™ ่‡ด่ฐข

  • OpenClaw - ็ตๆ„ŸๆฅๆบไธŽๆŠ€่ƒฝ็”Ÿๆ€
  • LangChain - LLM ๅบ”็”จๅผ€ๅ‘ๆก†ๆžถ
  • LangGraph - ๆœ‰็Šถๆ€ Agent ๆž„ๅปบ
  • Rich - ็ปˆ็ซฏ็พŽๅŒ–
  • Prompt Toolkit - ไบคไบ’ๅผๅ‘ฝไปค่กŒ
  • ๆ‰€ๆœ‰่ดก็Œฎ่€… - ๆ„Ÿ่ฐขไฝ ไปฌ็š„่ดก็Œฎ๏ผ

๐Ÿ“ฌ ่”็ณปๆ–นๅผ


โญ Star History

Star History Chart


๐Ÿ‘พ 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.


๐Ÿ“– Introduction

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

๐Ÿ”Œ Skill Ecosystem Compatibility

CyberClaw supports both OpenClaw skills and Claude Code skills, so you can reuse rich skill resources from both ecosystems without rebuilding them.

๐ŸŒŸ Core Capabilities

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

โœจ Features

๐Ÿง  Intelligent Core

  • Dual-watermark memory system

    • Long-term profile (user_profile.md): user preferences, occupation, and special requirements
    • Recent summaries (SQLite): automatically summarizes every MAX_TURNS turns and keeps the latest KEEP_TURNS turns
    • Context trimming: preserves key conversations and prevents token explosion
  • 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 -f real-time monitoring
    • Rich terminal UI with colors and panels for different 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

๐Ÿ›ก๏ธ Security Sandbox

  • 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 -y when needed

๐Ÿ–ฅ๏ธ Cross-platform Capabilities

  • 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

๐Ÿ”ง Built-in Tools

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"

๐ŸŽฏ Pluggable Skills

  • 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 CyberClaw
    • skill-vetter: check skill safety
    • mcporter: connect external MCP (Model Context Protocol) services
    • mcp-builder: build your own MCP services
    • tavily-search: AI-optimized web search
    • weather: weather lookup

๐Ÿš€ Quick Start

1๏ธโƒฃ Installation

# 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 cyberclaw command is available from any directory.

2๏ธโƒฃ Configuration

There are two configuration methods: the automatic setup wizard (recommended) and manual configuration.

Option 1: Automatic Setup Wizard (Recommended)

# Start the interactive configuration wizard
cyberclaw config

The wizard guides you through:

  1. Choosing a model provider (OpenAI / Anthropic / Alibaba Cloud / Tencent / Z.AI / Ollama)
  2. Entering an API key
  3. Configuring the Base URL (optional)
  4. Automatically testing the connection to verify the configuration

Configuration Wizard

Option 2: Manual Configuration

# Copy the example configuration file
cp .env.example .env

# Edit the configuration file
vim .env  # Or use your preferred editor

Edit .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/v1

Configuration reference:

  • DEFAULT_PROVIDER: model provider (openai, anthropic, aliyun, tencent, z.ai, ollama)
  • DEFAULT_MODEL: model name, such as gpt-4o-mini, glm-5, or qwen-max
  • OPENAI_API_KEY: API key for OpenAI or compatible APIs
  • ANTHROPIC_API_KEY: Anthropic API key
  • OPENAI_API_BASE: Base URL for compatible APIs such as Alibaba Cloud or Tencent Cloud
  • OLLAMA_BASE_URL: local Ollama service URL, defaulting to http://localhost:11434

๐Ÿ’ก Workspace configuration: the workspace path is initialized in code and defaults to the workspace folder in the project root. You do not need to configure it in .env. Set the CYBERCLAW_WORKSPACE environment variable only when you need a custom workspace path.

๐Ÿ’ก Tip: after configuration, run cyberclaw run to test whether chat connectivity works.

3๏ธโƒฃ Run

# Start the main program
cyberclaw run

Welcome Screen

4๏ธโƒฃ Basic Usage

After startup, CyberClaw enters the interactive chat interface:

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

โฐ Heartbeat Task System

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.json and survive restarts
  • Real-time monitoring: run cyberclaw monitor to 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.

5๏ธโƒฃ Monitoring Terminal

Run this in another terminal:

cyberclaw monitor

Monitoring Terminal


๐Ÿข Use Cases

๐Ÿ”’ Enterprise Applications

  • 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

๐Ÿงช AI Research and Development

  • 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

๐Ÿ–ฅ๏ธ Cross-platform Deployment

  • 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

๐Ÿ› ๏ธ Developer Tools

  • 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

๐Ÿ“š Education and Learning

  • 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

๐Ÿ  Personal Productivity

  • 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

๐Ÿ—๏ธ System Architecture

Full Architecture Diagram

System Architecture

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

Core Modules

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

Project Structure

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

๐Ÿ“– User Guide

Configuration Files

.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 .env

See Quick Start - Configuration for detailed configuration instructions.

Skill System

Installing Skills

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 prices

Method 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 safe

Skill Convention

Each 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)

Scheduled Tasks

# 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 reminder

Advanced Usage

1. Use the Monitor

Run this in another terminal:

cyberclaw monitor

View in real time:

  • ๐Ÿง  LLM input
  • ๐Ÿ’ก Tool calls
  • ๐Ÿ’ป Tool results
  • ๐Ÿค– AI replies
  • โš™๏ธ System actions

2. View Audit Logs

# Real-time monitoring
tail -f logs/local_geek_master.jsonl

# Search for specific events
grep "tool_call" logs/local_geek_master.jsonl | tail -20

3. Customize the User Profile

Edit 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

๐Ÿง  Memory System

Dual-watermark Memory Architecture

Memory System

  • 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

Context Trimming

Context Trimming

When the number of conversation turns exceeds the threshold:

  1. System messages are always retained
  2. The latest N full conversation turns are retained
  3. Older conversations are compressed into summaries
  4. Token explosion is prevented

Turn Memory

Turn Memory

Each complete turn contains:

  • User message (HumanMessage)
  • AI response (AIMessage)
  • Tool call (ToolMessage)

๐Ÿงช Testing

Run Tests

# 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 Coverage

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

Two-phase Test Report

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.


๐Ÿค Contributing

Issues and pull requests are welcome.

Development Environment

# 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]"

Commit Convention

  • feat: new feature
  • fix: bug fix
  • docs: documentation update
  • style: code style
  • refactor: refactoring
  • test: test-related changes
  • chore: build or tooling changes

๐Ÿ“„ License

MIT License


๐Ÿ™ Acknowledgements

  • 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!

๐Ÿ“ฌ Contact


โญ Star History

Star History Chart


๐Ÿ‘พ CyberClaw ยท Next-Gen Transparent Agent Architecture

Made with โค๏ธ by @ttguy0707

About

๐Ÿ‘พ ไธ‹ไธ€ไปฃ้€ๆ˜Žๆ™บ่ƒฝไฝ“ๆžถๆž„ | Next-Gen Transparent Agent Architecture ๐Ÿ” ๅ…จ่กŒไธบๅฎก่ฎก | ๐Ÿ›ก๏ธ ไธคๆฎตๅผๅฎ‰ๅ…จ่ฐƒ็”จ | ๐Ÿง  ๅŒๆฐดไฝ่ฎฐๅฟ† | โฐ ๅฟƒ่ทณไปปๅŠก ๐Ÿ“Š P0 ็บงไบ‹ๆ•…็އ้™ไฝŽ 80% | ๅ…ผๅฎน OpenClaw + Claude Code ๆŠ€่ƒฝ็”Ÿๆ€

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages