Skip to content

Shiyao-Huang/learn-openclaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn OpenClaw - Build AI Agents from Scratch

TypeScript Node.js License: MIT

Incremental tutorial repo: from one-tool agent loop to self-evolving runtime.

中文文档


Evolution (Measured From Current Code)

Version File Lines Tools Focus
V0 v0-agent.ts 152 1 Minimal loop
V1 v1-agent.ts 310 5 Safe file tools
V2 v2-agent.ts 481 10 Local semantic memory
V3 v3-agent.ts 551 11 Todo-based planning
V4 v4-agent.ts 599 12 Subagent isolation
V5 v5-agent.ts 614 12 Skill loading (Skill)
V5.5 v5.5-agent.ts 776 12 Hook lifecycle
V6 v6-agent.ts 957 14 Identity + bootstrap
V7 v7-agent.ts 1372 27 Layered memory
V8 v8-agent.ts 1671 30 Heartbeat + throttle
V9 v9-agent.ts 1527 35 Session management
V10 v10-agent.ts 1782 37 Introspection system
V11 v11-agent.ts 2324 43 Channel system
V12 v12-agent.ts 2766 50 Security system
V13 v13-agent.ts 3237 55 Self-evolution system
V13.5 v13.5-agent.ts 3619 59 Context compression
V14 v14-agent.ts 4311 64 Plugin system
V15 v15-agent.ts 4945 64 Multi-model routing
V16 v16-agent/ 16328 70 DAG workflow engine
V17 v17-agent/ 16757 72 External integration
V18 v18-agent/ ~18000 82 Team collaboration
V19 v19-agent/ ~19500 93 Persistence & recovery
V20 v20-agent/ ~21000 104 Browser automation
V21 v21-agent/ ~23800 113 Cron & reminders
V22 v22-agent/ ~26600 118 Code sandbox
V23 v23-agent/ ~29000 123 Vision understanding
V24 v24-agent/ ~31500 129 TTS (Text-to-Speech)
V25 v25-agent/ ~34000 134 STT (Speech-to-Text)
Total ~104000

Notes:

  • V5.5-V9 all expose the Skill tool with skill input.

🤖 Self-Evolution History

From V11 onwards, all iterations are completed by AI Agent (Lobster/龙虾) through automated evolution cron jobs.

Phase Versions Developer Notes
Manual V0-V10 Human Handcrafted learning path
Auto-Evolved V11-V25 AI Agent (Lobster) Via cron-triggered self-evolution

Auto-Evolution Milestones

  • V11-V18: AI Agent autonomously added Channel, Security, Evolution, Workflow, External, Collaboration systems
  • V19-V20: Added Persistence & Browser automation
  • V21-V23: Added Cron, Sandbox, Vision understanding
  • V24-V25: Added TTS (Text-to-Speech) & STT (Speech-to-Text)

See memory/ for detailed evolution logs.


Quick Start

git clone https://github.com/Shiyao-Huang/learn-openclaw
cd learn-openclaw
npm install
cp .env.example .env
# fill ANTHROPIC_API_KEY in .env

npx tsx v0-agent.ts

Learning Order

  1. V0-V2: loop + tools + memory
  2. V3-V5.5: planning + delegation + skill/hook architecture
  3. V6-V9: identity + time memory + heartbeat + sessions
  4. V10-V13: introspection + channels + security + evolution

Documentation

Main chapters

Diff guides


Core idea

Every version is still the same engine:

while (true) {
  const response = await model(messages, tools);
  if (response.stop_reason !== "tool_use") return response.text;
  const results = execute(response.tool_calls);
  messages.push(results);
}

The rest is controlled layering.


License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors