MCPcopy Create free account
hub / github.com/czl9707/build-your-own-openclaw

github.com/czl9707/build-your-own-openclaw @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
3,984 symbols 14,475 edges 747 files ⚖ MIT 3,217 documented · 81% 15 cross-repo links updated 41d ago★ 1,8652 open issues

Browse by type

Functions 3,046 Types & classes 931 Endpoints 7
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

构建你自己的 OpenClaw

从简单的聊天循环开始,一步步搭建 OpenClaw 的精简版。

概述

18 个步骤,每步包含:

  • 讲解关键组件和设计决策的 README.md
  • 可直接运行的代码

参考项目: pickle-bot

教程结构

第一阶段:能干的单智能体(步骤 0-6)

让智能体学会聊天、用工具、加载技能、保存对话、上网搜索。

第二阶段:事件驱动(步骤 7-10)

换成事件驱动架构,支持多平台接入。

第三阶段:自主与多智能体(步骤 11-15)

定时任务、智能路由、多智能体协作。

第四阶段:生产就绪(步骤 16-17)

并发控制和长期记忆。

如何使用本教程

配置 API 密钥

  1. 复制配置模板: bash cp default_workspace/config.example.yaml default_workspace/config.user.yaml

  2. 编辑 config.user.yaml 填入 API 密钥:

  3. LiteLLM providers 列出所有支持的模型提供商
  4. Provider Examples 有配置示例

贡献

每个步骤独立实现,欢迎提 PR。

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 2,501
Class 914
Function 545
Interface 17
Route 7

Languages

Python97%
TypeScript3%

Modules by API surface

17-memory/src/mybot/core/events.py31 symbols
16-concurrency-control/src/mybot/core/events.py31 symbols
15-agent-dispatch/src/mybot/core/events.py31 symbols
14-post-message-back/src/mybot/core/events.py31 symbols
13-multi-layer-prompts/src/mybot/core/events.py31 symbols
12-cron-heartbeat/src/mybot/core/events.py31 symbols
17-memory/src/mybot/utils/config.py26 symbols
16-concurrency-control/src/mybot/utils/config.py26 symbols
15-agent-dispatch/src/mybot/utils/config.py26 symbols
14-post-message-back/src/mybot/utils/config.py26 symbols
13-multi-layer-prompts/src/mybot/utils/config.py26 symbols
12-cron-heartbeat/src/mybot/utils/config.py26 symbols

Dependencies from manifests, versioned

@base-ui/react1.3.0 · 1×
@types/node20 · 1×
@types/react19 · 1×
@types/react-dom19 · 1×
class-variance-authority0.7.1 · 1×
clsx2.1.1 · 1×
diff8.0.3 · 1×
eslint9 · 1×
eslint-config-next16.1.6 · 1×
glob13.0.6 · 1×
lucide-react0.577.0 · 1×

For agents

$ claude mcp add build-your-own-openclaw \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page