← Generative AI Mastermind for EngineersAll programsHomeSearch
Generative AI Mastermind for Engineers·Session Recordings·3:03:23

Day 1: What Makes an LLM an Agent - Planning, Tools, Memory, Actions; Five Design Patterns; and Cursor, Antigravity and Claude Code Live

Devesh Bajaj Trainer - Data & Applied Scientist at Microsoft (Teams / Copilot); the whole technical session · Om Asnani Host - Outskill Head of Community; logistics, polls, Q&A relay

The short version

  1. An AI agent is an LLM plus four things: planning (break the goal into to-dos), tools (reach the outside world), memory (short- and long-term) and actions (send the email, write the code). 'Research our competitors' becomes five sub-steps before a single search runs (0:29-0:51).
  2. LLM internals in three ideas - tokens (cost and numbers), embeddings (meaning as vectors), self-attention (what in the prompt matters) - then next-token prediction (0:56-1:07). Pick the brain on intelligence, speed, price and context window at artificialanalysis.ai: Opus for hard agentic coding, Sonnet for speed, Kimi/Llama/Qwen when cost or privacy rules (1:08-1:18).
  3. Chain-of-thought is why agents plan: the apples riddle fails until 'let's think step by step' is appended (1:18-1:26). Grant only the tools a job needs - every extra tool is context and slower tool selection (1:26-1:31).
  4. Five agentic design patterns with production examples: basic responder, router (Netflix / Microsoft ticket routing), tool calling (Amazon's Rufus), multi-agent (MakeMyTrip, Zomato's Food Buddy, Claude Code's sub-agents) and autonomous generator-plus-validator for medical and legal (1:34-1:57). Built live in n8n: model + memory + tools, 'explain blockchain and email it to me' (1:57-2:05).
  5. Coding tools live: Cursor, Google Antigravity and VS Code + Copilot in Ask / Agent / Plan modes handle single features and break on multi-step, cross-repo, long-running work - the gap Claude Code fills: install, /agents to create a 'Python back-end engineer' sub-agent from one sentence, Plan Mode with Shift+Tab, an MCP SQLite server built from a request (2:05-2:36). Security: no agent ever gets production access - 'an agent wiped 2.5 years of a company's data' - review the code, stage everything, allow-list domains, expect prompt injection (2:36-2:42).

At a glance, three clicks deep

Skim here first: the closed row is the glance, open is the study card with the key points and timestamps, and the ↓ link drops to that concept's full write-up below.

01Agent = LLM + planning + tools + memory + actionsAgent = model + planning + tools + memory + actions;›

Agent = model + planning + tools + memory + actions; the human still grants the access.

Five sub-steps from one goal (0:30-0:32)

Old cycle vs goal + access (0:33-0:40)

Knowledge cutoff, no data, no actions, more hallucination - the LLM-alone problems (0:40-0:44)

↓ Full write-up of this concept

02Tokens, embeddings, self-attention - and how to pick the brainTokens -> embeddings -> attention -> prediction;›

Tokens -> embeddings -> attention -> prediction; pick models on intelligence / speed / price / context.

Tokens = cost + numeric input (0:57-1:00)

Embeddings up to 1,536 dimensions (1:01-1:03)

artificialanalysis.ai for the four trade-offs (1:08-1:12)

Opus / Sonnet / open models by constraint (1:11-1:14)

↓ Full write-up of this concept

03Chain-of-thought: why 'let's think step by step' is how agents planAsk for step-by-step reasoning before the answer;›

Ask for step-by-step reasoning before the answer; agents do it by default.

Apples riddle, wrong then right (1:20-1:24)

Google Brain 2023 paper (1:19)

Agents plan = CoT by default (1:25-1:26)

↓ Full write-up of this concept

04Grant only the tools the job needs; memory is short-term and long-termMinimal tool grants;›

Minimal tool grants; explicit short-term vs long-term memory; MCP as the connector.

Only the tools actually needed (1:28-1:30)

Short-term vs long-term memory (1:31-1:32)

Onboarding agent example (1:32-1:33)

↓ Full write-up of this concept

05Five agentic design patterns: responder, router, tool-calling, multi-agent, autonomousResponder / router / tool-calling / multi-agent / autonomous;›

Responder / router / tool-calling / multi-agent / autonomous; pick the simplest that solves the job.

Router: Netflix, Microsoft tickets (1:44-1:47)

Tool calling: Rufus live (1:48-1:51)

Multi-agent: MakeMyTrip, Zomato, Claude Code (1:52-1:55)

Autonomous: generator + validator for high stakes (1:55-1:57)

n8n agent built and emailed live (1:57-2:05)

↓ Full write-up of this concept

06Cursor, Antigravity, Copilot: Ask / Agent / Plan modes and where they breakIDE agents for incremental edits;›

IDE agents for incremental edits; rules files for standards; Claude Code for multi-step autonomy.

@file + Ask mode to explain code (2:06-2:09)

Agent mode adds Mistral + tree-of-thought (2:10-2:14)

Rules files for standards / PRDs (2:16-2:18)

Breaks on multi-step, cross-repo, long-running (2:22-2:29)

↓ Full write-up of this concept

07Claude Code: /agents, one-sentence sub-agents, CLAUDE.md, Plan ModePROCEDURE: install -> claude -> /agents -> one-sentence role -> generated .md -> Plan Mode -> parallel sub-…›

PROCEDURE: install -> claude -> /agents -> one-sentence role -> generated .md -> Plan Mode -> parallel sub-agents; CLAUDE.md as the manual.

/agents creates a sub-agent from a sentence (2:29-2:31)

CLAUDE.md / AGENTS.md operating manual (2:31-2:33)

Plan Mode: Shift+Tab (2:33)

MCP SQLite server built from a request (2:34-2:35)

Ideate in Claude.ai, build in Claude Code, edit in Cursor (2:33-2:34)

↓ Full write-up of this concept

08No agent gets production: review, stage, allow-list, expect prompt injectionNever prod;›

Never prod; review; staged environments; validated calls; domain allow-lists; local models for private data.

Real data-deletion incident cited (2:39-2:40)

Dev / PPE / prod; code review (2:40-2:41)

Trusted-domain allow-lists; prompt injection (2:41-2:42)

Ollama / LM Studio + Qwen / Llama, 8 GB RAM (2:49-2:51)

↓ Full write-up of this concept

The concepts in full

01

Agent = LLM + planning + tools + memory + actions

Is ChatGPT an LLM or an agent? The answer is the whole course.

An LLM answers; an agent acts. Devesh's definition adds four capabilities to the model: planning (decompose 'research our competitors' into identify -> analyse products -> compare pricing -> gather reviews -> summarise), tools (web search, databases, files, MCP servers), memory (short-term for the task, long-term across sessions) and actions (send the email, book the slot, write the code). The traditional plan -> architect -> code -> test cycle becomes a natural-language goal plus granted access - and granting access stays a human step.

Why it matters

The lens every later tool in the program is explained through.

02

Tokens, embeddings, self-attention - and how to pick the brain

'Explain LLM in depth' is seven tokens. The model reads all seven and decides which ones matter.

Tokenisation splits input into sub-word units (that is the cost meter and the numeric input); embeddings turn tokens into vectors that carry meaning (old models ~200 dimensions, modern up to 1,536); self-attention weights the relevant parts of the prompt ('...as if I'm 5' changes everything); then next-token prediction. Choosing a model is four trade-offs - intelligence, speed, price, context window - benchmarked at artificialanalysis.ai and openrouter.ai: Opus for complex agentic coding when cost is no object, Sonnet for quick and cheap, Kimi K2 / Llama / Qwen when cost or data privacy decides. A full context window means start a new conversation.

Why it matters

The minimum mental model for debugging odd model behaviour and for not overpaying.

03

Chain-of-thought: why 'let's think step by step' is how agents plan

Ten apples, some given away, more bought - the model gets it wrong until you ask it to show its working.

The Google Brain paper (2023): prompting the model to reason in steps before answering. Demonstrated live with the apples riddle - wrong, then correct once 'let's think step by step' is appended. Devesh presents this as the mechanism behind the planning pillar: coding agents like Cursor and Claude Code plan first because they are doing chain-of-thought by default. He also mentions his own papers on tree-of-thought and role-based prompting.

Why it matters

The one prompting technique that explains agent planning.

04

Grant only the tools the job needs; memory is short-term and long-term

Every tool you connect is context the model must read before it chooses one.

Tools reach outside static training data - a web-search API, a database, the file system, MCP servers for Notion / WhatsApp / Slack. The engineer decides which to grant, and Devesh's rule is minimal: extra tools bloat context and slow tool selection. Memory is analogised to a person's - short-term is task-scoped and disposable, long-term keeps facts and progress across sessions, as in an onboarding-checklist agent that remembers what was done. MCP itself is deferred to Day 2.

Why it matters

Tool scope is both a performance lever and a security boundary.

05

Five agentic design patterns: responder, router, tool-calling, multi-agent, autonomous

Netflix routes your ticket, Amazon's Rufus calls a database, MakeMyTrip runs three agents. Same five shapes everywhere.

Basic responder - one prompt, one reply (most FAQ bots). Router - an LLM classifies and routes to a specialised prompt (Netflix billing vs technical; Microsoft's internal routing across Word / Excel / Teams / Azure). Tool calling - the model picks an external tool (Amazon's Rufus querying the product database, shown live). Multi-agent - a manager coordinates specialists (MakeMyTrip's flight / hotel / planning agents, Zomato's Food Buddy, Claude Code's front-end / back-end / testing sub-agents). Autonomous - generator plus validator agents cross-checking, recommended for medical and legal. Then a live n8n build: model + memory + tools nodes, 'what is cryptocurrency and blockchain, send the response to my Gmail'.

Why it matters

A taxonomy for describing any agent system you meet or design.

06

Cursor, Antigravity, Copilot: Ask / Agent / Plan modes and where they break

Tag the file, ask what it does, then ask it to add Mistral and tree-of-thought to the benchmark. That works. Ask for a three-repo refactor and it does not.

Live in Cursor, Google Antigravity (free at the time; Gemini 3.x, Claude and GPT-OSS inside) and VS Code + GitHub Copilot: Ask mode to explain an anomaly-detection script via @file, Agent / Plan mode to add a model and a prompting technique from a Hugging Face model card, rules files (.cursor/rules, .google/rules) for coding standards and PRD generation. The limit: these tools handle single-feature, few-turn changes and struggle with multi-step autonomous builds, cross-repository work and long-running processes - the autonomy gap Claude Code exists for.

Why it matters

Sets the honest boundary between an AI editor and an autonomous coding agent.

07

Claude Code: /agents, one-sentence sub-agents, CLAUDE.md, Plan Mode

'A Python back-end engineer who writes optimised code' - one sentence, and Claude Code writes the sub-agent's operating manual.

Install from the terminal, run claude in the project, /agents to list or create sub-agents; describe the role in one sentence and a Markdown instruction file is generated - expertise, standards, scope. Several sub-agents (front end, back end, testing) run in parallel under a main agent; CLAUDE.md / AGENTS.md is the operating manual; Shift+Tab enters Plan Mode so it plans before it edits. Demonstrated by building an MCP SQLite server from a natural-language request. Workflow tip: ideate free in Claude.ai, plan and build in Claude Code, do small edits in Cursor to save cost - the $20 plan 'is of no use' for this; a $200 tier is sometimes still short.

Why it matters

The exact procedure for the sub-agent workflow Catalyst Session 13 teaches.

08

No agent gets production: review, stage, allow-list, expect prompt injection

'An AI coding agent accidentally wiped two and a half years of data.' Microsoft's rule is simple: agents never touch prod.

Human review of every line of AI-generated code; separate dev / pre-production / production environments; validate what comes back from external API calls; allow-list trusted domains for any browsing tool; and understand prompt injection - instructions hidden in scraped or user-supplied content that hijack the agent. In Q&A: local models via Ollama or LM Studio (Qwen, Llama, 8 GB RAM minimum) when data may not leave the machine; scraping equivalent to manual copy-paste is ethical, bypassing paywalls is not.

Why it matters

The security checklist every later build in the program assumes.

Tools referenced

ToolCoverageMomentContext
n8ndemonstratedModel + memory + tools agent, emailed live
CursordemonstratedAsk / Agent / Plan modes
Google AntigravitydemonstratedFree IDE agent with Gemini / Claude / GPT-OSS
GitHub CopilotdemonstratedVS Code Ask mode
Claude Codedemonstrated/agents, Plan Mode, MCP server build
Hugging FacedemonstratedMistral model card
ChatGPTexplainedKnowledge-cutoff illustration
PerplexityexplainedLLM orchestrator that always searches first
OpenRoutermentioned~600 models listed
OllamamentionedLocal models for privacy
LM StudiomentionedAlternative local runner
Wispr FlowmentionedTrainer's dictation tool
CodeRabbitmentionedPR-review example from the directory
Claude OpusmentionedPick for complex agentic coding
Claude SonnetmentionedFaster, cheaper tier

Action items

    Resources mentioned

    Resources
    • docProgram logistics
    • docAI-tools directory

    Extraction notes

    This page was built from an auto-generated transcript, which garbles product and people's names. Those were corrected silently in everything above and logged here for transparency. The warnings flag claims that were true on the recording day but change fast.

    Transcript corrections applied

    The transcript saysThe trainer actually means
    Debitch / Dheeraj / Divish / Dovish / DavejDevesh Bajaj (as introduced)
    Microsoft 5 3 minuteiPhi-3-mini
    Cloud CodeClaude Code
    QuenQwen
    WhisperFlowWispr Flow
    Terabyte (company in the deletion story)unresolved - possibly Replit

    True on recording day — verify before relying