Welcome and setup

Before any code: what an AI assistant actually is

Welcome! Before we open an editor, a quick picture. An AI assistant is, at the smallest scale, three things tied together in a loop: a way to receive a message, a way to ask a language model what to say back, and a way to send the reply. That is it. Everything fancy (memory, tools, multiple agents) gets layered on top. Across this course you build one of these from a single API call up to a small team of assistants that share notes. No frameworks, just short Python files.

The smallest possible AI assistant in one picture

You receive a message, send it to a model, receive a reply, send it back. The loop runs again on the next message.

Quiz: Quiz

Loading practice…

The reference repo is at github.com/learnwithparam/learn-to-build-openclaw. Each step corresponds to one folder in that repo, and the difference between two folders is the new idea you are about to learn.

By the end of the course you have a running multi-agent assistant. It remembers facts about you, executes shell commands behind a permission layer, compacts its own context when it gets too long, and routes specialist questions to a research sub-agent. All of it is plain Python you can read in an evening.

The build, end to end

Each box is a folder in the workshop repo. Each arrow is one new architectural idea.
terminal
bash
git clone https://github.com/learnwithparam/learn-to-build-openclaw.git
cd learn-to-build-openclaw
make install
cp .env.example .env

Clone the workshop, install dependencies, and copy the env template. You only do this once. The install target runs uv sync under the hood, so grab uv first from docs.astral.sh/uv if you do not have it. uv reads pyproject.toml and installs everything into a project-local environment.

.env
bash
OPENROUTER_API_KEY=your_openrouter_api_key_here
OPENROUTER_MODEL=qwen/qwen3-coder
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here

Drop your OpenRouter key here. qwen/qwen3-coder is the default because it's cheap and accurate on coding tasks. Swap to deepseek-chat-v3.1 or claude-haiku-4-5 by changing OPENROUTER_MODEL.

One last check before we start coding: run the workshop test suite. It validates the folder structure, the Python syntax, the dependency list, and that the OpenAI tool-call shape is wired correctly. Green here means your environment is healthy.

terminal
bash
make test

Runs the workshop test suite defined in tests.py. Should print "Results: 171/171 passed". If anything fails, fix it before moving on.

Quiz: Quiz

Loading practice…