CB

czl9707/build-your-own-openclaw

Developer tools
1.8K stars Quality 48 Trend 48

A step-by-step guide to build your own AI agent.

Overview

A step-by-step tutorial to build your own AI agent, from a simple chat loop to a lightweight version of OpenClaw. that teach you how to build an minimal version of OpenClaw. Each step includes: - A README.md going through key components and design decision. - A Runnable codebase. pickle-bot - our reference implementation Build a fully-functional agent that can chat, use tools, learn skills, remember conversations, and access the internet. - - Just a Chat Loop - - Give your agent a tool. - - Extend your agent with SKILL.md - - Save your conversations. - - Direct user control over sessions. - - Pack you history and carry on... - - Your Agent want to see the bigger world. Refactor to event-driven architecture for scalability and multi-platform support. - - Expose you agent beyond CLI. - - Edit without restart. - - Talk to your agent from on your phone. - - Want to interact with you agent programatically?

README

Build Your Own OpenClaw

A step-by-step tutorial to build your own AI agent, from a simple chat loop to a lightweight version of OpenClaw.

Overview

18 progressive steps that teach you how to build an minimal version of OpenClaw. Each step includes:

  • A README.md going through key components and design decision.
  • A Runnable codebase.

Example Project: pickle-bot - our reference implementation

Tutorial Structure

Phase 1: Capable Single Agent (Steps 0-6)

Build a fully-functional agent that can chat, use tools, learn skills, remember conversations, and access the internet.

Phase 2: Event-Driven Architecture (Steps 7-10)

Refactor to event-driven architecture for scalability and multi-platform support.

Phase 3: Autonomous & Multi-Agent (Steps 11-15)

Add scheduled tasks, agent collaboration, and intelligent routing.

Phase 4: Production & Scale (Steps 16-17)

Features for reliability and long-term memory.

How to Use This Tutorial

Configure API Keys

Before running any step, you need to configure your API keys:

  1. Copy the example config:

    cp default_workspace/config.example.yaml default_workspace/config.user.yaml
    
  2. Edit config.user.yaml with your API keys:

  3. Just follow each steps, read and try it out.

Contributing

Each step is implemented in a separate session. Feel free to suggest improvements!

View this README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add czl9707/build-your-own-openclaw