Tools & Protocols

For ownersHow AI connects to the tools you already use: the calendar, the inbox, the order system.

The interfaces between AI and the real world.

45 lessons

Start with lesson 1

Lesson 1 of 45, ~45 minutesThe Tool Interface — Why Agents Need Structured I/O

The lessons

  1. 01The Tool Interface — Why Agents Need Structured I/OA language model can only write text. A tool interface lets it ask a program to do something real, like look up an order, then read back the result before it answers.Learn · ~45 minutes
  2. 02Function Calling Deep Dive — OpenAI, Anthropic, GeminiOpenAI, Anthropic and Gemini all let models call your functions, but each uses its own message format. This lesson compares the three so the same tools work on any of them.Build · ~75 minutes
  3. 03Parallel Tool Calls and Streaming with ToolsModern models can ask for several tool calls at once instead of one after another, and can stream their requests in pieces. Running them together cuts waiting time, but the pieces must be matched up carefully.Build · ~75 minutes
  4. 04Structured Output — JSON Schema, Pydantic, Zod, Constrained DecodingStructured output makes a model return data in an exact shape, like a form with required fields, instead of free text. Some providers enforce the shape while the model writes, so broken data never comes out.Build · ~75 minutes
  5. 05Tool Schema Design — Naming, Descriptions, Parameter ConstraintsHow you name and describe a tool decides whether the model picks it at the right moment. Good tools say when to use them, when not to, and what inputs are allowed.Learn · ~45 minutes
  6. 06MCP Fundamentals: Stateless Requests and JSON-RPCMCP, the Model Context Protocol, is a shared standard for connecting AI apps to tools and data. In its current version, every request carries everything needed to handle it on its own.Learn · ~55 minutes
  7. 07Building an MCP Server: Stateless Python and TypeScriptThis lesson builds a small MCP server in Python and TypeScript that offers notes as tools, resources and prompts. The server checks each incoming request and returns one typed answer.Build · ~85 minutes
  8. 08Building an MCP Client: Discovery, Routing, and Dual-Era FallbackAn MCP client is the part of an AI app that finds MCP servers, learns what tools they offer, merges those lists and sends each call to the right server. It also copes with older servers.Build · ~85 minutes
  9. 09MCP Transports: stdio and Stateless Streamable HTTPA transport is how MCP messages travel. Local tools use standard input and output on the same machine, while remote services use HTTP. Both carry the same self-contained requests.Learn · ~65 minutes
  10. 10MCP Resources and Prompts: Addressable Context for Stateless ServersBesides tools, MCP servers can offer resources, which are content an app can read by address, and prompts, which are saved message templates a person chooses. Each has a separate job.Build · ~60 minutes
  11. 11MCP Model Input: Sampling Migration and Stateless MRTRSampling let an MCP server borrow the client app's AI model. The current version deprecates it. When a server still needs model output, it asks the client to run the model and resend the request.Build · ~75 minutes
  12. 12Explicit Scope and Stateless ElicitationThis lesson covers how a tool knows which folder or workspace it may touch, and how it asks the user a question mid-task, such as which of three matching files to delete.Build · ~60 minutes
  13. 13MCP Tasks Extension: Durable Work on a Stateless CoreSome jobs, like building a large report, take longer than one request. The MCP Tasks extension gives that work a lasting ID, so the app can check on it, add input or cancel it later.Build · ~90 minutes
  14. 14MCP Apps on the Stateless ProtocolMCP Apps let a tool return a small interactive screen, like a filterable timeline or chart, instead of only text. The AI app shows it in a locked-down frame inside the chat.Build · ~75 minutes
  15. 15MCP Security: Poisoned Metadata, Routing, and MRTR StateTool descriptions from an MCP server are read by the model, so a malicious server can hide instructions in them. This lesson shows how to spot poisoned descriptions, sudden changes and name clashes.Learn · ~60 minutes
  16. 16MCP Authorization: CIMD, Issuer Binding, PKCE, and Step-UpRemote MCP servers use OAuth 2.1 sign-in so a user can grant an AI app limited access. This lesson covers tying each token to the server that issued it and the server it is meant for.Build · ~90 minutes
  17. 17Stateless MCP Gateways and Registry AdmissionAn MCP gateway sits between AI apps and many MCP servers. It shows one combined endpoint, applies access rules and rate limits, and decides which servers and tools each person may use.Learn · ~75 minutes
  18. 18MCP Auth in Production: Issuer-Bound Enrollment and TokensThis lesson takes MCP sign-in from a demo to production. It covers how apps register with a sign-in server, how token signing keys rotate and how tokens stay locked to one service.Build · ~90 minutes
  19. 19A2A — Agent-to-Agent ProtocolA2A, the Agent2Agent protocol, lets AI agents built by different teams or vendors hand work to each other. Each agent publishes a card describing its skills, and work moves as tracked tasks.Build · ~75 minutes
  20. 20OpenTelemetry GenAI — Tracing Tool Calls End-to-EndOpenTelemetry is a standard for recording what software does as timed traces. Its GenAI conventions cover AI model calls and tool calls, so one trace shows every step an agent took.Build · ~75 minutes
  21. 21LLM Routing Layer — LiteLLM, OpenRouter, PortkeyA routing layer sits between your app and several AI providers. It sends each request to a chosen model, retries or switches providers on failure and tracks cost per request.Learn · ~45 minutes
  22. 22Agent Skills: Portable Contract and Runtime BoundaryAn agent skill is a folder with instructions, reference files and helper scripts that an AI agent loads only when a task needs it. It is a package with rules, not just a long prompt.Build · ~90 minutes
  23. 23Capstone: Stateless Tool EcosystemThe capstone joins this phase into one research and report system: tool calls, long tasks, agent handoffs, an interactive result, access rules and tracing, with a map of what a real deployment still needs.Build · ~120 minutes
  24. 24Skill Discovery and Progressive DisclosureAn agent may have hundreds of skills installed. It sees only each skill's name and short description at first, then loads the full instructions and files only when a task calls for them.Build · ~105 minutes
  25. 25Skill Invocation and RoutingThis lesson separates two choices: whether a skill is allowed to run here, and whether it fits the request. It covers skills started by users, by the model, by the app and by other skills.Build · ~105 minutes
  26. 26Skill Permissions, Sandboxes, and TrustLoading a skill does not give it permission to act. The host app decides what is allowed, an isolated sandbox limits the damage and a check afterward confirms the result.Build · ~120 minutes
  27. 27Skill Evals, Packaging, and PortabilityA skill is done only when it passes tests: it is packaged correctly, triggers on the right requests, improves the task it targets, stays within its rules and still works on other agent hosts.Build · ~150 minutes
  28. 28MCP Tool Contracts and ContentThis lesson tightens the agreement between what an MCP tool promises and what it returns: input and output schemas, content types like text or images, paging through long lists and HTTP headers.Build · ~120 minutes
  29. 29MCP Reliability, Cancellation, and Flow ControlThis lesson handles what goes wrong in real networks: canceled requests, timeouts, retries, slow readers and dropped streams. The goal is that no action, like a payment, runs twice by accident.Build · ~120 minutes
  30. 30MCP Registry Supply Chain: Admission, Drift, and RollbackA registry listing shows what a publisher claims about an MCP server. This lesson checks the publisher, the exact package and the live tools, records approval and detects later changes.Build · ~90 minutes
  31. 31MCP Conformance Engineering: Versioning, Evidence, and OperationsPassing one SDK test does not prove an MCP server follows the spec. This lesson records raw message exchanges, tests version edges and proxies and gates each release on that evidence.Build · ~100 minutes
  32. 32Program Anatomy: An ELF Reader From ScratchThis lesson opens the reverse engineering track by reading a compiled program file by hand. It shows the tables inside an ELF file that point to code, names and data, using a program you wrote.Build · ~120 minutes
  33. 33Disassembly and Control Flow: From Bytes to a Graph You Can CheckDisassembly turns machine code bytes back into readable instructions. This lesson builds a small decoder and a map of how execution can flow between blocks of code, then checks both against a standard tool.Build · ~150 minutes
  34. 34Lifting to Pseudocode: IR, SSA, and Structuring From ScratchLifting turns machine instructions into a simpler intermediate form, then into C-like pseudocode with variables, ifs and loops. This lesson builds that pipeline so every output line can be traced back.Build · ~150 minutes
  35. 35Evidence, Confidence, and Unknowns in Binary AnalysisA finding about a compiled program should be stored as a record: what was seen, how sure it is, where it came from and what it cannot show. This lesson builds those records.Build · ~105 minutes
  36. 36Rebuild and Prove Equal: Differential Tests, Byte Comparison, and the Evidence LoopAfter rebuilding a function from its machine code, this lesson proves the rebuild matches the original by testing a grid of tricky inputs and comparing the compiled bytes directly.Build · ~110 minutes
  37. 37The Reverse Engineering Landscape: History, Tool Families, and How a Decompiler Is BuiltThis lesson surveys the history and main tools of reverse engineering, explains the stages inside a decompiler and builds a harness that compares what several tools report about the same file.Build · ~150 minutes
  38. 38Calling Conventions and Stack Frames: System V, Windows x64, and AArch64A calling convention is the rule for how functions pass inputs and results through registers and the stack. This lesson reads the rule for each platform and checks it against real compiled code.Build · ~140 minutes
  39. 39Compiler Idioms: What Optimization Does to Your Code and How to Read It BackOptimizing compilers swap simple code for faster but stranger instruction patterns, such as multiplying instead of dividing. This lesson learns to spot those patterns and translate them back to plain logic.Build · ~150 minutes
  40. 40Linking, Loading, and Stripped Binaries: PLT, GOT, Imports, Fixups, and Function IdentificationPrograms call library functions they do not contain. This lesson follows those calls through the tables the linker and loader fill in, across Linux, Windows and Apple formats, and finds functions after names are stripped.Build · ~160 minutes
  41. 41Recovering Data and Types: Structs, Arrays, C++ Objects, and DWARFCompiled code loses its data types, such as structs and arrays. This lesson rebuilds them from how memory is accessed, reads the real types from debug info, and compares the two.Build · ~140 minutes
  42. 42Dynamic Analysis of Your Own Program: Debuggers, Traces, and Confirming Static ClaimsDynamic analysis runs a program under a debugger and records what actually happens. This lesson uses those recordings to confirm or refute claims made earlier by reading the code without running it.Build · ~130 minutes
  43. 43Beyond Native Code: Python, JVM, .NET, and WebAssembly BytecodePython, Java, .NET and WebAssembly ship programs as bytecode instead of raw machine code. This lesson reads each format directly and measures which names, types and structure each one keeps.Build · ~150 minutes
  44. 44Binary Diffing and Symbolic Execution: Matching Functions and Solving for InputsBinary diffing matches functions between two versions of a program to see what changed. Symbolic execution treats inputs as unknowns and solves for values that reach each path through the code.Build · ~150 minutes
  45. 45AI-Assisted Reverse Engineering: LLM Decompilers, Analysis Agents, and Ground TruthAI models can now suggest source code, names and summaries for compiled programs. This lesson builds a scorecard that checks those suggestions against the actual bytes, real runs and debug info.Build · ~140 minutes

Lessons from AI Engineering from Scratch by Rohit Ghumare and contributors, MIT license. Notes for owners by Lozo. License

Next step

Rather have it built for you?

Reading is optional. Tell me what's stuck and I'll build it into the business you already run.

  • A real conversation, not a pitch
  • You keep your accounts
  • Nothing sends without your yes