Skip to content
AI & LLM Terminology & Architecture

Lesson 3 of 6 · 25 min

x
3/6

Lesson position in the course — not completion. Use Mark Complete to track finished lessons (saved in this browser).

Agents, Tools & Model Context Protocol (MCP)

An AI Agent is an autonomous system capable of planning, executing tools, inspecting results, and taking sequential actions to accomplish goals. Agentic AI shifts from static single-prompt responses to dynamic, goal-oriented execution loops.

Tool Calling (and Function Calling) allows models to execute external APIs, SQL queries, or custom code by emitting structured JSON function arguments. The Model Context Protocol (MCP) is an open standard that standardizes how AI assistants connect to tools, data sources, and enterprise services across platforms.

Multi-Agent Systems coordinate multiple specialized agents (e.g., Planner, Coder, Reviewer) directed by an Orchestrator. Human-in-the-Loop (HITL) checkpoints require human approval before executing sensitive operations (e.g., database writes or financial transfers). Agents maintain Memory across steps, utilize Planning to break goals down, and apply Reflection to critique and improve outputs before completion.

Before
Static Un-tooled Prompt Response
1// ❌ Model cannot check real-time data or perform actions2const response = await llm.generate("What is current order #12345 status?");
After
Tool-Enabled Agentic Execution Loop
1// ✅ Model emits structured function call -> agent executes tool -> returns result2const tools = [{3  name: "getOrderStatus",4  description: "Fetch live order status by ID",5  parameters: { type: "object", properties: { orderId: { type: "string" } } }6}];7const response = await llm.generate({ prompt, tools });8if (response.toolCall) {9  const result = await executeTool(response.toolCall);10  const finalAnswer = await llm.generate({ prompt, toolResult: result });11}

Exercise

Define a tool schema for a weather API, simulate a tool-calling LLM response, and build a Human-in-the-Loop approval gate for a write operation.

Check your understanding

  • What is Model Context Protocol (MCP)?Show answer

    Answer

    An open standard that standardizes tool calling and data source connections across AI assistants and enterprise services.
  • What is the purpose of Reflection in an AI agent?Show answer

    Answer

    Reflection allows an agent to evaluate its intermediate output against criteria and self-correct errors before returning a final answer.
Previous

Progress is saved in this browser.

Next Lesson