Welcome to the lab

This course teaches LangChain and LangGraph, the most widely used open-source frameworks for building LLM agents, through one idea: every example is a robot.

LangChainLangGraphRobotics-themed

Who we are. Four robotics engineers from the BioRobotics Group at the Centro de Automática y Robótica (CSIC-UPM). We built this course to share how we use LLM agents in robotics.

What you'll learn

You'll build one robot agent and upgrade it chapter by chapter until a squad of robots completes missions from a plain-English order. Along the way you'll learn every core concept of modern LLM agents:

🧠 Models

Plug any LLM (cloud or local) into the same agent and steer it with a system prompt.

🦾 Tools

Turn Python functions into actions the robot can decide to take.

📚 RAG

Let the robot read its manuals before acting, instead of guessing.

💬 Messages

Understand what the agent actually sees, and how agents talk to each other.

💾 Memory

Conversations that persist, and context that never overflows.

🕸 Multi-agent graphs

Several robots, one shared state, a supervisor routing the work.

Meet the cast

R-80

The hero. A 1986 lab robot that grows from chatbot to autonomous agent.

SCOUT

Fast explorer. Reads sensors and manuals, can't carry anything.

GRIP

Strong robot with a gripper. Moves items around the lab.

SUPERVISOR

Coordinates the squad and decides who acts next.

Concepts over syntax

Let's be honest: today everybody writes code with an AI assistant. Memorising the exact arguments of a function is no longer the bottleneck. Knowing what is possible and which piece solves which problem is.

That's what this course optimises for. Each chapter opens with a briefing (the concept, what your robot gains, the key terms), then shows it working in a simulation. The real, runnable code is always there, and every chapter ends with a ready-made prompt so your AI copilot can build the next step with you.

1 · Understand

The concept and the capability it unlocks.

2 · Watch

Press ▶ and see the agent think, call tools and read, step by step.

3 · Build

Copy the real script, or hand the prompt to your AI copilot.

Power-ups for your AI copilot

Here's the cheat code. LangChain moves fast, and your assistant's training data is always a few versions behind. The LangChain team publishes two free power-ups that plug the live docs and expert skills straight into your coding assistant. Install them once, and your copilot writes current LangChain code instead of hallucinating last year's API.

All credit to LangChain. The MCP servers, the Skills and the prompts below are made and maintained by the LangChain team. Sources: docs.langchain.com/use-these-docs and github.com/langchain-ai/langchain-skills.

Power-up 1 · Docs MCP servers

Two MCP servers that let your assistant search the docs in real time. docs-langchain has the guides and tutorials (the why and how). reference-langchain has the API reference (exact classes, parameters and signatures). Connect both. Pick your tool:

Run in your project folder (add --scope user to make them available in every project):

claude mcp add --transport http docs-langchain https://docs.langchain.com/mcp
claude mcp add --transport http reference-langchain https://reference.langchain.com/mcp
codex mcp add langchain-docs --url https://docs.langchain.com/mcp
codex mcp add langchain-reference --url https://reference.langchain.com/mcp

Add to your MCP settings file:

{
  "mcpServers": {
    "docs-langchain": {
      "url": "https://docs.langchain.com/mcp"
    },
    "reference-langchain": {
      "url": "https://reference.langchain.com/mcp"
    }
  }
}

Add to your MCP settings file:

{
  "servers": {
    "docs-langchain": {
      "url": "https://docs.langchain.com/mcp"
    },
    "reference-langchain": {
      "url": "https://reference.langchain.com/mcp"
    }
  }
}

Open Settings → Connectors and add both URLs:

https://docs.langchain.com/mcp
https://reference.langchain.com/mcp

Add to ~/.deepagents/.mcp.json (all projects) or a project-level .mcp.json, then restart dcode:

{
  "mcpServers": {
    "docs-langchain": {
      "type": "http",
      "url": "https://docs.langchain.com/mcp"
    },
    "reference-langchain": {
      "type": "http",
      "url": "https://reference.langchain.com/mcp"
    }
  }
}

Add to your MCP settings file:

{
  "mcpServers": {
    "docs-langchain": {
      "serverUrl": "https://docs.langchain.com/mcp"
    },
    "reference-langchain": {
      "serverUrl": "https://reference.langchain.com/mcp"
    }
  }
}

Don't want to look up your client's config? Paste LangChain's official prompt and let your assistant do it:

🤖 ASK YOUR AI COPILOT
Connect both LangChain documentation MCP servers to my coding agent so it can look up current LangChain, LangGraph, and LangSmith docs and API reference. Servers to add: * `docs-langchain`: https://docs.langchain.com/mcp * `reference-langchain`: https://reference.langchain.com/mcp Detect which agent or editor I am using (Claude Code, Cursor, Codex CLI, Claude Desktop, Deep Agents Code, VS Code, Antigravity, or another MCP-compatible client). Use the matching setup from https://docs.langchain.com/use-these-docs.md: * Claude Code: `claude mcp add --transport http` for each server (project scope by default; use `--scope user` only if I ask for global access). * Codex CLI: `codex mcp add` with each server URL. * Cursor, Deep Agents Code, VS Code, or Antigravity: merge both entries into the MCP settings JSON using the field names shown on that page for my client. * Claude Desktop: add both URLs under Settings > Connectors. Do not invent alternate MCP URLs. After configuring, confirm both servers are listed and reachable.

Power-up 2 · LangChain Skills

Skills are packaged expert instructions for LangChain, LangGraph and Deep Agents tasks (quickstarts, RAG, memory, human-in-the-loop…). Your assistant loads them automatically when the task matches.

# in your project
npx skills add langchain-ai/langchain-skills --skill '*' --yes

# or globally, for every project
npx skills add langchain-ai/langchain-skills --skill '*' --yes --global

Inside Claude Code:

/plugin marketplace add langchain-ai/langchain-skills
/plugin install langchain-skills@langchain-skills
🤖 ASK YOUR AI COPILOT
Install LangChain Skills for my coding agent so it can perform better on LangChain, LangGraph, and Deep Agents tasks. Use the Agent Skills installer from https://github.com/langchain-ai/langchain-skills: npx skills add langchain-ai/langchain-skills --skill '*' --yes If I ask for a global install instead, use: npx skills add langchain-ai/langchain-skills --skill '*' --yes --global Detect which agent or editor I am using. If I use Claude Code and prefer the plugin path, follow the marketplace install from that repository README (`/plugin marketplace add` then `/plugin install`). Do not invent alternate skill package names or install URLs. After installing, confirm the skills are available to the agent.

How to use this site

  1. Read the briefingEach chapter starts with the concept in three boxes.
  2. Press ▶ RunSimulations are emulated in your browser: no API key, nothing to install.
  3. Run it for realGrab the scripts from code/. Same robots, same world, a real LLM. Setup is in the next chapter.

// SAVE POINT

  • You'll learn LangChain + LangGraph by upgrading one robot, then a squad.
  • Focus on concepts and capabilities. Your AI copilot handles the syntax.
  • Install LangChain's docs MCP servers and Skills so your copilot writes up-to-date code.