⚠️ Alpha内测版本警告:此为早期内部构建版本,尚不完整且可能存在错误,欢迎大家提Issue反馈问题或建议。
Skip to content

Build Claw (Developer Guide)

Build a simplified AI Agent from scratch and understand how it works

Introduction

Why build an AI Agent from scratch, Nanobot's 400-line implementation and learning roadmap

Basic Implementation

Chapter 1: Hello Agent

Connect to LLM API with 50 lines of code for the first conversation

Chapter 2: Tool Calling

Implement read tool, parse Function Calling and execute

Chapter 3: Agent Loop

Implement loop until task completion

Chapter 4: Bash Tool

Add ability to execute Shell commands

Skills System

Chapter 5: Parse SKILL.md

Implement YAML frontmatter and Markdown directive parser

Chapter 6: Skill Loading

Scan skill directory, environment variable injection and auto-activation

Chapter 7: First Skill

Write a weather query skill from scratch

Message Gateway

Chapter 8: Telegram Bot

Integrate Telegram for mobile control

Chapter 9: Message Router

Design unified message adapter for multi-channel input

Chapter 10: Feishu Integration

Add Feishu channel for enterprise scenarios

Memory & Automation

Chapter 11: SOUL.md

Implement short-term memory, parse Agent identity and behavior instructions

Chapter 12: MEMORY.md

Implement long-term memory read/write and auto-update

Chapter 13: Cron Scheduler

Implement scheduled task parsing, scheduling and execution

Chapter 14: OpenClaw Source

Clone OpenClaw repo, understand directory structure, core modules and key code


🚧 Content under development