Get Started

Tools & Protocols

The interfaces between AI and the real world.

45 lessonsAbout 76 hoursExpert level23 free lessonsBy AI engineering expert Rohit Ghumare
Start this phase
0 of 45 done
  1. 01The Tool Interface, Why Agents Need Structured I/OA language model produces tokens. A program takes actions. The gap between those two is the tool interface: a contract that lets the model request an action and the host execute it. Every 2026 stack, function calling on OpenAI, Anthropic, and Gemini; MCP's tools/call; A2A's task parts, is a different encoding of the same four-step loop. This lesson names the loop and shows the minimum machinery to run it.45 minutesLearnPython (stdlib, no LLM)Free lesson
  2. 02Function Calling Deep Dive, OpenAI, Anthropic, GeminiThe three frontier providers converged on the same tool-call loop in 2024 and then diverged on everything else. OpenAI uses tools and tool_calls. Anthropic uses tool_use and tool_result blocks. Gemini uses functionDeclarations and unique-id correlation. This lesson diffs the three side by side so code that ships on one provider does not break when you port it.75 minutesBuildPython (stdlib, schema translators)Free lesson
  3. 03Parallel Tool Calls and Streaming with ToolsThree independent weather lookups serialized is three round trips. Run them in parallel and total time collapses to the slowest single call. Every frontier provider now emits multiple tool calls in a single turn. The payoff is real; the plumbing is subtle. This lesson walks both halves: the parallel fan-out and the streamed-argument reassembly, with emphasis on the id-correlation trap.75 minutesBuildPython (stdlib, thread pool + streaming harness)Free lesson
  4. 04Structured Output, JSON Schema, Pydantic, Zod, Constrained Decoding"Ask the model nicely to return JSON" fails 5 to 15 percent of the time, even on frontier models. Structured outputs close that gap with constrained decoding: the model is literally prevented from emitting a token that would violate the schema. OpenAI's strict mode, Anthropic's schema-typed tool use, Gemini's responseSchemaPydantic AI's output_typeand Zod's .parse are five surface forms of the same idea. This lesson builds the schema validator and the strict-mode contract learners will use for every production extraction pipeline.75 minutesBuildPython (stdlib, JSON Schema 2020-12 subset)Free lesson
  5. 05Tool Schema Design, Naming, Descriptions, Parameter ConstraintsA correct tool fails silently when the model cannot tell when to use it. Naming, descriptions, and parameter shapes drive 10 to 20 percentage-point swings in tool-selection accuracy on benchmarks like StableToolBench and MCPToolBench++. This lesson names the design rules that separate a tool a model picks reliably from a tool a model mis-fires.45 minutesLearnPython (stdlib, tool schema linter)Free lesson
  6. 06MCP Fundamentals: Stateless Requests and JSON-RPCModern MCP has no handshake and no protocol session. Each request must carry enough metadata to be understood, authorized, routed, and retried on its own.55 minutesLearnPythonFree lesson
  7. 07Building an MCP Server: Stateless Python and TypeScriptA modern MCP server does not remember a handshake. It validates the metadata on every request, runs one handler, and returns one typed result.85 minutesBuildPython, TypeScriptFree lesson
  8. 08Building an MCP Client: Discovery, Routing, and Dual-Era FallbackA modern MCP client repeats its contract on every request. Its hardest compatibility decision is knowing when an old server is truly old and when a modern server is reporting a correctable error.85 minutesBuildPythonFree lesson
  9. 09MCP Transports: stdio and Stateless Streamable HTTPTransport carries MCP messages. It does not supply missing protocol state. In 2026-07-28local stdio and remote Streamable HTTP both carry self-describing requests.65 minutesLearnPythonFree lesson
  10. 10MCP Resources and Prompts: Addressable Context for Stateless ServersTools perform operations. Resources expose addressable content. Prompts package user-selected message templates. A good MCP server keeps those contracts separate and predictable.60 minutesBuildPythonFree lesson
  11. 11MCP Model Input: Sampling Migration and Stateless MRTRMCP 2026-07-28 deprecates Sampling for new designs and removes the server-to-client request channel. If an existing workflow still needs the client's model, the server returns an input_required result and the client retries the original request with the model output. The reasoning loop becomes explicit, bounded, and stateless at the protocol layer.75 minutesBuildPythonFree lesson
  12. 12Explicit Scope and Stateless ElicitationRoots are deprecated in MCP 2026-07-28 and were never a security sandbox. Put scope in visible tool arguments or resource URIs, authorize it on the server, and use MRTR when a tool genuinely needs user input. The user sees the decision, the model sees the handle, and any server instance can process the retry.60 minutesBuildPythonFree lesson
  13. 13MCP Tasks Extension: Durable Work on a Stateless CoreStateless MCP does not mean every operation must finish in one request. The official Tasks extension gives long-running work an explicit durable handle. A server can return that handle from tools/callany instance can answer tasks/getand client input arrives through tasks/update without reviving protocol sessions.90 minutesBuildPythonFree lesson
  14. 14MCP Apps on the Stateless ProtocolAn interactive result is still an MCP tool and resource exchange. The 2026-07-28 core makes that exchange self-contained, while the Apps extension adds the sandboxed browser surface.75 minutesBuildPythonFree lesson
  15. 15MCP Security: Poisoned Metadata, Routing, and MRTR StateStateless does not mean trustless. It means every request exposes the evidence a server and gateway need to validate the call independently.60 minutesLearnPythonFree lesson
  16. 16MCP Authorization: CIMD, Issuer Binding, PKCE, and Step-UpA remote MCP request is stateless, but its authorization is not anonymous. Bind every credential to the issuer that created it and every token to the resource that receives it.90 minutesBuildPythonFree lesson
  17. 17Stateless MCP Gateways and Registry AdmissionA gateway should make every route explicit. The 2026-07-28 protocol gives it method, name, version, capability, identity, cache, and trace boundaries without a transport session.75 minutesLearnPythonFree lesson
  18. 18MCP Auth in Production: Issuer-Bound Enrollment and TokensLesson 16 built the OAuth 2.1 state machine. This lesson hardens its production boundaries for MCP 2026-07-28: Client ID Metadata Documents first, deprecated dynamic registration only for compatibility, authorization-response issuer validation, issuer-keyed client credentials, JWKS refresh, and audience-pinned tokens on every stateless request.Spec note (2026-07-28): Dynamic Client Registration is deprecated in favor of Client ID Metadata Documents. DCR remains a compatibility mechanism. When it is used, the client declares the correct application_type. A client validates a present RFC 9207 iss value and never reuses credentials across authorization-server issuers.90 minutesBuildPython (stdlib)Free lesson
  19. 19A2A, Agent-to-Agent ProtocolMCP is agent-to-tool. A2A (Agent2Agent) is agent-to-agent, an open protocol for letting opaque agents built on different frameworks collaborate. Released by Google in April 2025, donated to the Linux Foundation in June 2025, reaching v1.0 in April 2026 with 150+ supporters including AWS, Cisco, Microsoft, Salesforce, SAP, and ServiceNow. It absorbed IBM's ACP and added the AP2 payments extension. This lesson walks the Agent Card, Task lifecycle, and the three protocol bindings, using the A2A 1.0.1 wire names.75 minutesBuildPython (stdlib, Agent Card + Task harness)Free lesson
  20. 20OpenTelemetry GenAI, Tracing Tool Calls End-to-EndAn agent calls five tools, three MCP servers, and two sub-agents. You need one trace across all of it. The OpenTelemetry GenAI semantic conventions (stable attributes in v1.37 and up) are the 2026 standard, natively supported by Datadog, Langfuse, Arize Phoenix, OpenLLMetry, and AgentOps. This lesson names the required attributes, walks the span hierarchy (agent → LLM → tool), and ships a stdlib span emitter you can plug into any OTel exporter.75 minutesBuildPython (stdlib, OTel span emitter)Free lesson
  21. 21LLM Routing Layer, LiteLLM, OpenRouter, PortkeyProvider lock-in is expensive. Different tool-calling workloads suit different models. Routing gateways give one API surface, retries, failover, cost tracking, and guardrails. Three archetypes dominate 2026: LiteLLM (open-source self-hosted), OpenRouter (managed SaaS), Portkey (production-grade, open-sourced in March 2026). This lesson names the decision criteria and walks a stdlib routing gateway.45 minutesLearnPython (stdlib, routing + failover + cost tracker)Free lesson
  22. 22Agent Skills: Portable Contract and Runtime BoundaryA skill is not a long prompt with a better filename. It is a discoverable package of instructions, resources, and executable helpers that enters an agent's context through a runtime contract.90 minutesBuildPython (stdlib)Free lesson
  23. 23Capstone: Stateless Tool EcosystemA production agent system is a set of boundaries, not a pile of features. This capstone separates a readable in-process simulation from the protocol clients, authorization server, sandbox, and telemetry exporter a real deployment still needs.120 minutesBuildPython (stdlib, in-process simulation)Free lesson
  24. 24Skill Discovery and Progressive DisclosureA skill becomes useful before its body is loaded. Its name and description earn a place in the catalog; its deeper files earn context only when the task reaches them.105 minutesBuildPython (stdlib)Members
  25. 25Skill Invocation and RoutingInvocation is an authority decision followed by a relevance decision. A good description helps the model choose; a good policy decides whether that choice is allowed.105 minutesBuildPython (stdlib)Members
  26. 26Skill Permissions, Sandboxes, and TrustA skill can suggest an action. Only the host can authorize it, only an isolation boundary can contain it, and only verification can tell you whether it worked.120 minutesBuildPython (stdlib)Members
  27. 27Skill Evals, Packaging, and PortabilityA skill is finished when its package survives linting, routes on the right requests, improves a measured task, stays inside policy, and degrades honestly on another host.150 minutesBuildPython (stdlib)Members
  28. 28MCP Tool Contracts and ContentA tool is safe to automate only when discovery, arguments, results, pagination, and transport metadata agree on one contract.120 minutesBuildPythonMembers
  29. 29MCP Reliability, Cancellation, and Flow ControlA request ID correlates a message. It does not make a side effect safe, stop a worker, or protect a stream from a slow consumer.120 minutesBuildPythonMembers
  30. 30MCP Registry Supply Chain: Admission, Drift, and RollbackA registry entry tells you what a publisher declared. Production admission proves what you fetched, what you observed, what you approved, and what you can safely restore.90 minutesBuildPythonMembers
  31. 31MCP Conformance Engineering: Versioning, Evidence, and OperationsA server is not conformant because its happy path worked through one SDK. Conformance lives at the wire, at version boundaries, through intermediaries, and during rollback.100 minutesBuildPythonMembers
  32. 32Program Anatomy: An ELF Reader From ScratchA compiled program is a set of tables that point at each other. A reader you wrote gives output you can check byte by byte.120 minutesBuildPython (stdlib), C (fixture only)Members
  33. 33Disassembly and Control Flow: From Bytes to a Graph You Can CheckA disassembly listing is a claim about which bytes are instructions, and this lesson builds the decoder and graph that check the claim.150 minutesBuildPython, C, x86-64 assemblyMembers
  34. 34Lifting to Pseudocode: IR, SSA, and Structuring From ScratchDecompiler output is a claim with a hidden derivation. When you build the derivation yourself, every line of that output becomes a thing you can check.150 minutesBuildPython, CMembers
  35. 35Evidence, Confidence, and Unknowns in Binary AnalysisA finding about a compiled program is a record with a hash, a confidence, an authority, and a list of what it cannot show.105 minutesBuildPython, CMembers
  36. 36Rebuild and Prove Equal: Differential Tests, Byte Comparison, and the Evidence LoopPassing your tests proves agreement on your tests, so equality needs a grid that reaches every edge and bytes that match after relocation masking.110 minutesBuildPython, CMembers
  37. 37The Reverse Engineering Landscape: History, Tool Families, and How a Decompiler Is BuiltFive tools read the same object and give four addresses, three block counts, and two answers for one switch, and this lesson builds the harness that shows which is which.150 minutesBuildPython, C, x86-64 assembly, Java (one Ghidra script)Members
  38. 38Calling Conventions and Stack Frames: System V, Windows x64, and AArch64A disassembly shows which registers a function reads. Only the ABI says what those registers mean, and the ABI is chosen by the object header, so this lesson reads the header first and then checks every register against the rule that put it there.140 minutesBuildPython, C, x86-64 and AArch64 assemblyMembers
  39. 39Compiler Idioms: What Optimization Does to Your Code and How to Read It BackAn optimizing compiler replaces source constructs with cheaper instruction shapes. Each shape has a derivation, and this lesson builds the recognizer that runs the derivation backwards and checks it against the source.150 minutesBuildPython, C, x86-64 assembly, AArch64 assemblyMembers
  40. 40Linking, Loading, and Stripped Binaries: PLT, GOT, Imports, Fixups, and Function IdentificationA linked program calls functions it does not contain. This lesson reads the tables the link editor wrote for those calls in three formats, follows one call to the slot the loader fills, and finds the functions of a build after its names are gone.160 minutesBuildPython, C, x86-64 and arm64 assemblyMembers
  41. 41Recovering Data and Types: Structs, Arrays, C++ Objects, and DWARFA decompiler prints a->balance when it has a type table and *(int *)(param_1 + 4) when it does not. This lesson builds the table from the accesses, reads the real one from DWARF 5, and shows where the two agree.140 minutesBuildPython, C, C++, x86-64 assemblyMembers
  42. 42Dynamic Analysis of Your Own Program: Debuggers, Traces, and Confirming Static ClaimsA breakpoint hit is an observation about one run of one build. This lesson builds the harness that turns those observations into confirmed, refuted, and not-observed verdicts on the claims the static lessons made.130 minutesBuildPython, C, arm64 assembly, lldb command languageMembers
  43. 43Beyond Native Code: Python, JVM, .NET, and WebAssembly BytecodeA bytecode file is a program plus the compiler's notes about it, and this lesson builds the readers that show which notes each container keeps.150 minutesBuildPython, Java, C#, WebAssembly textMembers
  44. 44Binary Diffing and Symbolic Execution: Matching Functions and Solving for InputsA match between two functions is a claim made by one signature with one quality, and a solved input is one model of one path condition; this lesson builds both and checks them against radiff2, Ghidra, angr, and z3.150 minutesBuildPython, C, x86-64 assembly, Java (one Ghidra script)Members
  45. 45AI-Assisted Reverse Engineering: LLM Decompilers, Analysis Agents, and Ground TruthA model's reconstruction is a claim with a report attached, and this lesson builds the harness that scores both against bytes, runs, and DWARF you own.140 minutesBuildPython, CMembers
Next phase: Agent Engineering →