Agentic AI
from Scratch

A free, open-source agentic AI course. 163 lessons. 16 phases. Every agent built from a raw while-loop and an HTTP call before a single framework gets imported.

Maintained by Ramakm and contributors. Runs on your own machine, with local or hosted models.

Learn in your terminal
npx skills add Ramakm/agentic-ai-from-scratch
> Use start-building to begin the course.
Claude CodeCursorCodex+ any SKILL.md agent

An agent teaches you to build agents: placement quiz, personalized build plan, and lessons taught interactively in your terminal. How it works →

Built from scratch first, then with
PythonTypeScript Model Context ProtocolLangGraph Claude Agent SDKOpenAI Agents SDK CrewAIAutoGen Pydantic AILlamaIndex Ollamapgvector DockerOpenTelemetry A2A

“Every framework is optional. The loop is not.” · course principle №1

Your agent is the tutor

You don't read this course. An agent teaches it.

It's a course about agents, so it ships with one. Install the course skills into the coding agent you already use. It places you, writes your build plan, and walks you through each lesson in your terminal, then reviews the agent you wrote. You don't need to know the curriculum to start.

  1. 01 npx skills add Ramakm/agentic-ai-from-scratch

    Install the skills

    Nothing to clone. Works in Claude Code, Codex, Cursor, and any agent that reads SKILL.md.

  2. 02 /find-your-level

    Find your level

    Ten questions on prompts, tools, loops and evals. Your agent maps them to a starting phase, marks what you can skip, and estimates the hours.

  3. 03 /start-building

    Get your build plan

    Your goal and placement go into BUILD.md, a plan that lives in the same repo as the agent you're building.

  4. 04 /build

    Build every session

    A warm-up on the last lesson, the next one taught section by section, a code review of your agent, and your progress saved.

Agent stuck in a loop? /debug-my-agent reads your trace and links the lesson that fixes it. /check-understanding quizzes you on any phase. Commands are shown for Claude Code. In other agents, ask for the skill by name. See every skill →

Curriculum · 16 phases · 163 lessons · 4 live
Tap a phase to open its lessons. A lesson goes live once its docs, tested code, quiz, and shipped artifact are merged. New lessons land every week. See the roadmap →

How every lesson works

Most agent material comes as framework tutorials. A LangChain notebook here, a flashy multi-agent demo there, a thread about MCP somewhere else. The pieces rarely connect. You can wire a crew of five agents but can't say why the third one loops forever. You can install an MCP server but couldn't write the JSON-RPC message it answers.

This curriculum is the spine. 16 phases, 163 lessons, in Python and TypeScript. One HTTP call to a model at one end, a full agent harness with subagents, sandboxes and evals at the other. Every pattern gets built by hand first: the tool dispatcher, the ReAct loop, the vector store, the MCP server, the orchestrator. When the frameworks show up, you already know what they do.

  1. The problem

    A concrete failure

    A model only returns text. Ask it to book a flight and it describes booking one.

    >>> llm("book SFO→JFK")
    "Sure! To book…"
  2. Build it

    Raw code

    No framework. A ReAct loop in plain Python: think, call a tool, read the result, repeat.

    while step < MAX:
      msg = llm(ctx)
      if not msg.tool: break
      ctx += run(msg.tool)
  3. Use it

    Real tools

    The same loop inside LangGraph, the Agents SDKs and MCP. Now you can read what they're doing.

    g.add_node("agent", call)
    g.add_edge("tools", "agent")
  4. Ship it

    An artifact

    Something you keep: a tool, an MCP server, or a skill your coding agent can load.

    $ npx skills add ./my-agent
    ✓ 1 skill installed
Build the small version first, then see where the production tools do the same work. The example above is The Agent Loop in 120 Lines in Phase 3.

Choose the agents you want to build

Agentic AI is more than a prompt plus a tool. Pick one of four learning paths, then learn from the same lessons, labs, traces, and evals in the browser or on GitHub.

Agentic AI4 connected domains
Interactive machines · in the workshop · run one, then break it
The book edition · four volumes
The course, compiled. EPUB and PDF editions will be built from the same lessons and attached to GitHub releases. The site stays the living edition, and every chapter links back here for the machines, quizzes, and code.
Volumes ship as their phases go live · watch releases to get them first
Capstone · Phase 15

Finish with an agent you built yourself

The last phase puts everything together. A loop, a tool registry, a context manager, an MCP client, subagents, a permission system, and an eval suite, shipped as a CLI you can point at your own repos. No framework required. Swap one in later if you want.

16phases 163lessons 130hours of build time

No certificate and no paywall. The proof is the repo you push at the end.

Read it on GitHub
Ramakrushna Mohapatra
FIG_MNT · maintainer
Who's behind this

Ramakrushna Mohapatra

Sr. Data Scientist · GenAI & LLM engineer · Tech trainer · Founder of GrowTechie

I build LLM systems for a living and teach them on LinkedIn, Instagram and X. This course is the curriculum I wish I'd had: every agent pattern written by hand first, run on a laptop, and tested, before any framework gets a say.

Found a bug, want a lesson, or want to write one? Open an issue or say hi on any of these.

Colophon

The whole curriculum is on GitHub. Clone it, fork it, and work at your own pace. No paywall, no signup. Every lesson has runnable Python or TypeScript and works with local models through Ollama or with any hosted API.

git clone https://github.com/Ramakm/agentic-ai-from-scratch.git