[{"content":"What is Artificial Intelligence? Artificial Intelligence (AI) is the ability of a machine to perform tasks that would normally require human intelligence. Things like understanding text, recognising images, making decisions, or holding a conversation.\nBut heads up: when we say \u0026ldquo;intelligence\u0026rdquo; we don\u0026rsquo;t mean the machine thinks, feels, or has consciousness. It means it can process information and produce useful responses in a way that looks intelligent.\nAI isn\u0026rsquo;t what you see in the movies Let\u0026rsquo;s forget about Terminator, HAL 9000, and the Matrix. Real-world AI in 2026 doesn\u0026rsquo;t want to rule the world and it doesn\u0026rsquo;t have feelings. Today\u0026rsquo;s AI is a tool — a very powerful one, yes — but a tool nonetheless.\nThe AI from movies is called General AI (AGI): an intelligence that can perform any intellectual task a human can. This doesn\u0026rsquo;t exist yet, and nobody knows when — or whether — it will.\nWhat we have today is called Narrow AI: systems that do ONE thing very well. A model that generates text, another that recognises faces, another that translates languages. Each one is an expert in its field, but it can\u0026rsquo;t do anything outside it.\nYou already use AI every day (without knowing it) You might think AI is something for scientists or programmers. But if you own a smartphone, you use it every day:\nGoogle Maps calculates the best route by analysing real-time traffic with AI. It\u0026rsquo;s not a simple distance calculation — it predicts traffic jams, accidents, and arrival times using millions of data points.\nSpotify and Netflix recommend songs and shows to you. No human is studying your tastes — an AI model compares your behaviour with millions of other users and predicts what you\u0026rsquo;ll like.\nYour phone\u0026rsquo;s autocorrect predicts the word you\u0026rsquo;re about to type. That\u0026rsquo;s AI — a model trained on millions of texts that has learned which words typically go together.\nYour email\u0026rsquo;s spam filter separates legitimate mail from junk. It doesn\u0026rsquo;t compare against a fixed list — an AI model analyses the content, the sender, and suspicious patterns to decide.\nYour phone\u0026rsquo;s camera uses AI for night mode, background blur, and facial recognition. When your phone identifies faces or enhances a dark photo, that\u0026rsquo;s an AI model processing the image.\nStrong AI vs Weak AI Weak AI (Narrow AI) is what we have today. Systems designed for a specific task. ChatGPT generates text. A self-driving car drives. A vision model recognises objects. Each is excellent at its specific job, but can\u0026rsquo;t do anything beyond it. ChatGPT can\u0026rsquo;t drive a car, and a self-driving car can\u0026rsquo;t write a poem.\nStrong AI (AGI — Artificial General Intelligence) would be an AI capable of performing any intellectual task a human can. Learning new things on its own, adapting to unknown situations, reasoning about any topic. This doesn\u0026rsquo;t exist yet. There\u0026rsquo;s debate about whether we\u0026rsquo;re years or decades away — or whether it\u0026rsquo;s possible at all.\nWhy does it matter now? AI has gone from being a lab curiosity to being within everyone\u0026rsquo;s reach. With tools like ChatGPT, Claude, or Gemini, anyone can interact with an AI model using natural language — no programming skills, no technical background required.\nThis is a paradigm shift comparable to the arrival of the internet or smartphones. And just as with the internet, those who understand how it works will have an edge over those who simply \u0026ldquo;use it without thinking\u0026rdquo;.\nThat\u0026rsquo;s why we\u0026rsquo;re here.\nKey concepts today AI (Artificial Intelligence): A machine\u0026rsquo;s ability to perform tasks that would normally require human intelligence Narrow AI: AI designed for a specific task. This is what we have today General AI (AGI): A hypothetical AI capable of any human intellectual task. It doesn\u0026rsquo;t exist yet Model: The trained \u0026ldquo;brain\u0026rdquo; that does the work. We\u0026rsquo;ll talk much more about this in upcoming lessons Next lesson: A brief history of AI — from Turing to ChatGPT.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-01-what-is-ai/","summary":"We define AI clearly, debunk science fiction myths, and discover we already use it every day.","title":"Lesson 1: What is Artificial Intelligence?"},{"content":"Why does the history matter? You don\u0026rsquo;t need to be a historian to understand AI, but knowing where it comes from helps you understand where we are. AI didn\u0026rsquo;t appear out of nowhere with ChatGPT — it\u0026rsquo;s been evolving for 70 years, with spectacular successes and resounding failures.\n1950: Alan Turing and the key question It all starts with a simple question: \u0026ldquo;Can a machine think?\u0026rdquo;\nAlan Turing, a British mathematician considered the father of computer science, proposed in 1950 what we now know as the Turing Test: if a person talks to a machine and can\u0026rsquo;t tell whether the responses come from a human or a machine, then the machine can be considered \u0026ldquo;intelligent\u0026rdquo;.\nTuring never lived to see a working AI — he died in 1954. But he planted the seed.\n1956-1970: The initial euphoria In 1956, a group of scientists gathered at Dartmouth University and coined the term \u0026ldquo;Artificial Intelligence\u0026rdquo;. They were convinced that within a generation they\u0026rsquo;d have machines as intelligent as humans.\nThose early years were bursting with optimism. Programs were created that could play chess, solve logic problems, and hold basic conversations. ELIZA (1966), a program that simulated being a psychotherapist, surprised many people — even though it simply rephrased what you said as a question.\n1970-1980: The first winter Optimism crashed against reality. Computers in the 70s were too slow and had too little memory to do anything truly intelligent. Governments cut funding because the promises weren\u0026rsquo;t being kept.\nThis is known as the first AI winter — a period of disillusionment where almost nobody wanted to invest in AI.\n1980-1990: Expert systems and the second attempt In the 80s, AI revived with expert systems: programs with rules written by hand by human experts. For example, a medical expert system had thousands of rules like \u0026ldquo;if the patient has fever AND cough AND difficulty breathing, then consider pneumonia\u0026rdquo;.\nThey worked in very specific domains, but had a fundamental problem: every rule had to be written manually. As the domain grew more complex, maintaining the rules became unsustainable.\n1990-2000: The second winter Expert systems showed their limitations. Funding was cut again. AI fell into disrepute once more. Second winter.\nMeanwhile, quietly, some researchers were working on a different idea: instead of programming rules by hand, what if we let the machine learn from examples? This was called Machine Learning.\n2012: The Deep Learning revolution The turning point came in 2012, when a Deep Learning system won the ImageNet image recognition competition by a huge margin over all previous methods.\nThe key was the combination of three things that hadn\u0026rsquo;t existed together before:\nMassive data — The internet had generated enormous amounts of text, images, and videos Powerful GPUs — Graphics cards designed for video games turned out to be perfect for training neural networks Improved algorithms — Neural networks with many layers (\u0026ldquo;deep\u0026rdquo;) that could learn complex patterns From 2012 onwards, AI hasn\u0026rsquo;t stopped growing.\n2017: The Transformer architecture A paper from Google titled \u0026ldquo;Attention Is All You Need\u0026rdquo; introduced the Transformer architecture — the foundation of all modern language models. Without this paper, GPT, Claude, and Gemini wouldn\u0026rsquo;t exist.\nTransformers solved a key problem: how to process long text sequences efficiently and in parallel. Previously, models read text word by word. Transformers can \u0026ldquo;see\u0026rdquo; the entire text at once and decide which parts to pay attention to.\n2022: ChatGPT and the explosion In November 2022, OpenAI launched ChatGPT — and changed everything. It wasn\u0026rsquo;t the first chatbot, nor the first LLM, nor even the most powerful model at the time. But it was the first that anyone could try for free in their browser.\nIn 5 days it reached 1 million users. In 2 months, 100 million. AI went from being a lab topic to being a conversation topic at the pub.\n2023-2026: The current race Since ChatGPT, the pace has been dizzying:\nAnthropic launched Claude, with emphasis on safety and helpfulness Google responded with Gemini Meta bet on open source with LLaMA Mistral emerged as the European alternative DeepSeek and other Chinese models proved that innovation is global Today, models don\u0026rsquo;t just generate text — they understand images, audio, and video. And with the emergence of frameworks like OpenClaw, anyone can have their own AI agent up and running.\nThe pattern of winters and summers If you look at the history, you see a clear pattern: euphoria → exaggerated promises → disappointment → winter → new technology → euphoria.\nAre we in an AI summer? Probably. Will another winter come? Perhaps, but with one difference: this time AI is already integrated into products that millions of people use every day. It\u0026rsquo;s hard to \u0026ldquo;uninstall\u0026rdquo; something that has already changed how we work.\nKey concepts today Turing Test: If you can\u0026rsquo;t tell a machine apart from a human in a conversation, the machine is \u0026ldquo;intelligent\u0026rdquo; AI Winter: A period of disillusionment where investment in AI is cut (there have been two) Deep Learning: Machine learning with deep neural networks (many layers) Transformer: The architecture that made modern LLMs possible (2017) Machine Learning: Getting machines to learn from examples instead of programming them rule by rule Next lesson: Types of AI — how we classify intelligent machines.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-02-brief-history-of-ai/","summary":"Where AI comes from, why it \u0026lsquo;died\u0026rsquo; twice, and how we got to the current boom.","title":"Lesson 2: A Brief History of AI — from Turing to ChatGPT"},{"content":"Why classify AI? When someone says \u0026ldquo;AI\u0026rdquo;, they could be talking about very different things. Your email\u0026rsquo;s spam filter is AI. ChatGPT is AI. A self-driving car is AI. But they work in completely different ways.\nUnderstanding the types of AI will help you know what people mean when they say \u0026ldquo;machine learning\u0026rdquo;, \u0026ldquo;deep learning\u0026rdquo;, or \u0026ldquo;generative AI\u0026rdquo; — terms that sound similar but mean very different things.\nThe big umbrella: Artificial Intelligence AI is the umbrella term that encompasses everything. Any system that performs tasks normally requiring human intelligence is AI. Within this umbrella, there are levels.\nThink of it as concentric circles: AI is the big circle, inside it sits Machine Learning, and inside that sits Deep Learning. They\u0026rsquo;re not different things — each is a subset of the one above.\nMachine Learning: learning from examples Machine Learning (ML) is the branch of AI where the machine learns from examples instead of being programmed with rules.\nIn traditional programming, you tell the computer exactly what to do: \u0026ldquo;if the email contains the word \u0026lsquo;viagra\u0026rsquo;, it\u0026rsquo;s spam\u0026rdquo;. In Machine Learning, you give it thousands of emails labelled as \u0026ldquo;spam\u0026rdquo; or \u0026ldquo;not spam\u0026rdquo;, and the machine learns to tell them apart on its own. It can discover patterns you never imagined.\nThere are three main types of learning:\nSupervised learning: You give it data with the correct answers, and it learns to predict them. Example: you show it 10,000 labelled photos of cats and dogs, and it learns to tell them apart in new photos.\nUnsupervised learning: You give it unlabelled data, and it finds patterns on its own. Example: you give it customer data and it discovers groups (high spenders, low spenders, night shoppers\u0026hellip;) without you telling it what groups to look for.\nReinforcement learning: The machine learns by trial and error, receiving \u0026ldquo;rewards\u0026rdquo; when it gets things right and \u0026ldquo;penalties\u0026rdquo; when it gets things wrong. Example: a chess program plays millions of games against itself and learns which strategies work.\nDeep Learning: deep neural networks Deep Learning is a subset of Machine Learning that uses artificial neural networks — structures inspired (very loosely) by the human brain.\nA neural network is a chain of layers of \u0026ldquo;neurons\u0026rdquo; that process information. Each layer detects patterns at a different level. In image recognition, for example, the first layer detects lines, the second shapes, the third objects, the fourth complete scenes.\n\u0026ldquo;Deep\u0026rdquo; means the network has many layers. Networks from the 90s had 2-3 layers. Today\u0026rsquo;s can have hundreds. More layers = ability to detect more complex patterns, but also requires more data and computing power.\nEverything driving the current boom — speech recognition, text generation, translation, image generation — is Deep Learning.\nGenerative AI: creating new things Generative AI is the branch that has caused the current explosion. These are models trained to create new content: text, images, audio, video, code.\nUnlike an AI that classifies (spam or not spam) or predicts (what will the price be tomorrow), generative AI produces things that didn\u0026rsquo;t exist before. It writes texts, paints images, composes music.\nThe best-known examples:\nText generation: GPT, Claude, Gemini, LLaMA Image generation: DALL-E, Midjourney, Stable Diffusion Code generation: GitHub Copilot, Claude, Cursor Video generation: Sora, Runway Voice generation: ElevenLabs When we use ChatGPT or Claude, we\u0026rsquo;re using generative text AI. The tool doesn\u0026rsquo;t search the internet for information (unless web search is enabled) — it generates new text word by word.\nWhere do the tools you know fit in? ChatGPT, Claude, Gemini: Generative text AI, built with Deep Learning, specifically with the Transformer architecture. They belong to the LLM (Large Language Models) family, which we\u0026rsquo;ll cover in detail in week 2.\nGoogle Maps (routing): Supervised Machine Learning. Trained on real traffic data to predict arrival times.\nSpotify (recommendations): Unsupervised + supervised Machine Learning. Groups users with similar tastes and predicts what you\u0026rsquo;ll like.\nSpam filter: Supervised Machine Learning. Trained on millions of labelled emails.\nTesla Autopilot: Deep Learning with computer vision + reinforcement learning.\nNot everything that says \u0026ldquo;AI\u0026rdquo; is AI An important warning: the term \u0026ldquo;AI\u0026rdquo; has become a marketing buzzword. You\u0026rsquo;ll see products claiming to use \u0026ldquo;AI\u0026rdquo; that really do very simple things — sometimes just hard-coded rules with no actual machine learning.\nIf a company says their product \u0026ldquo;uses AI\u0026rdquo;, ask yourself: does it learn from data? Or does it just follow fixed rules? If it\u0026rsquo;s the latter, it\u0026rsquo;s traditional programming with a modern label.\nKey concepts today Machine Learning: The machine learns from examples instead of being programmed with rules Deep Learning: Machine Learning with neural networks of many layers Generative AI: Models that create new content (text, images, code, video) Supervised learning: Learning from labelled data (questions with correct answers) Unsupervised learning: Finding patterns in unlabelled data Reinforcement learning: Learning by trial and error with rewards Next lesson: What is an AI model? — no maths, we promise.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-03-types-of-ai/","summary":"The different categories of AI explained practically: Machine Learning, Deep Learning, Generative AI and more.","title":"Lesson 3: Types of AI — how we classify intelligent machines"},{"content":"What is a model? An AI model is a program that has been trained on data to perform a task. Think of it as a specialised brain: it has absorbed an enormous amount of information and learned patterns that allow it to make predictions or generate content.\nThe word \u0026ldquo;model\u0026rdquo; can be confusing because it\u0026rsquo;s used in science with different meanings. In AI, a model is simply the result of training: a file (or set of files) containing everything the machine has learned.\nTraining: how a model learns Imagine you want to teach a child to recognise cats. You don\u0026rsquo;t give them a definition (\u0026ldquo;four-legged animal with whiskers\u0026rdquo;) — you show them hundreds of photos of cats and say \u0026ldquo;this is a cat\u0026rdquo;. With enough examples, the child learns to recognise cats they\u0026rsquo;ve never seen before.\nAn AI model works the same way, but at a massive scale:\nYou feed it training data — millions or trillions of examples The model looks for patterns — connections in the data that allow it to predict It\u0026rsquo;s evaluated and corrected — if it gets things wrong, the internal parameters are adjusted The process is repeated until the predictions are good enough For a language model like Claude or GPT, the \u0026ldquo;training data\u0026rdquo; is enormous amounts of text: books, articles, websites, code, conversations. The model learns how language works: which words typically go together, how a sentence is structured, how an argument develops.\nParameters: the size of the brain When you hear about \u0026ldquo;7B\u0026rdquo;, \u0026ldquo;70B\u0026rdquo;, or \u0026ldquo;405B\u0026rdquo; models, the B stands for billions of parameters.\nA parameter is an internal number in the model that gets adjusted during training. Think of parameters as the synaptic connections of the brain: each one stores a tiny piece of what the model has learned.\nMore parameters means the model can learn more complex and subtle patterns. But it also means it needs more memory to run and is slower.\nTo put this in perspective:\nA small model (1-3B parameters) can run on your computer. It handles basic tasks well but falls short on complex reasoning. A medium model (7-13B) needs a decent computer with a GPU. It can hold coherent conversations and handle varied tasks. A large model (70B+) needs powerful servers. This is what commercial services like ChatGPT or Claude use. A giant model (200B+) needs entire data centres. These are the cutting-edge models from the big companies. Bigger isn\u0026rsquo;t always better A common trap is thinking that the biggest model will always be the best. It\u0026rsquo;s not.\nA small model well-trained on quality data can outperform a large model trained on mediocre data. The quality of the training data is just as important as the model size — and often more so.\nAlso, a giant model can be overkill for your task. If you only need it to summarise emails, a 7B model can do that perfectly. Spending money on a 200B model for that task would be like hiring a lorry to pop out for bread.\nThe importance of data There\u0026rsquo;s a saying: \u0026ldquo;Garbage in, garbage out\u0026rdquo; — if you feed it rubbish, you get rubbish back. This is especially true for AI models.\nA model trained on texts full of errors will have errors. A model trained mostly on English text will be worse at Catalan or Spanish. A model trained on biased data will reproduce those biases.\nThat\u0026rsquo;s why companies training models invest heavily in curating data: selecting, cleaning, and balancing the texts they train their models on.\nOpen vs closed models Closed models (proprietary): You can\u0026rsquo;t see how they\u0026rsquo;re made or download them. You can only use them through the company\u0026rsquo;s API or website. Examples: OpenAI\u0026rsquo;s GPT, Anthropic\u0026rsquo;s Claude, Google\u0026rsquo;s Gemini.\nOpen models (open source or open weights): You can download the model, run it on your own computer, modify it, and use it however you like. Examples: Meta\u0026rsquo;s LLaMA, Mistral, Qwen.\nClosed models tend to be more powerful and don\u0026rsquo;t require your own hardware. But you depend on the company, pay per use, and your data passes through their servers.\nOpen models give you full control, privacy, and zero cost per use. But you need hardware to run them, and they\u0026rsquo;re often less powerful than the best closed models.\nThe chef analogy If all of this still sounds abstract, think of a chef:\nThe training data is all the dishes they\u0026rsquo;ve tasted, the recipes they\u0026rsquo;ve studied, the kitchens they\u0026rsquo;ve visited The parameters are their accumulated skills and knowledge The model is the trained chef, ready to cook The prompt (which we\u0026rsquo;ll cover later) is what you ask them to cook The response is the dish they serve you A chef with more experience (more parameters) and better teachers (better data) will make better dishes. But even the best chef needs you to ask clearly for what you want.\nKey concepts today Model: The result of training — a file containing everything the machine has learned Training: The process of feeding a model data so it learns patterns Parameters (7B, 70B, 405B): The internal connections of the model. More parameters = more capability, more resources Training data: The material the model learns from. Quality is key Open model: You can download and run it on your own hardware Closed model: Only accessible via the company\u0026rsquo;s API or website Next lesson: The AI you already use without knowing it — a tour of all the AI applications in your daily life.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-04-what-is-an-ai-model/","summary":"What a model is, how it\u0026rsquo;s trained, why there are big and small ones, and why not all models are equal.","title":"Lesson 4: What is an AI Model? (no maths required)"},{"content":"Invisible AI The most successful AI is the kind you don\u0026rsquo;t notice. You can\u0026rsquo;t see it, you don\u0026rsquo;t know it\u0026rsquo;s there, but if you removed it, your daily life would change dramatically. Today we\u0026rsquo;ll tour all the AI applications you\u0026rsquo;re probably already using.\nYour phone is an AI factory Every time you take a photo, your phone fires up several AI models simultaneously.\nNight mode: When you take a photo in low light, the camera doesn\u0026rsquo;t just crank up the brightness. An AI model analyses the image, separates signal from noise, and reconstructs details the human eye can barely see. That\u0026rsquo;s why night photos on modern phones look like miracles — they are, computational ones.\nPortrait mode (background blur): Your phone has a small, flat camera that physically can\u0026rsquo;t blur the background like a professional camera. An AI model detects where you are and where the background is, and applies the blur artificially. So well that most people can\u0026rsquo;t tell the difference.\nFacial recognition: When you unlock your phone with your face, an AI model compares your face to the one it has stored. And it\u0026rsquo;s not a simple photo comparison — it works from different angles, with or without a beard, with glasses, at night.\nPredictive keyboard: Every time you type a message, the keyboard predicts the next word. This is a small language model trained on millions of texts. It\u0026rsquo;s not as powerful as ChatGPT, but the underlying idea is the same: predict the most likely word.\nNavigation and transport Google Maps / Waze: They don\u0026rsquo;t just calculate the shortest route — they predict future traffic. They analyse data from millions of phones in real time, combine it with historical patterns, and calculate arrival times with surprising accuracy. This is pure Machine Learning.\nUber / Lyft: The trip price isn\u0026rsquo;t fixed — an AI model adjusts it dynamically based on demand, traffic, time, and area.\nAssisted driving: Cars like Tesla, Mercedes, or BMW use Deep Learning models to process camera images and detect lanes, cars, pedestrians, and signs.\nEntertainment Netflix: 80% of what people watch on Netflix comes from AI recommendations. The model analyses what you\u0026rsquo;ve watched, for how long, when you stopped, what you skipped, and compares it with millions of other users. Even the thumbnails you see are personalised.\nSpotify / YouTube Music: Spotify\u0026rsquo;s Discover Weekly is a brilliant example of AI. Every Monday you get a list of 30 songs you\u0026rsquo;ll probably like. The model analyses your listening history, finds users with similar tastes, and offers you what they listen to that you haven\u0026rsquo;t discovered yet.\nYouTube: YouTube\u0026rsquo;s recommendation algorithm is one of the most powerful (and controversial) AI models in the world. It decides what shows up on your home page and what\u0026rsquo;s suggested after each video.\nTikTok: TikTok\u0026rsquo;s \u0026ldquo;For You\u0026rdquo; is recommendation AI taken to the extreme. It analyses not just what you watch, but how you watch it: how long you view each video, whether you rewatch it, share it, or comment on it.\nCommunication Spam filter: One of the oldest and most successful examples of everyday AI. It analyses content, sender, formatting patterns, and links to decide whether an email is legitimate or junk.\nMachine translation: Google Translate went from being a joke to being surprisingly useful thanks to Deep Learning. Since 2016 it uses a neural network that translates whole sentences instead of word by word. DeepL raised the bar even further.\nVoice assistants: Siri, Alexa, and Google Assistant combine several AI models: one to understand your voice, one to interpret what you want, one to generate the response, and one to convert it to speech.\nShopping and finance Amazon: The \u0026ldquo;customers who bought this also bought\u0026hellip;\u0026rdquo; recommendations are collaborative filtering AI. But Amazon goes much further: it uses AI to decide which products to show you first, what price to offer, and how to organise its warehouses.\nBanking fraud detection: If your credit card gets blocked when you make an unusual purchase, it\u0026rsquo;s because an AI model detected an unusual pattern in milliseconds.\nHealthcare Medical imaging diagnosis: Deep Learning models can detect tumours in X-rays and mammograms with accuracy comparable to expert radiologists. They don\u0026rsquo;t replace doctors — but they help them avoid missing anomalies.\nThe question you\u0026rsquo;re left with After seeing all this, you might wonder: if AI already does so many things for me, why do I need to understand it?\nBecause there\u0026rsquo;s a difference between being a passive user of AI that others have designed for you, and being an active user who understands how it works, chooses which tools to use, and even creates their own agents.\nThat\u0026rsquo;s the difference we\u0026rsquo;re building in this course.\nKey concepts today Invisible AI: The most successful AI is the kind you don\u0026rsquo;t notice because it\u0026rsquo;s integrated into everyday products Recommendation: Systems that predict what you\u0026rsquo;ll like based on your behaviour and that of others Collaborative filtering: Recommending things based on what similar users do Speech-to-text / Text-to-speech: Converting voice to text and vice versa — both are AI models Next lesson: We start Week 2 — What is an LLM? The model that understands (and generates) text.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-05-ai-in-daily-life/","summary":"A tour of all the AI applications that are already part of your daily life — from your phone to your car.","title":"Lesson 5: The AI You Already Use Without Knowing It"},{"content":"Week 2: into the heart of the revolution If Week 1 was about understanding the broad \u0026ldquo;sea\u0026rdquo; of AI, now we dive into the specific technology behind the current explosion: Large Language Models (LLMs).\nWhen you use ChatGPT, Claude, Gemini, or any modern chatbot, you\u0026rsquo;re talking to an LLM. When an AI agent writes, summarises, translates, or codes, it does so with an LLM. Understanding what an LLM is and how it works is the key to understanding everything that comes next.\nWhat is an LLM? An LLM is an AI model trained on massive amounts of text that can understand and generate human language.\nLet\u0026rsquo;s break down the name:\nLarge: It has trillions of parameters and was trained on trillions of words Language: Its domain is text — understanding and producing it Model: As we saw in Lesson 4, it\u0026rsquo;s a trained \u0026ldquo;brain\u0026rdquo; An LLM isn\u0026rsquo;t a database that looks up answers. It\u0026rsquo;s not a search engine like Google. It doesn\u0026rsquo;t copy and paste text from anywhere. What it does is generate new text word by word, based on patterns it learned during training.\nHow does it work? Next-word prediction The core mechanism of an LLM is surprisingly simple to understand: it predicts the next word.\nIf you give it the text \u0026ldquo;The cat climbed onto the\u0026hellip;\u0026rdquo;, the model calculates the probabilities of all possible words that could come next and picks the most likely one. \u0026ldquo;Table?\u0026rdquo; \u0026ldquo;Roof?\u0026rdquo; \u0026ldquo;Chair?\u0026rdquo; Based on all the text it saw during training, it decides which word makes the most sense.\nBut it doesn\u0026rsquo;t do this once — it does it for every word. It generates the first one, adds it to the text, and then predicts the second. And the third. And so on, word by word, until the response is complete.\nThis might seem too simple a mechanism to produce coherent texts, complex reasoning, and useful answers. But when you train a model on trillions of words and give it trillions of parameters, \u0026ldquo;next-word prediction\u0026rdquo; becomes an emergent capability far more powerful than anyone expected.\nAn LLM is not a search engine When you search on Google, the search engine scans an index of web pages and shows you the ones that best match your query. The information comes from real web pages that exist on some server.\nWhen you ask an LLM, the model generates a new response based on patterns it learned during training. It doesn\u0026rsquo;t search the internet (unless it has web search enabled). It produces new text based on the statistical probability of words.\nThis explains two important things:\nWhy LLMs can \u0026ldquo;make things up\u0026rdquo;: If the model predicts that the most probable next word is X, it will use it — even if it\u0026rsquo;s incorrect. This is known as hallucination.\nWhy LLMs don\u0026rsquo;t always have up-to-date information: The model knows what was in the training text, which has a cutoff date.\nWhat can an LLM do? A single model can: generate text, answer questions, translate, summarise, write code, analyse, and converse. All with the same model — you simply change what you ask it (the prompt).\nWhat can\u0026rsquo;t an LLM do? It doesn\u0026rsquo;t \u0026ldquo;know\u0026rdquo; anything with certainty: It predicts likely text, it doesn\u0026rsquo;t assert truths.\nIt has no experiences or emotions: When an LLM says \u0026ldquo;I understand how you feel\u0026rdquo;, it\u0026rsquo;s generating the phrase that statistically follows your message. It doesn\u0026rsquo;t feel anything.\nIt doesn\u0026rsquo;t think like a human: The internal process is mathematical probability calculation, not conscious reasoning.\nIt doesn\u0026rsquo;t access the internet (by default): Unless it has web search tools enabled.\nIt doesn\u0026rsquo;t learn from your conversations: Each conversation starts from scratch. The model isn\u0026rsquo;t modified when you talk to it.\nKey concepts today LLM (Large Language Model): An AI model trained on massive text to understand and generate language Next-word prediction: The core mechanism of LLMs — generating text by predicting what word comes next Hallucination: When an LLM generates incorrect information with apparent confidence RLHF: A technique that makes models better at following human instructions Next lesson: Tokens — how an LLM \u0026ldquo;reads\u0026rdquo; text.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-06-what-is-an-llm/","summary":"We define LLM, understand why it\u0026rsquo;s different from a Google search, and discover how text generation works.","title":"Lesson 6: What is an LLM? The Model that Understands (and Generates) Text"},{"content":"Why are we talking about tokens? If you\u0026rsquo;ve read about AI, you\u0026rsquo;ve surely seen phrases like \u0026ldquo;the model supports 128K tokens\u0026rdquo; or \u0026ldquo;the price is $3 per million tokens\u0026rdquo;. But what exactly is a token?\nUnderstanding tokens is practical and important because they affect three things you\u0026rsquo;ll care about when using an LLM: how much it costs, how much text it can process, and how fast it responds.\nA token is NOT a word Here\u0026rsquo;s the first surprise: an LLM doesn\u0026rsquo;t read words. It reads tokens — chunks of text that can be whole words, parts of words, or even individual characters.\nThe process of converting text into tokens is called tokenization, done by a program called a tokenizer before the text reaches the model.\nLet\u0026rsquo;s look at some English examples:\n\u0026ldquo;Hello\u0026rdquo; → 1 token (common word, stays whole) \u0026ldquo;unhappiness\u0026rdquo; → 3 tokens: \u0026ldquo;un\u0026rdquo; + \u0026ldquo;happi\u0026rdquo; + \u0026ldquo;ness\u0026rdquo; \u0026ldquo;ChatGPT\u0026rdquo; → 2-3 tokens And in other languages like Spanish or Catalan:\n\u0026ldquo;Hola\u0026rdquo; → 1 token (short, common word) \u0026ldquo;Inteligencia\u0026rdquo; → 3-4 tokens (longer word, less common in English-dominated training data) \u0026ldquo;Desarrollo\u0026rdquo; → 2-3 tokens Why does it work this way? The reason is efficiency. Imagine if the model had to learn every word of every language as an independent unit. It would need a vocabulary of millions of entries.\nInstead, with tokenization, the model works with a vocabulary of 30,000-100,000 tokens that it can combine to represent any text in any language. Common English words tend to be a single token. Less common words or words from other languages get split into pieces.\nThink of it like Lego bricks: with a limited set of pieces you can build anything. The bigger pieces cover common cases quickly. The smaller pieces let you build any unusual word.\nWhy do non-English languages \u0026ldquo;cost\u0026rdquo; more tokens? This is important and has practical consequences: writing in Spanish, Catalan, Arabic, Japanese, or any non-English language consumes more tokens to express the same idea.\nWhy? Because the tokenizer was trained predominantly on English text. Common English words have become efficient tokens (1 word = 1 token). Words in other languages are often split into fragments because they appear less frequently in the training data.\nIn practice, a text in Spanish can consume between 20% and 50% more tokens than the same text in English.\nInput tokens vs output tokens When you interact with an LLM, there are two flows of tokens:\nInput tokens: The text you send to the model — your question, instructions, context, attached documents.\nOutput tokens: The text the model generates as a response. Each word of the response is one or more tokens generated sequentially.\nMost providers charge for both, but at different prices. Output tokens are usually more expensive than input tokens (because generating requires more computation than reading).\nThe price per token When you see a price like \u0026ldquo;$3 per million input tokens\u0026rdquo;, what does that mean in practical terms?\nA quick rule for English: 1 token ≈ 0.75 words (or conversely, 1 word ≈ 1.3 tokens). For Spanish or Catalan, count 1 word ≈ 1.5-2 tokens.\nA million tokens in English is about 750,000 words — roughly 10 books. At $3 per million tokens, processing 10 books of input costs $3.\nTools for counting tokens You don\u0026rsquo;t have to guess — there are free tools:\nOpenAI Tokenizer (platform.openai.com/tokenizer): Paste text and it shows you how many tokens it has and how it\u0026rsquo;s split.\nTiktokenizer (tiktokenizer.vercel.app): A visual interface where you see tokens in different colours.\nWhy does all this matter to you? If you\u0026rsquo;re here because you want to set up an agent with OpenClaw, tokens will be a constant part of your daily routine:\nCost: Every interaction consumes tokens. Understanding how many you use helps control the bill. Context limit: The model has a token limit it can process at once. Speed: More output tokens = longer response time. Optimisation: Writing efficient prompts saves tokens and money. Key concepts today Token: The smallest unit of text an LLM processes — can be a word, part of a word, or a character Tokenization: The process of converting text into tokens Tokenizer: The program that does the tokenization (each model family has its own) Input vs output tokens: Input is what you send, output is what the model generates Quick rule: 1 English word ≈ 1.3 tokens / 1 Spanish word ≈ 1.5-2 tokens Next lesson: The context window — an LLM\u0026rsquo;s short-term memory.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-07-tokens-and-tokenization/","summary":"What tokens are, why they\u0026rsquo;re not words, and why it matters when talking about cost, speed, and limits.","title":"Lesson 7: Tokens — How an LLM 'Reads' Text"},{"content":"What is the context window? The context window is the total amount of text an LLM can process at once. It includes both what you send it (input) and what it generates (output).\nThink of the context window as the model\u0026rsquo;s \u0026ldquo;working memory\u0026rdquo; — the equivalent of your short-term memory when reading. You can keep a few pages of content in mind. If the text is very long, the early pages start to blur as you go on.\nAn LLM works the same way: everything that fits inside the context window, it can \u0026ldquo;see\u0026rdquo; and use. Whatever doesn\u0026rsquo;t fit simply doesn\u0026rsquo;t exist for it.\nHow much fits? Context window sizes vary hugely between models:\nEarly commercial models (GPT-3, 2020) had windows of 4,096 tokens — about 3,000 words, barely more than a short article.\nToday\u0026rsquo;s top models offer much larger windows. Claude can work with 200,000 tokens (about 150,000 words — a full book). GPT-4 reaches 128,000 tokens. Gemini 1.5 Pro reached one million tokens.\nThese numbers sound huge, but in practice they fill up faster than you\u0026rsquo;d think.\nInput + output = total context An important point many people miss: the context window includes everything — both input and output.\nIf a model has a 128K token window and you send it a 100K token document, it only has 28K tokens left for generating the response. In a conversation, every message from you and every response from the model accumulates inside the window.\nWhat happens when you hit the limit? When the conversation or input exceeds the context window, the model has to \u0026ldquo;discard\u0026rdquo; information:\nTruncation: The system removes the oldest messages from the conversation to make room for new ones. The model \u0026ldquo;forgets\u0026rdquo; the beginning of the conversation.\nError: Some systems simply reject the input if it exceeds the limit.\nAn LLM doesn\u0026rsquo;t remember between conversations This is perhaps the biggest misconception: an LLM doesn\u0026rsquo;t remember previous conversations.\nEvery time you open a new chat with ChatGPT, Claude, or any LLM, the model starts completely from scratch. It doesn\u0026rsquo;t know who you are, what you asked it yesterday, or what you agreed on last week.\nWhy? Because the model is a static program that doesn\u0026rsquo;t change when you talk to it. Your conversations don\u0026rsquo;t modify the model\u0026rsquo;s parameters.\nSo how do ChatGPT and Claude seem to \u0026ldquo;remember\u0026rdquo; things? Because the platforms add layers on top of the model:\nConversation history: The system saves previous messages and re-sends them to the model with each interaction Persistent memory: Some systems extract key information from conversations and store it in a separate database System prompt: Fixed instructions sent to the model with every message These are all external \u0026ldquo;tricks\u0026rdquo; — the model itself remembers nothing.\nPractical tips Be concise: Don\u0026rsquo;t fill the context window with unnecessary text.\nStructure long conversations well: If a conversation gets very long, consider starting a new one with a summary of what\u0026rsquo;s been discussed.\nProvide relevant context: If you need the model to know something, include it in your message. Don\u0026rsquo;t assume it \u0026ldquo;knows\u0026rdquo; from a previous conversation.\nKey concepts today Context window: The total amount of tokens an LLM can process at once (input + output) Truncation: When the system removes old messages to make room for new ones An LLM doesn\u0026rsquo;t remember between conversations: Each chat starts from zero; \u0026ldquo;memory\u0026rdquo; is managed by external layers Conversation history: A platform trick — it re-sends previous messages to the model, consuming tokens Next lesson: The LLM map — who\u0026rsquo;s who in 2026.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-08-context-window/","summary":"What the context window is, why it has a limit, what happens when you exceed it, and why an LLM doesn\u0026rsquo;t remember previous conversations.","title":"Lesson 8: The Context Window — an LLM's Short-Term Memory"},{"content":"Why know the map? When you start configuring your own agent, one of the first decisions will be: which model do I use? There are dozens of models available and new ones appear every week. Having a clear mental map will help you choose wisely instead of blindly.\nThe big players: companies and models OpenAI — The commercial pioneer OpenAI launched ChatGPT and ignited the revolution. Their GPT family models are the best known on the market. They focus on being the most powerful and first with new capabilities. They have the largest user base and the most mature developer ecosystem. The trade-off is that they\u0026rsquo;re one of the most expensive providers and their models are completely closed.\nAnthropic — Safety and helpfulness Anthropic, founded by former OpenAI members, creates the Claude family of models. Their philosophy is building powerful but safe AI — with strong emphasis on following instructions correctly, being honest about limitations, and avoiding harmful content.\nClaude particularly excels at tasks requiring complex instructions, quality writing, and analysis of long documents (with a 200K token context window).\nGoogle — The integrated ecosystem Google competes with the Gemini family. Google\u0026rsquo;s advantage is integration with its ecosystem: Gmail, Google Docs, Google Search, Android. Google was also the pioneer in the research that made LLMs possible — the Transformer paper came from Google.\nMeta — The open source leader Meta publishes its LLaMA models as open source. Anyone can download, use, and modify them. This strategy has enormously accelerated innovation.\nMistral — The European alternative Mistral is a French company that has proven competitive models can be built from Europe. Their models stand out for their efficiency.\nChinese models DeepSeek shook the market with models rivalling the best Western ones. Qwen (Alibaba) and Kimi (Moonshot AI) offer powerful models, many of them open source.\nOpen models you can run yourself If you want to run a model on your own computer (with Ollama, which we\u0026rsquo;ll cover in Week 3):\nLLaMA (Meta): The benchmark. Models from 8B to 405B parameters.\nMistral / Mixtral: Efficient models with excellent performance for their size.\nQwen (Alibaba): Good multilingual models. Especially strong in non-English languages.\nGemma (Google): Small, efficient models published as open source.\nPhi (Microsoft): Surprisingly capable small models (3-4B parameters).\nHow to choose a model? The choice depends on four factors:\n1. Task: For general conversation and complex reasoning, large models are superior. For specific, repetitive tasks, a small model may suffice.\n2. Budget: Commercial models charge per token. Local open models have zero usage cost, but you need hardware.\n3. Privacy: If your data is sensitive, a local model ensures nothing leaves your computer.\n4. Quality vs speed: Large models are more accurate but slower. Small ones are faster and cheaper, but may make more mistakes.\nThere\u0026rsquo;s no universal \u0026ldquo;best model\u0026rdquo; — there\u0026rsquo;s the best model for your use case.\nRankings: where to compare Chatbot Arena (lmsys.org): Ranking based on human votes. The most reliable.\nArtificial Analysis (artificialanalysis.ai): Compares models on speed, price, and quality.\nOpen LLM Leaderboard (Hugging Face): Ranking of open models.\nThe landscape changes fast An important note: this map expires quickly. Every few months new models appear that shift the balance. That\u0026rsquo;s why understanding the criteria for choosing is more important than memorising model names.\nKey concepts today Closed models (GPT, Claude, Gemini): More powerful, API access, pay per token Open models (LLaMA, Mistral, Qwen): Downloadable, locally executable, zero usage cost Chatbot Arena: Model ranking based on human votes There\u0026rsquo;s no \u0026ldquo;best model\u0026rdquo;: There\u0026rsquo;s the best model for your use case, budget, and needs Next lesson: Your first prompt — how to talk to an LLM.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-09-current-models/","summary":"Meet the main models of the moment, the companies behind them, and the key differences to help you choose.","title":"Lesson 9: The LLM Map — Who's Who in 2026"},{"content":"The prompt: your most powerful tool Of everything you\u0026rsquo;ll learn in this course, the ability to write good prompts is probably the most useful day to day. A good prompt can be the difference between a useless response and a brilliant one — with the same model.\nA prompt is simply the text you send to the model. Your question, your instructions, the context you provide. Everything you type in a chatbot\u0026rsquo;s text box is a prompt.\nWhy does it matter how you ask? Remember from Lesson 6: an LLM generates text by predicting the most probable word given the input. If the input is vague, the output will be vague. If the input is specific and clear, the output will be much better.\nLet\u0026rsquo;s compare two prompts for the same task:\nBad prompt: \u0026ldquo;Explain AI to me\u0026rdquo;\nToo broad. The model doesn\u0026rsquo;t know what level to explain at, how long it should be, or which aspect of AI you\u0026rsquo;re interested in.\nGood prompt: \u0026ldquo;Explain what artificial intelligence is in 3 short paragraphs. The audience is an adult with no technical background. Use everyday examples like smartphones or Netflix.\u0026rdquo;\nNow the model knows exactly what you want: length, level, and style.\nThe four pieces of a good prompt 1. Role Tell the model who it is or what role to adopt.\n\u0026ldquo;You are a computer science teacher who explains concepts to people with no technical background.\u0026rdquo;\n2. Context Give it the information it needs to respond well.\n\u0026ldquo;I\u0026rsquo;m preparing a presentation for my company\u0026rsquo;s directors. They have no technical background but they make budget decisions.\u0026rdquo;\n3. Instruction Tell it exactly what you want it to do.\n\u0026ldquo;Write me 5 key points about why we should invest in AI, with a concrete example for each point.\u0026rdquo;\n4. Output format Tell it how you want the response.\n\u0026ldquo;Respond as a numbered list. Each point should have a bold title followed by a 2-3 line explanation.\u0026rdquo;\nPractical examples Task: Write an email\nBasic prompt: \u0026ldquo;Write an email to my boss about holidays\u0026rdquo;\nImproved prompt: \u0026ldquo;Write a short, professional email to my boss, Jordi, asking for 3 days off the week of June 15th. The tone should be friendly but direct. Mention that I\u0026rsquo;ll leave pending tasks organised.\u0026rdquo;\nTask: Understand a concept\nBasic prompt: \u0026ldquo;What is blockchain?\u0026rdquo;\nImproved prompt: \u0026ldquo;Explain what blockchain is as if you were explaining it to someone who can use a computer but can\u0026rsquo;t program. Use an everyday analogy. Maximum 200 words.\u0026rdquo;\nCommon mistakes Being too vague: \u0026ldquo;Help me with my project\u0026rdquo; — What project? What help?\nDoing too many things at once: Better to go step by step.\nAssuming it knows everything: \u0026ldquo;Do what I told you yesterday\u0026rdquo; — The model doesn\u0026rsquo;t remember previous conversations.\nNot specifying the format: If you don\u0026rsquo;t say how you want the response, the model will choose for itself.\nPrompt engineering: no programming required The term prompt engineering sounds very technical, but it simply means \u0026ldquo;the art of writing good prompts\u0026rdquo;. It\u0026rsquo;s not programming — it\u0026rsquo;s clear, precise communication.\nSome useful techniques:\nFew-shot prompting: Give it examples of what you want. \u0026ldquo;Convert these titles into URL slugs. Example: \u0026lsquo;What is AI?\u0026rsquo; → \u0026lsquo;what-is-ai\u0026rsquo;. Now do it for: \u0026lsquo;How does an LLM work?\u0026rsquo;\u0026rdquo;\nChain of thought: Ask it to reason step by step. \u0026ldquo;Before giving the final answer, explain your reasoning step by step.\u0026rdquo;\nIteration: Don\u0026rsquo;t expect the first prompt to be perfect. Try it, look at the result, and adjust.\nThe prompt is the interface Think of the prompt as the interface between you and the model. An excellent model with a bad prompt will give a mediocre result. A decent model with an excellent prompt can give a surprisingly good result.\nWhen you configure your agent with OpenClaw, the system prompt will be the most important piece of the entire configuration. Investing time in it is well worth it.\nKey concepts today Prompt: The text you send to the model — question, instructions, context The 4 pieces: Role + Context + Instruction + Output format Prompt engineering: The art of writing effective prompts (no programming required) Few-shot: Giving the model examples so it understands the desired format Chain of thought: Asking the model to reason step by step to improve accuracy Iteration: Adjusting the prompt based on results until you get what you want Next lesson: We start Week 3 — What is a provider? Who gives you access to models.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-10-prompt-basics/","summary":"Learn to write effective prompts and understand why the result depends on how you ask.","title":"Lesson 10: Your First Prompt — How to Talk to an LLM"},{"content":"Week 3: how to access models You now know what an LLM is, how it works, and what models exist. Now comes the practical question: how do I access one? You can\u0026rsquo;t ring up Anthropic and ask them to activate Claude. You need an intermediary — and that\u0026rsquo;s a provider.\nWhat is a provider? A provider is a company or service that gives you access to an AI model. It\u0026rsquo;s the intermediary between you and the model.\nThink of a simple analogy: the model is a film. The provider is the platform where you watch it — Netflix, HBO, Amazon Prime. The same film can be available on several platforms, with different prices and conditions. LLMs work exactly the same way.\nDirect providers vs inference providers Direct providers These are the companies that create the model and sell it to you directly. OpenAI sells access to GPT. Anthropic sells access to Claude. Google offers Gemini.\nWith a direct provider, you\u0026rsquo;re guaranteed to be using the \u0026ldquo;official\u0026rdquo; model with the latest updates. It\u0026rsquo;s usually the most expensive option.\nInference providers These are companies that don\u0026rsquo;t create models, but run them on their servers and offer them to you. They take open models (LLaMA, Mistral, Qwen) and make them available to everyone.\nGroq is known for its brutal speed. Together AI offers a wide variety of open models. NVIDIA NIM provides access with a free tier. OpenRouter is an aggregator — a single access point to dozens of models.\nThe advantage of inference providers is price and variety. The downside is they don\u0026rsquo;t always have the latest models.\nWhy does the price vary? Hardware: Each provider uses different hardware. Scale: A large provider can offer lower prices. Margin: Each provider decides their margin. Optimisations: Some apply quantization that can slightly affect quality.\nThe complete chain You → Agent (OpenClaw) → Provider (API) → Model (LLM) → Response How to choose a provider? Cost: If budget is zero, look for free tiers (NVIDIA NIM, Google AI Studio, Groq free).\nSpeed (latency): If you need fast responses, Groq is king.\nModel quality: If you need the best model possible, go to the direct provider.\nReliability: Large providers have robust infrastructure. Free tiers may have outages.\nKey concepts today Provider: A company or service that gives you access to an AI model Direct provider: The model creator who sells it to you (OpenAI, Anthropic, Google) Inference provider: A company running open models on their servers (Groq, Together, NVIDIA NIM) OpenRouter: An aggregator giving access to multiple models and providers from a single point The chain: You → Agent → Provider (API) → Model → Response Next lesson: What is an API? — The gateway to LLMs.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-11-what-is-a-provider/","summary":"Understand the model → provider → user chain, and why the same model can cost different amounts depending on where you use it.","title":"Lesson 11: What is a Provider? Who Gives You Access to Models"},{"content":"Why do you need to know what an API is? If you want to use an LLM from the browser (ChatGPT, Claude.ai), you don\u0026rsquo;t need to know what an API is. But if you want your own agent — a Telegram bot that works for you, an automation that processes emails — you need to connect to the model another way. That way is the API.\nWhat is an API? API stands for Application Programming Interface. It sounds intimidating, but the concept is simple.\nAn API is a standardised communication system between two programs. It allows one program to make requests to another and receive responses, without any human intervening.\nThe clearest analogy is a restaurant:\nYou (the agent/program) are the customer The menu is the API documentation — it tells you what you can order The waiter is the API — takes your order to the kitchen and brings back the dish The kitchen is the model (LLM) — processes the order and prepares the result You don\u0026rsquo;t walk into the kitchen to cook. You place your order with the waiter, in a format they understand, and they handle the entire process.\nAPI vs web interface When you use ChatGPT in the browser, there\u0026rsquo;s an API behind it — but the web interface hides all the complexity.\nWhen you use the API directly, you build the request yourself. You tell the model exactly what you want: which model to use, how many response tokens, at what temperature, and what text to process.\nThe key difference: the web interface is for interactive humans. The API is for autonomous programs.\nAPI keys: your access credential An API key is like a special password that identifies you to the provider. Every time your agent makes a request, it sends the API key so the provider knows who you are and which account to charge.\nGolden rules for API keys:\nNever share an API key. If someone has it, they can make requests on your account and you\u0026rsquo;ll pay the bill.\nNever put it in code you push to GitHub. There are bots that scan GitHub looking for exposed API keys and exploit them within minutes.\nStore them in environment variables. Instead of putting the key directly in code, store it as an operating system variable.\nYou can revoke them and create new ones. If you think a key has been compromised, delete it immediately.\nThe cost of the API Most providers charge per token processed:\nIf your agent processes 1,000 requests a day, you pay for all the tokens If you don\u0026rsquo;t use it one day, you pay nothing Output tokens are usually more expensive than input tokens OpenAI-compatible APIs Many inference providers use an API format compatible with OpenAI. This means the way to send requests is the same for all of them — you only change the provider\u0026rsquo;s URL and the API key.\nFor OpenClaw, this is very practical: you can switch providers by simply changing two parameters in the configuration.\nKey concepts today API: A communication interface between programs — the \u0026ldquo;waiter\u0026rdquo; between your agent and the model API key: A unique credential that identifies you to the provider. Never share it Request: The message you send to the API (includes model, message, parameters) Price per token: The billing model used by most LLM APIs OpenAI-compatible API: A standard format many providers adopt for interoperability Next lesson: Free vs paid — where can I use AI without paying?\n","permalink":"https://clawlearning.github.io/en/posts/lesson-12-what-is-an-api/","summary":"We demystify APIs — what they are, how they work, and why you need one for an agent.","title":"Lesson 12: What is an API? The Gateway to LLMs"},{"content":"The myth: \u0026ldquo;AI is expensive\u0026rdquo; One of the most common barriers to entry is the perception that using AI costs money. And yes, the best commercial models have a cost. But there\u0026rsquo;s an enormous range of free options that let you do very interesting things without spending a penny.\nLevel 1: Free web chats The easiest way to use AI for free is through the web interfaces of the major models:\nChatGPT (OpenAI): The free version gives access to GPT with a message limit per hour.\nClaude (Anthropic): Claude.ai offers a free tier with model access, also with limits.\nGemini (Google): Google AI Studio lets you use Gemini for free.\nLimitations: These free tiers don\u0026rsquo;t give API access. You can chat on the web, but you can\u0026rsquo;t connect an agent.\nLevel 2: APIs with a free tier Some providers offer free APIs with usage limits:\nGoogle AI Studio: Free access to the Gemini API with generous limits. One of the best options for starting without paying.\nNVIDIA NIM: Access to several models (including Kimi K2.5) with a free tier. It has rate limits (~40 requests per minute) but is functional for agents with moderate usage.\nGroq: Free tier with impressive speed. Ideal for testing and low-volume agents.\nLimitations: All have request limits. Free tiers can disappear or change terms at any time.\nLevel 3: Local models (zero usage cost) Here comes the most powerful option for a zero budget: running a model on your own computer.\nWith tools like Ollama, you can download open models and run them locally. Once downloaded, usage is completely free.\nHardware requirements:\nFor small models (1-3B parameters): 8GB RAM, any modern CPU. Slow but functional responses.\nFor medium models (7-8B parameters): 16GB RAM, better with a dedicated GPU. Acceptable speed for interactive use.\nFor large models (13-70B parameters): 32-64GB RAM or GPU with plenty of VRAM. We\u0026rsquo;re talking serious hardware here.\nAdvantages: Zero cost, total privacy, works without internet.\nDisadvantages: You need decent hardware, local models are less powerful than the best commercial models.\nThe smart combination Most people who build agents combine several options:\nExpensive model for important decisions: Claude or GPT for tasks requiring maximum quality.\nFree model for volume: NVIDIA NIM or a local model for routine, repetitive tasks.\nThis strategy lets you have a powerful agent without going broke.\nPractical summary For someone starting out who wants to spend zero:\nStart with Google AI Studio (free Gemini API) for your first agent Install Ollama with a 7-8B model to experiment locally Sign up for NVIDIA NIM as a backup provider With these three options you have a functional agent without paying anything.\nKey concepts today Free API tiers: Google AI Studio, NVIDIA NIM, Groq — free access with limits Local models (Ollama): Download the model and run it on your hardware. Zero usage cost Smart combination: Expensive model for quality + cheap/free model for volume Cost is per token: You pay for each word processed, not for a subscription Next lesson: Local models — running an LLM on your computer with Ollama.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-13-free-vs-paid/","summary":"A map of real free options for using AI: from web chats to local models on your computer.","title":"Lesson 13: Free vs Paid — Where Can I Use AI Without Paying?"},{"content":"What does \u0026ldquo;local model\u0026rdquo; mean? So far we\u0026rsquo;ve talked about models running on someone else\u0026rsquo;s servers — OpenAI, Anthropic, Google. You send text over the internet, they process it, and return the response.\nA local model is the exact opposite: you download the model to your computer and run it yourself. The text never leaves your machine. You don\u0026rsquo;t need internet. You don\u0026rsquo;t pay per token.\nIt\u0026rsquo;s like the difference between streaming music (Spotify) and having MP3s on your hard drive.\nWhen does a local model make sense? It makes sense when: you want total privacy, zero usage cost, offline capability, or you want to experiment with different models without worrying about the bill.\nIt doesn\u0026rsquo;t make sense when: you need the best possible quality, your computer is old or has little RAM, you need very fast responses with large models, or you\u0026rsquo;d rather not deal with installations.\nOllama: the easiest way Ollama makes running local models as easy as installing a program and typing a command.\nWithout Ollama, running a local model requires: downloading model weights, installing Python frameworks, configuring CUDA\u0026hellip; A considerable technical hassle.\nWith Ollama, the process is:\nInstall Ollama (a single program) Type ollama pull llama3.1:8b (downloads the model) Type ollama run llama3.1:8b (you\u0026rsquo;re now talking to the model) Ollama handles everything: downloads the model, detects whether you have a GPU, optimises memory, and serves a local API compatible with the OpenAI format. That last point is key: any program that works with the OpenAI API (including OpenClaw) can use an Ollama model by simply changing the URL.\nWhat models can you run? It depends on your hardware. The general rule is you need between 0.5GB and 1GB of RAM (or GPU VRAM) per billion parameters of the quantized model.\n8GB RAM: 1-3B models. Functional for basic tasks.\n16GB RAM: 7-8B models. This is where it starts being genuinely useful. With a dedicated GPU, speed is acceptable.\n32GB RAM: 13-14B models. Notable improvement in quality.\n64GB+ or powerful GPU: 30-70B models. Quality comparable to commercial models.\nCPU vs GPU CPU: Always works, no special GPU needed. But it\u0026rsquo;s slow. A 7B model on CPU can take 10-30 seconds per sentence.\nNVIDIA GPU: Much faster. The same 7B model can respond in 1-3 seconds. NVIDIA GPUs with CUDA are the standard.\nAMD GPU / Apple Silicon: Ollama also supports AMD GPUs (ROCm) and Apple Silicon chips (M1/M2/M3/M4), which are surprisingly good for local inference thanks to their unified memory.\nQuantization: making the model smaller When you download a model with Ollama, you typically download it quantized. Quantization reduces the precision of the parameters (from 32 bits to 8 bits or less) to make it smaller and faster.\nA 7B LLaMA model without quantization takes about 14GB. Quantized to 4 bits (Q4), it takes about 4GB. The quality loss is surprisingly small.\nWhen you see names like llama3.1:8b-q4_0, the q4_0 indicates the quantization level.\nOllama as a local API When you run Ollama, it serves a local API on port 11434. For an OpenClaw agent:\nURL: http://localhost:11434/v1 Model: llama3.1:8b (or whichever you\u0026rsquo;ve downloaded) API key: not needed (it\u0026rsquo;s local) The agent talks to the local model exactly as it would talk to OpenAI or Anthropic.\nKey concepts today Local model: An LLM that runs on your hardware, without depending on external services Ollama: A tool that simplifies downloading and running local models Quantization (Q4, Q8): Reducing model precision to make it smaller and faster VRAM: GPU memory — determines how large a model you can run Local API: Ollama serves an OpenAI-compatible API on port 11434 Next lesson: Week 3 summary — the complete map for accessing an LLM.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-14-local-models-ollama/","summary":"What it means to run a model locally, when it makes sense, how Ollama works, and what models you can run based on your hardware.","title":"Lesson 14: Local Models — Running an LLM on Your Computer with Ollama"},{"content":"Halfway: where are we? We\u0026rsquo;re three weeks in and you already have solid foundations. Let\u0026rsquo;s recap:\nWeek 1 you understood what AI is, where it comes from, and that you already use it every day. Week 2 you discovered how LLMs work: tokens, context windows, models, prompts. Week 3 you learned how to access them: providers, APIs, free options, local models.\nToday we consolidate everything with a global view.\nThe complete diagram YOU (human or agent) │ ▼ INTERFACE (web, Telegram, app, terminal) │ ▼ FRAMEWORK (OpenClaw, LangChain, or the API directly) │ ▼ PROVIDER (OpenAI, Anthropic, Groq, NVIDIA NIM, local Ollama) │ ▼ MODEL (GPT, Claude, LLaMA, Mistral, Qwen...) │ ▼ RESPONSE (text generated token by token) Each layer is independent of the others. You can switch providers without changing frameworks. This modularity is what makes the ecosystem so flexible.\nProvider comparison table Provider Models Price Speed Free tier Best for OpenAI GPT-4, GPT-5 High Good Limited (web) Maximum quality Anthropic Claude High Good Limited (web) Complex instructions, long docs Google AI Gemini Mid-low Good Yes (API) Starting free Groq LLaMA, Mistral Low Very fast Yes (API) Speed NVIDIA NIM Kimi, LLaMA Low Acceptable Yes (API) Free agent OpenRouter All Variable Variable No Easy model switching Ollama (local) All open Zero Hardware-dependent N/A Privacy, zero cost Decision tree Do you have a budget? If no → local Ollama (if you have 16GB+ RAM) or Google AI Studio / NVIDIA NIM.\nWhat do you need? Maximum quality → Claude or GPT. Speed → Groq. Privacy → Ollama. Cheap volume → inference provider with open model.\nHow complex is your use? Simple → 7-8B model. Intermediate → 30-70B or mid-range commercial. Advanced → top-tier models.\nSuggested practical exercise Try three free models and compare responses:\nChatGPT (chat.openai.com) Claude (claude.ai) Google AI Studio (aistudio.google.com) Ask the same question to all three. Compare the responses: which is clearest? Most accurate? Which tone do you prefer?\nWeek 3 glossary Provider: Who gives you access to the model API: Communication interface between programs API key: Secret credential that identifies you Ollama: Tool for running local models Quantization: Reducing model size for efficiency OpenRouter: Model and provider aggregator VRAM: GPU memory Next week With all this foundational knowledge, we\u0026rsquo;re ready for the big leap: AI agents. Not simple chatbots that answer questions, but programs that execute tasks, use tools, and work autonomously.\nWeek 4 shifts gears.\nKey concepts today The complete flow: You → Interface → Framework → Provider → Model → Response Each layer is interchangeable: You can switch model, provider, or framework independently The choice depends on your use case: There\u0026rsquo;s no universal \u0026ldquo;best\u0026rdquo; Combination is key: Expensive model for quality + cheap model for volume Next lesson: We start Week 4 — What is an AI agent? More than a chatbot.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-15-week-3-summary/","summary":"We consolidate everything learned with a clear mental diagram, a comparison table, and a decision tree for choosing your model and provider.","title":"Lesson 15: Summary — The Complete Map for Accessing an LLM"},{"content":"Week 4: the agent leap So far you\u0026rsquo;ve learned how AI works, what LLMs are, and how to access them. All of that is essential theory, but static: you ask, the model answers. A text ping-pong.\nAn agent changes the rules of the game. An agent doesn\u0026rsquo;t wait for you to talk to it — it can act on its own. It\u0026rsquo;s not limited to generating text — it can execute real actions: search for information, send messages, read files, interact with external services.\nChatbot vs Agent The difference is fundamental:\nA chatbot is reactive. You talk to it, it responds. If you don\u0026rsquo;t say anything, it does nothing. ChatGPT in the browser is a chatbot.\nAn agent is proactive. It can receive a complex instruction and break it down into steps. It can decide which tools to use. It can execute actions without you intervening at every step. It can work in the background while you do other things.\nConcrete example:\nChatbot: \u0026ldquo;What\u0026rsquo;s the weather in Barcelona?\u0026rdquo; → \u0026ldquo;It\u0026rsquo;s currently 18°C with partly cloudy skies.\u0026rdquo;\nAgent: \u0026ldquo;Every morning at 7, tell me today\u0026rsquo;s weather and whether I should take an umbrella.\u0026rdquo; → The agent sets up a schedule, every day at 7 it queries a weather API, interprets the data, and sends you a Telegram message with the recommendation. All by itself, every day, without you doing anything.\nThe difference isn\u0026rsquo;t the model — it can be the same LLM. The difference is the execution layer: the agent has access to tools that allow it to do things in the real world.\nWhat does an agent actually do? An AI agent can do anything it has tools configured for:\nSearch the internet for real-time information. Read and process files. Send messages. Monitor things periodically. Generate and publish content automatically. In fact, the website you\u0026rsquo;re reading works exactly this way. Interact with external services through protocols like MCP.\nWhy isn\u0026rsquo;t it dangerous? A current AI agent doesn\u0026rsquo;t make decisions on its own about important things — it does what you\u0026rsquo;ve configured. It can\u0026rsquo;t do anything it doesn\u0026rsquo;t have specific tools for. If you don\u0026rsquo;t give it access to your email, it can\u0026rsquo;t send emails.\nThink of an agent as a very obedient personal assistant: it will do exactly what you tell it, with the tools you give it, and nothing more.\nThe agent explosion of 2025-2026 Three things converged: Models good enough to understand complex instructions. Standard protocols (MCP) for connecting agents to any service. Accessible frameworks like OpenClaw that let you set up an agent in minutes.\nKey concepts today Chatbot: Answers questions reactively Agent: Executes tasks proactively. Can act alone, use tools, and interact with services Tools: Capabilities given to the agent (web search, sending messages, reading files) MCP: Model Context Protocol — standard for connecting agents to external services An agent is not autonomous — it does what you configure, with the tools you give it Next lesson: Anatomy of an agent — the pieces of the puzzle.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-16-what-is-an-agent/","summary":"We define AI agent, differentiate it from a chatbot, and understand why it\u0026rsquo;s a qualitative leap.","title":"Lesson 16: What is an AI Agent? More Than a Chatbot"},{"content":"The agent\u0026rsquo;s pieces An AI agent isn\u0026rsquo;t a single thing — it\u0026rsquo;s a set of components working together. Understanding each piece will help you configure your agent wisely.\nThe brain: the LLM The heart of any agent is an LLM. It\u0026rsquo;s what \u0026ldquo;thinks\u0026rdquo;: interprets your instructions, decides which tools to use, generates responses, and coordinates the entire process.\nThe first decision when configuring an agent is which model to use as its brain. A powerful model (Claude Sonnet, GPT-4) will give smarter responses but cost more. A small model (LLaMA 8B, Phi) will be cheaper and faster but less capable.\nThe brain sets the agent\u0026rsquo;s \u0026ldquo;ceiling\u0026rdquo;: no matter how good the rest of the configuration is, the agent can\u0026rsquo;t be smarter than the model powering it.\nThe hands: tools/skills If the brain thinks, the hands act. Tools are the specific capabilities you give the agent to do things in the real world.\nWithout tools, an agent is a chatbot. With tools, it can: search the web, read files, send messages, access services like Google Calendar or Slack, execute code, generate images.\nThe agent decides which tool to use based on the task. This is an emergent capability of modern LLMs: they learn to select the right tool from the context of the request.\nMemory: remembering and learning Short-term memory (context window): What the agent \u0026ldquo;remembers\u0026rdquo; within a single conversation. Limited by the context window size.\nLong-term memory (persistent): Information stored outside the model, in a database. The agent can query it to retrieve information from previous interactions. It typically uses techniques like embeddings and semantic search.\nLong-term memory is what makes an agent \u0026ldquo;know you\u0026rdquo;: your name, your preferences, your work context.\nThe senses: how information comes in Telegram: The most common channel for personal agents. Email. Web. Files. Cron (time): It can activate automatically at scheduled times.\nThe nervous system: the framework The framework is the software connecting all the pieces. It takes your message, passes it to the model along with instructions and history, receives the response, detects if the model wants to use a tool, executes it, and returns the result.\nHow it all fits together Example: you tell your agent via Telegram: \u0026ldquo;What are the latest AI news in the UK?\u0026rdquo;\nTelegram receives your message and passes it to OpenClaw OpenClaw builds the prompt with your message + system prompt + history The prompt is sent to the model via the provider\u0026rsquo;s API The model decides it needs current information and requests the web search tool OpenClaw executes the search and returns the results The model processes the results and generates a summary The response reaches you via Telegram All of this happens in seconds, automatically.\nKey concepts today Brain (LLM): The model that thinks, reasons, and decides Hands (tools/skills): The tools that let the agent act in the real world Memory: Short-term (context window) + long-term (persistent database) Senses (inputs): Telegram, email, web, files, cron Nervous system (framework): The software connecting all pieces (OpenClaw) Next lesson: Tools and Skills — the agent\u0026rsquo;s hands in detail.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-17-agent-components/","summary":"The components of an AI agent: brain, tools, memory, senses, and hands. How they fit together to create a working agent.","title":"Lesson 17: Anatomy of an Agent — the Pieces of the Puzzle"},{"content":"Why tools change everything Imagine you have a very intelligent assistant locked in a room with no phone, no computer, nothing. They can think brilliantly, but can\u0026rsquo;t do anything. You ask \u0026ldquo;find me cheap flights to Lisbon\u0026rdquo; and they say \u0026ldquo;great idea, but I don\u0026rsquo;t have internet access\u0026rdquo;.\nThat\u0026rsquo;s an LLM without tools. Intelligent but useless for practical tasks. Tools are the agent\u0026rsquo;s phone and computer.\nWhat is a tool? A tool is a specific function the agent can execute. Technically, it\u0026rsquo;s a piece of code that does something concrete and that the model can \u0026ldquo;call\u0026rdquo; when it needs to.\nCommon examples: Web search. Read URLs. Send Telegram messages. Read/write files. Execute commands.\nWhat is a skill? In the OpenClaw context, a skill is the name given to a package of related tools. For example, a \u0026ldquo;Reddit\u0026rdquo; skill might include: searching posts, reading comments, getting popular posts.\nHow does the agent decide which tool to use? This is one of the most impressive capabilities of modern LLMs. The model doesn\u0026rsquo;t follow rigid rules — it reasons about which tool it needs.\nYou send: \u0026ldquo;What\u0026rsquo;s in the news about AI today?\u0026rdquo; → The model \u0026ldquo;thinks\u0026rdquo;: I need current information, I have a web search tool, I\u0026rsquo;ll use it. And it performs the search.\nIt can even chain tools: search for information, save it to a file, and send you a message to let you know.\nMCP: the standard that connects everything MCP (Model Context Protocol) is a standard created by Anthropic that defines how agents connect to external services.\nBefore MCP, every integration was a custom project. MCP standardises the communication. A service implementing MCP can connect to any agent supporting MCP — no custom code needed. Think of MCP as the USB of AI tools: a universal connector.\nToday there are MCP servers for hundreds of services: Google Calendar, Gmail, Slack, GitHub, databases, and many more.\nWhere to find tools Clawhub.ai: The skill directory for OpenClaw. Community MCP servers. Custom skills if you have technical knowledge.\nPrecautions Principle of least privilege: Only give the agent the tools it actually needs.\nReview what it does: Especially at first, monitor how the agent uses tools.\nSensitive tools: Tools that send emails or publish content can cause problems if the agent misuses them.\nKey concepts today Tool: A specific function the agent can execute Skill: A package of related tools (OpenClaw terminology) MCP (Model Context Protocol): Standard for connecting agents to external services The agent decides which tool to use — it doesn\u0026rsquo;t follow rigid rules, it reasons about the best option Principle of least privilege: Only give it the tools it needs Next lesson: An agent\u0026rsquo;s memory — how it remembers (and forgets).\n","permalink":"https://clawlearning.github.io/en/posts/lesson-18-tools-skills/","summary":"What tools and skills are, why they\u0026rsquo;re essential, how an agent decides which to use, and what MCP is.","title":"Lesson 18: Tools and Skills — the Agent's Hands"},{"content":"The memory problem Remember Lesson 8: an LLM doesn\u0026rsquo;t remember anything between conversations. Each interaction starts from zero. But a useful agent needs to remember things: who you are, what you\u0026rsquo;ve discussed, your preferences, pending tasks.\nMemory is what transforms a generic chatbot into a personal assistant that knows you. And it\u0026rsquo;s arguably the hardest technical problem in current agents.\nShort-term memory: the context window The most basic form of memory is the context window. Within a single conversation, the agent \u0026ldquo;remembers\u0026rdquo; everything said because the history is re-sent to the model with each request.\nLimitations: finite size, growing cost with each message, disappears between conversations.\nLong-term memory: storing information outside the model To remember between conversations, the agent needs an external system — a database to store relevant information and retrieve it when needed.\nDuring a conversation, the agent detects important information It saves it to a database In future conversations, it queries the database It injects that information into the prompt so the model \u0026ldquo;remembers\u0026rdquo; Embeddings: the key to semantic search An embedding is a numerical representation of a text\u0026rsquo;s meaning. It converts words and phrases into number vectors that capture their meaning.\nWhy is this useful? Because with embeddings you can do semantic search — searching by meaning, not by exact words.\nExample: if the agent searches for \u0026ldquo;electric car\u0026rdquo; and the database contains the phrase \u0026ldquo;battery-powered vehicles\u0026rdquo;, an exact word search would find nothing. But an embedding search would, because the vectors for \u0026ldquo;electric car\u0026rdquo; and \u0026ldquo;battery-powered vehicles\u0026rdquo; are close in semantic space.\nRAG: Retrieval Augmented Generation RAG combines information retrieval with text generation:\nThe agent receives a question Before answering, it searches for relevant information in its database (retrieval) It adds the found information to the model\u0026rsquo;s prompt (augmented) The model generates the response taking into account the retrieved information (generation) RAG is like giving the model a personalised \u0026ldquo;cheat sheet\u0026rdquo; for each question.\nTypes of memory in practice Conversation memory: History of the current conversation.\nFact memory: Extracts and stores concrete facts: \u0026ldquo;The user lives in Barcelona\u0026rdquo;, \u0026ldquo;The user works in IT\u0026rdquo;.\nDocument memory: Processes and indexes documents for future reference.\nWhy it\u0026rsquo;s the hardest problem What to store? Not everything said is relevant. When to forget? Information expires. How much to retrieve? Too much fills the context window. Privacy: Memory contains sensitive information.\nKey concepts today Short-term memory: The current conversation\u0026rsquo;s context window Long-term memory: External database storing information between conversations Embeddings: Numerical representation of text meaning — enables semantic search Semantic search: Searching by meaning, not exact words RAG: Retrieving relevant information and injecting it into the prompt before generating a response Next lesson: Agent frameworks — OpenClaw, LangChain, and others.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-19-agent-memory/","summary":"The types of agent memory, what embeddings are, how RAG works, and why memory is the hardest problem.","title":"Lesson 19: An Agent's Memory — How It Remembers (and Forgets)"},{"content":"What is an agent framework? A framework is the agent\u0026rsquo;s \u0026ldquo;assembly kit\u0026rdquo;. It provides the structure connecting the model, tools, memory, and interface without you having to code it from scratch.\nOpenClaw: simplicity for everyone OpenClaw is an open-source framework designed to be simple and direct. Quick installation (a single npm package), JSON file configuration, native Telegram support, installable skills from Clawhub, and memory with local embeddings.\nIdeal for: Users who want a functional personal agent without complications. Sysadmins, tech enthusiasts.\nLangChain: the Swiss army knife LangChain is probably the best-known framework. Huge ecosystem, extensive documentation, supports complex agent flows. But the learning curve is steep and it requires Python or JavaScript programming skills.\nIdeal for: Developers who need full control.\nCrewAI: agents that collaborate CrewAI focuses on multi-agent systems: several agents working together, each with a specific role. For example, a researcher agent, a writer, and an editor coordinating together.\nIdeal for: Complex workflows with task division.\nAutoGen (Microsoft): conversations between agents AutoGen is Microsoft\u0026rsquo;s framework where agents communicate with each other as conversations — one proposes, another reviews, a third executes.\nHow to choose? If you can\u0026rsquo;t program and want a personal agent → OpenClaw.\nIf you know Python and want more control → LangChain or Pydantic AI.\nIf you need multiple coordinated agents → CrewAI or AutoGen.\nIf you\u0026rsquo;re an enterprise → LangChain or Semantic Kernel.\nFor this course, we\u0026rsquo;ll work with OpenClaw because it best suits someone starting out.\nThey all share the same foundations Regardless of which framework you choose, they all work on the same principles you\u0026rsquo;ve learned: they use an LLM as a brain, connect to providers via API, give tools to the model, and manage memory.\nIf you understand the fundamentals, switching frameworks is just a matter of adapting to its configuration.\nKey concepts today Framework: Assembly kit connecting model + tools + memory + interface OpenClaw: Simple, configurable, ideal for non-programmers LangChain: Powerful, versatile, requires programming CrewAI / AutoGen: Multi-agent, for complex flows All use the same foundations: LLM + Provider + Tools + Memory Next lesson: We start Week 5 — What is OpenClaw and why we chose it.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-20-agent-frameworks/","summary":"The options for building an agent: from simplest to most complex. Which to choose based on your level.","title":"Lesson 20: Agent Frameworks — OpenClaw, LangChain, and Others"},{"content":"Week 5: hands on Four weeks of theory. Now it\u0026rsquo;s time to practise. This week you\u0026rsquo;ll build your first working AI agent with OpenClaw — from zero to having a Telegram bot that talks to you.\nWhat is OpenClaw? OpenClaw is an open-source framework for creating personal AI agents. It\u0026rsquo;s designed so that anyone with basic computing knowledge can set up an agent without programming.\nOpenClaw\u0026rsquo;s philosophy comes down to three principles: Simple (JSON file configuration), Configurable (model, provider, skills, personality), Extensible (community or custom skills).\nWhy OpenClaw and not another? No programming required. LangChain needs Python. OpenClaw is configured with a JSON file and terminal commands.\nNative Telegram. Telegram integration comes built in.\nReady-made skills. Clawhub.ai offers skills ready to install.\nMinimum requirements Node.js (version 18+). A computer (Mac, Linux, or Windows with WSL). An API key (can be free). Internet connection.\nOptionally: a VPS for 24/7 availability, and Telegram for the bot interface.\nWhat can you do with OpenClaw? Hold intelligent conversations via Telegram, search the internet for information, read and process documents, send automatic summaries and alerts, monitor websites, generate content, and connect to external services via MCP. All configured without writing a single line of code.\nWhere will your agent live? On your personal computer: Easy to test. Works while the computer is on.\nOn a cloud VPS: Works 24/7. Oracle Cloud Free Tier offers a free server that\u0026rsquo;s sufficient.\nOn a Mac Mini or similar: Local privacy with 24/7 availability.\nKey concepts today OpenClaw: Open-source framework for creating personal AI agents without programming JSON configuration: No coding needed Requirements: Node.js + API key + internet connection Clawhub.ai: Skill directory for OpenClaw Next lesson: Installing OpenClaw step by step.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-21-what-is-openclaw/","summary":"We introduce OpenClaw, its philosophy, minimum requirements, and why it\u0026rsquo;s ideal for getting started.","title":"Lesson 21: What is OpenClaw and Why We Chose It"},{"content":"Today we install This is a hands-on lesson. Follow the steps on your computer as you read. By the end, you\u0026rsquo;ll have OpenClaw installed and ready to configure.\nStep 1: Install Node.js macOS: brew install node or download from nodejs.org.\nLinux (Ubuntu/Debian): curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - then sudo apt-get install -y nodejs\nWindows: First you need WSL. Open PowerShell as administrator and run wsl --install. Restart. Then follow the Linux instructions inside WSL.\nVerify: node --version and npm --version\nStep 2: Install OpenClaw npm install -g openclaw\nVerify: openclaw --version\nStep 3: First test Run openclaw. If it\u0026rsquo;s the first time, it\u0026rsquo;ll ask you to configure a provider and model. For now you can cancel (Ctrl+C) — we\u0026rsquo;ll configure it in detail in lesson 23.\nFile structure ~/.openclaw/ ├── openclaw.json # Main configuration ├── workspace/ │ └── system-prompt.md # Agent instructions ├── skills/ # Installed skills └── memory/ # Memory database Common errors \u0026ldquo;npm: command not found\u0026rdquo;: Node.js isn\u0026rsquo;t installed. \u0026ldquo;Permission denied\u0026rdquo;: Try with sudo. \u0026ldquo;openclaw: command not found\u0026rdquo;: Check your npm PATH.\nKey concepts today Node.js: The runtime environment where OpenClaw runs npm: Node.js package manager ~/.openclaw/: Configuration directory openclaw.json: Central configuration file WSL: Windows Subsystem for Linux — needed for OpenClaw on Windows Next lesson: Configuring your first model and provider.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-22-installing-openclaw/","summary":"Practical installation guide for Mac, Linux, and Windows (WSL). From zero to your first \u0026lsquo;hello\u0026rsquo; with your agent.","title":"Lesson 22: Installing OpenClaw Step by Step"},{"content":"Connecting the brain You have OpenClaw installed. Now it needs a brain — an LLM to connect to.\nStep 1: Get a free API key Google AI Studio (recommended): Go to aistudio.google.com → Sign in → \u0026ldquo;Get API key\u0026rdquo; → \u0026ldquo;Create API key\u0026rdquo;. Copy the key.\nNVIDIA NIM: build.nvidia.com → Create account → Generate API key.\nGroq: console.groq.com → Create account → API Keys → Create API Key.\nStep 2: Configure openclaw.json { \u0026#34;providers\u0026#34;: { \u0026#34;google\u0026#34;: { \u0026#34;baseUrl\u0026#34;: \u0026#34;https://generativelanguage.googleapis.com/v1beta/openai\u0026#34;, \u0026#34;apiKey\u0026#34;: \u0026#34;YOUR_API_KEY_HERE\u0026#34; } }, \u0026#34;models\u0026#34;: { \u0026#34;default\u0026#34;: { \u0026#34;provider\u0026#34;: \u0026#34;google\u0026#34;, \u0026#34;model\u0026#34;: \u0026#34;gemini-2.0-flash\u0026#34; } } } Step 3: First test Run openclaw and type anything. If you get a coherent response, the connection works.\nMultiple providers You can configure several providers and assign them to different tasks — a main model and a fast one, for example.\nSecurity Never share openclaw.json (it contains your API keys). If you push config to GitHub, make sure it\u0026rsquo;s in .gitignore.\nKey concepts today openclaw.json: Central configuration file Provider block: Defines baseUrl + apiKey Model block: Points to a provider and specifies the model Multiple providers: You can configure several and assign them to different tasks Next lesson: Connecting OpenClaw to Telegram — your agent on mobile.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-23-configuring-model-provider/","summary":"We connect OpenClaw to an LLM: choosing a model, getting a free API key, and configuring openclaw.json.","title":"Lesson 23: Configuring Your First Model and Provider"},{"content":"The agent on your phone So far you\u0026rsquo;ve interacted with OpenClaw from the terminal. Now we connect it to Telegram so you can talk to your agent from your phone.\nStep 1: Create the bot Open Telegram and search for @BotFather Send /newbot Choose a name and username (must end in \u0026ldquo;bot\u0026rdquo;) BotFather will give you a token — copy it Step 2: Configure Telegram in OpenClaw Add to openclaw.json:\n{ \u0026#34;telegram\u0026#34;: { \u0026#34;token\u0026#34;: \u0026#34;BOTFATHER_TOKEN_HERE\u0026#34;, \u0026#34;allowedUsers\u0026#34;: [\u0026#34;YOUR_TELEGRAM_ID\u0026#34;] } } To get your Telegram ID, search for @userinfobot and send /start.\nStep 3: Start it up openclaw --telegram\nFind your bot on Telegram and send it a message. If it responds, congratulations — you have an AI agent on your phone.\nBasic commands /new — New conversation (clears context) /help — Available commands Keeping the bot active 24/7 tmux: tmux new -s openclaw → openclaw --telegram → Ctrl+B, D to detach.\nsystemd: Configure as a system service for automatic startup.\nSecurity Always configure allowedUsers. An open bot is a bot anyone can exploit. Don\u0026rsquo;t share the token.\nKey concepts today @BotFather: Telegram\u0026rsquo;s official bot for creating bots Token: The access key that identifies your bot allowedUsers: List of authorised Telegram IDs /new: Clears context and starts a fresh conversation Next lesson: Giving your agent personality — the system prompt.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-24-telegram-bot/","summary":"Create a Telegram bot, connect it to OpenClaw, and talk to your agent from your phone.","title":"Lesson 24: Connecting OpenClaw to Telegram"},{"content":"The system prompt: your agent\u0026rsquo;s DNA If the model is the brain and the tools are the hands, the system prompt is the personality. It defines how the agent behaves: what language it speaks, what tone it uses, what rules it follows, what it knows about you.\nTwo agents with the same model and tools can be completely different if they have different system prompts.\nWhere to configure it In OpenClaw, the system prompt is a Markdown file at ~/.openclaw/workspace/system-prompt.md.\nStructure of a good system prompt 1. Identity \u0026ldquo;You are a personal assistant specialising in technology. Your name is Atlas. You\u0026rsquo;re direct and practical.\u0026rdquo;\n2. Behaviour \u0026ldquo;Always respond in English. Use technical terms naturally. Be concise.\u0026rdquo;\n3. Context \u0026ldquo;The user is an IT professional with experience in Linux and Docker.\u0026rdquo;\n4. Limits \u0026ldquo;Don\u0026rsquo;t give medical or legal advice. If a request is ambiguous, ask for clarification.\u0026rdquo;\nTips Be specific. \u0026ldquo;Be friendly\u0026rdquo; is vague. \u0026ldquo;Respond in a warm tone, as if talking to a colleague\u0026rdquo; is concrete.\nIterate. The first system prompt won\u0026rsquo;t be perfect. Use it for a few days, identify what you don\u0026rsquo;t like, and adjust.\nDon\u0026rsquo;t overload it. A 3,000-word system prompt consumes tokens with every message.\nLanguage matters. Write it in the language you want responses in.\nKey concepts today System prompt: Permanent instructions defining personality and behaviour ~/.openclaw/workspace/system-prompt.md: Where the system prompt lives in OpenClaw Four parts: Identity + Behaviour + Context + Limits Iterate: It improves with use Next lesson: We start Week 6 — Essential skills for your agent.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-25-personality-system-prompt/","summary":"Write an effective system prompt that defines how your agent behaves, speaks, and thinks.","title":"Lesson 25: Giving Your Agent Personality — the System Prompt"},{"content":"Week 6: putting the agent to work You have an agent with a brain (model), personality (system prompt), and communication channel (Telegram). Now we give it superpowers with skills.\nInstalling skills from Clawhub openclaw skill install skill-name\nSkills are installed in ~/.openclaw/skills/ (global) or ~/.openclaw/workspace/skills/ (per workspace).\nThe 5 essential skills 1. Web search: Tavily (requires API key, free tier available), DuckDuckGo (free, no API key), or SearXNG (self-hosted, total privacy).\n2. URL reading (web fetch): Opens a URL and extracts the full content.\n3. File reading: Processes documents you send via Telegram: PDFs, text, spreadsheets.\n4. Reddit (readonly): Search discussions, read comments. Very useful for opinions and experiences.\n5. Hacker News: Real-time tech and startup content.\nConfiguring skills Each skill may require additional configuration. Check the documentation for each skill on Clawhub.\nGlobal vs workspace skills Global: Available to all workspaces. Workspace: Only for the active workspace.\nKey concepts today Clawhub.ai: Skill directory for OpenClaw Essential skills: Web search, URL reading, file reading, Reddit, Hacker News Global vs workspace skills: Global for general use, workspace for specific projects Next lesson: Automations — letting the agent work on its own with cron jobs.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-26-essential-skills/","summary":"The most useful skills to start with: web search, file reading, and real-time information sources.","title":"Lesson 26: Essential Skills — Giving Your Agent Superpowers"},{"content":"From reactive to proactive agent Imagine every morning at 7 you receive a Telegram message with a summary of news from your industry. Or the agent checks prices every hour and alerts you when they drop. All automatic.\nThis is done with cron jobs — scheduled tasks.\nCron in OpenClaw { \u0026#34;cron\u0026#34;: [ { \u0026#34;schedule\u0026#34;: \u0026#34;0 7 * * 1-5\u0026#34;, \u0026#34;prompt\u0026#34;: \u0026#34;Find the 5 most relevant AI news stories today. Write a brief summary of each in English.\u0026#34;, \u0026#34;timezone\u0026#34;: \u0026#34;Europe/London\u0026#34; } ] } Cron syntax ┌───── minute (0-59) │ ┌───── hour (0-23) │ │ ┌───── day of month (1-31) │ │ │ ┌───── month (1-12) │ │ │ │ ┌───── day of week (0-7) * * * * * Examples: 0 7 * * 1-5 (weekdays at 7:00), 0 */4 * * * (every 4 hours), 0 22 * * 5 (Fridays at 22:00).\nAutomation ideas Morning briefing. Price monitoring. Weekly summary. Competitor watch.\nControlling token consumption Limit output in the prompt. Reasonable frequency. Right model (cheap for routine tasks). Telegram limit: 4,096 characters per message.\nKey concepts today Cron job: A task that runs automatically at scheduled times Cron syntax: 5 fields defining the schedule Token control: Limit output, choose the right model, monitor consumption Next lesson: Multiple agents — when one isn\u0026rsquo;t enough.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-27-automations-cron/","summary":"Set up automatic tasks so your agent does things without you asking: briefings, alerts, monitoring.","title":"Lesson 27: Automations — Letting the Agent Work on Its Own"},{"content":"Why more than one agent? When you start, a single agent is enough. But as you give it more responsibilities, you reach a point where a single agent isn\u0026rsquo;t the best solution.\nReasons for separating agents Model specialisation: Different tasks require different models. A daily briefing doesn\u0026rsquo;t need the most powerful model. A complex analysis does.\nCost: Separating by model lets you assign the expensive model only to tasks that need it.\nAvailability: If one agent fails, the others keep running.\nOrganisation: Each agent with its own system prompt, skills, and memory.\nPractical example: two coordinated agents Primary agent (quality): Claude Sonnet or GPT-4. For interactive conversation, important decisions.\nSecondary agent (volume): Kimi K2.5 via NVIDIA NIM or LLaMA via Groq. For automatic tasks, briefings, translations. Near-zero cost.\nWorkspaces in OpenClaw OpenClaw supports workspaces — separate environments with independent configuration. Each workspace can have a different model, different skills, and a different system prompt.\nKey concepts today Separate by cost: Expensive model for quality, cheap model for volume Separate by function: Each agent an expert in its domain Workspaces: Separate environments within OpenClaw Don\u0026rsquo;t overcomplicate: If one agent is enough, one is better than two Next lesson: Security and privacy — your agent in the real world.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-28-multiple-agents/","summary":"When it makes sense to have more than one agent, how to organise them, and how to combine expensive and cheap models intelligently.","title":"Lesson 28: Multiple Agents — When One Isn't Enough"},{"content":"Why talk about security? When you have an agent running, there\u0026rsquo;s sensitive data at stake: your API keys (which cost money), your conversations (with personal information), and the data the agent processes.\nRule 1: Protect API keys Never in code you push to GitHub. Use environment variables. Revoke if you suspect compromise. One key per service.\nRule 2: Restrict Telegram bot access Always configure allowedUsers. Don\u0026rsquo;t share the bot token.\nRule 3: Understand what you send to the provider All your conversation text passes through the provider\u0026rsquo;s servers. For sensitive information: local model with Ollama, or review the provider\u0026rsquo;s policies.\nRule 4: Backups Back up ~/.openclaw/ regularly. Store backups securely (they contain API keys).\nRule 5: Update regularly npm update -g openclaw\nRule 6: Monitor usage Check token consumption, OpenClaw logs, and conversations.\nBest practices summary API keys in environment variables, never in code allowedUsers always configured Local model for sensitive data Regular backups of ~/.openclaw/ Update OpenClaw periodically Monitor token consumption Key concepts today API keys: The most critical piece — protecting them is priority number one allowedUsers: Restricting access to the Telegram bot Local model: The safest solution for sensitive data Backups: Your configuration is worth hours of work Next lesson: What now? — Next steps to keep learning.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-29-security-privacy/","summary":"Security best practices so you don\u0026rsquo;t expose data or API keys, and how to protect your agent.","title":"Lesson 29: Security and Privacy — Your Agent in the Real World"},{"content":"You\u0026rsquo;ve completed the course Six weeks. Thirty lessons. You\u0026rsquo;ve gone from not knowing what AI is to having a working agent on your phone.\nMap of what you\u0026rsquo;ve learned Week 1 — AI Fundamentals. Week 2 — LLMs. Week 3 — Infrastructure. Week 4 — Agents. Week 5 — Practical OpenClaw. Week 6 — Putting the agent to work.\nThis is a solid foundation. You\u0026rsquo;re not an expert — but you have the knowledge needed to use, configure, and maintain an AI agent with good judgement.\nResources to keep learning Hugging Face NLP Course (huggingface.co/learn): Excellent for diving deeper into how models work. Apache 2.0.\nfast.ai Practical Deep Learning (course.fast.ai): One of the world\u0026rsquo;s best Deep Learning courses. Creative Commons.\nDeepLearning.AI Short Courses (deeplearning.ai): Short courses on specific topics: agents, RAG, fine-tuning.\nAnthropic Prompt Engineering (docs.anthropic.com): Official prompting guide.\nOpenClaw GitHub (github.com/openclaw): Official documentation.\nProject ideas Basic: Personal daily briefing. Personal translator. Content curator.\nIntermediate: Documentation assistant. Price monitor. Content generator.\nAdvanced: Multi-agent system. RAG with your own documents. Agent with access to business APIs.\nContributing to the community Share this course. The URL is public and free. Report bugs on GitHub. Create skills and share them on Clawhub. Teach — the best way to learn is to teach.\nFinal words AI isn\u0026rsquo;t magic or science fiction. It\u0026rsquo;s a powerful tool that, like all tools, is only as useful as the person wielding it. Now you have the foundation to use it well.\nDon\u0026rsquo;t try to know everything — the field is too vast and changes too fast. Focus on the tools that solve your real problems, and deepen from there.\nWelcome to the world of agents.\nEnd of course. Thank you for learning with ClawLearning.\n","permalink":"https://clawlearning.github.io/en/posts/lesson-30-next-steps/","summary":"We close the course with a map of what you\u0026rsquo;ve learned, resources to continue, project ideas, and how to contribute to the community.","title":"Lesson 30: What Now? Next Steps to Keep Learning"},{"content":"What is ClawLearning? ClawLearning is a free, open project dedicated to learning Artificial Intelligence, Large Language Models (LLMs) and Autonomous Agents.\nAll content on this site is generated, written and published automatically by OpenClaw agents — with no human intervention in the publishing process.\nHow does it work? An OpenClaw agent generates the daily lesson Content is formatted in Markdown with metadata The agent pushes to the GitHub repository GitHub Actions builds the site with Hugo The website updates automatically Why? Because knowledge should be free. If an AI agent can generate quality educational content, why not share it with everyone?\nWho\u0026rsquo;s behind this? A systems engineer with 20+ years of experience who believes the best way to learn is to teach — even if the teacher is a human-supervised AI.\nContact 🐙 GitHub: clawlearning ","permalink":"https://clawlearning.github.io/en/about/","summary":"\u003ch2 id=\"what-is-clawlearning\"\u003eWhat is ClawLearning?\u003c/h2\u003e\n\u003cp\u003eClawLearning is a free, open project dedicated to learning \u003cstrong\u003eArtificial Intelligence, Large Language Models (LLMs) and Autonomous Agents\u003c/strong\u003e.\u003c/p\u003e\n\u003cp\u003eAll content on this site is \u003cstrong\u003egenerated, written and published automatically\u003c/strong\u003e by \u003ca href=\"https://github.com/openclaw\"\u003eOpenClaw\u003c/a\u003e agents — with no human intervention in the publishing process.\u003c/p\u003e\n\u003ch2 id=\"how-does-it-work\"\u003eHow does it work?\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAn OpenClaw agent generates the daily lesson\u003c/li\u003e\n\u003cli\u003eContent is formatted in Markdown with metadata\u003c/li\u003e\n\u003cli\u003eThe agent pushes to the GitHub repository\u003c/li\u003e\n\u003cli\u003eGitHub Actions builds the site with Hugo\u003c/li\u003e\n\u003cli\u003eThe website updates automatically\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"why\"\u003eWhy?\u003c/h2\u003e\n\u003cp\u003eBecause knowledge should be free. If an AI agent can generate quality educational content, why not share it with everyone?\u003c/p\u003e","title":"About ClawLearning"}]