← All sessionsHomeSearch
C7 EST | 14 Day AI Sprint·Day 7 | Build Day: Building "Jerry" + AI MVP in 6 Hours·2:01:00

Day 7: Building 'Jerry' — Master Agent, Sub-Agents as Tools, the List-Then-Act Pattern, and Calling Any API from n8n

Akhil Day mentor (returning from Day 3) - designs and builds the whole multi-agent system live, rejecting four routing designs on the way · Uthappa Host - schedule, hackathon/product-playbook framing, hands to Akhil

The short version

  1. Step one of any workflow is PLANNING, not the trigger: list the natural-language commands per domain first - email (send, reply, draft, delete), calendar (view day, availability, create, update, delete), meetings (summary, attendees, action items) - then the compound cross-domain ones.
  2. AI node vs Agent node: 'the main differentiation comes with memory'; an agent also lets you swap the brain. AI nodes are for single-shot classification; agents for conversations, multi-tool coordination, compound commands.
  3. Four routing designs rejected on air - sequential chain, parallel broadcast, switch/IF on keywords, AI classifier + switch - because they waste credits or break on 'send an email AND create an event'. The answer: a MASTER agent whose tools are SUB-AGENTS, using n8n's 'AI Agent (tool)' node type - 'an action node can never be a tool'.
  4. The pattern that repeats in every domain: LIST, THEN ACT BY ID. Reply/delete/update need a message, event or transcript ID you do not have, so the prompt tells the agent to call Get Many first, extract the ID, then call the action tool. Every app tool is Resource x Operation; if the operation is missing, look one resource level up (Draft is its own resource; Availability sits under Calendar, not Event).
  5. Two silent killers and their fixes: (1) LLMs think today is their training cutoff - add the Date and Time tool and instruct 'get the current date before any action'; set the workflow time zone in settings. (2) Memory costs money - context window 5 for sub-agents, 10 for the master because it tracks every domain.
  6. Unsupported apps: get the API key, ask the vendor's docs (or an LLM) for the cURL, import cURL into an HTTP Request Tool, paste the key yourself ('they don't have your API key'), and let the agent build the dynamic JSON body at runtime because tool fields cannot take agent variables. Live: 'summary of the last meeting' chained two Fireflies calls correctly.

The concepts

01

AI node vs Agent node: memory, and a swappable brain

Both can call tools. Both can classify. Only one remembers what you said a turn ago.

A 'message a model' AI node is stateless and hard-wired to one provider ('you either choose an OpenAI or a Gemini'). An AI Agent node keeps conversational memory across turns and lets you swap the LLM without rebuilding. AI nodes remain the right choice for single-task jobs such as the Day 3 spam filter; agents are for conversations ('reply to the same person with x' needs memory), multi-tool coordination, and any natural-language command - a raw Gmail node cannot interpret 'send an email to abc'.

Planning precedes both: 'you can never create a workflow without a plan' - the first NODE is a trigger, the first STEP is enumerating commands per domain and the compound commands that span them.

Why it matters

This is Day 4's 'agent is not required everywhere' from the other side: when memory or brain-swapping is needed, only the agent node will do.

Go deeper

In one line: AI node = stateless single-provider LLM call for fixed tasks; Agent node = memory + swappable model + tool coordination for conversational/compound work; plan commands before the canvas.

Difference is memory; agents also allow swapping the brain (l3186042 0:12-0:13)

AI nodes for single-shot classification like spam filtering (l3186042 0:14)

Both can call tools - not the distinguishing feature (l3186042 0:15)

Planning is step one; the trigger is only the first node (l3186042 0:09)

Commands per domain listed before building, plus compound commands (l3186042 0:17-0:25)

▶ Watch this taught:

02

Master agent, sub-agents as tools: why four other designs lose

Chain the agents and you pay every agent for every message. Broadcast and you pay the same. Keyword-switch and natural language breaks it. Classify-then-switch and 'email AND calendar' breaks it.

Akhil walks through the alternatives and knocks each down: sequential chaining (every agent runs on every request - credits wasted), parallel branches (same waste), Switch/IF on keywords (cannot parse natural language), an AI-node classifier feeding a Switch (fails on compound cross-domain commands). 'That calls for something called a master agent and sub agent architecture.' n8n's recent update added an 'AI Agent' TOOL node type distinct from the action node; only the tool type can be nested - 'an action node can never be a tool.'

Build: the Email Agent is converted into a tool under a new Master Agent; the sub-agent's input is 'automatically defined by the model' (the master decides what to pass). Master memory 10, sub-agent memory 5 - the master must hold every domain. Master system prompt: route by domain to Email/Calendar/Meeting agent tools; for combinations 'use the appropriate tools in the order of requirement.' Live test: 'send an email ... as well as create an event titled after party' - both happened. Calendar and Meeting agents are then 'Lego pieces': duplicate chat model + memory, swap the tools.

Why it matters

This is the small-scale version of the orchestrator/sub-agent thinking that runs through Paul's Catalyst sessions on sub-agents and harnesses - here in a no-code canvas.

"Jerry" as built on Day 7: master agent, sub-agents attached as tools On Chat Message trigger MASTER AGENT Gemini 2.5 Flash - memory 10 routes by domain; compound asks in order EMAIL AGENT (tool) memory 5 Gmail: Get Many, Send, Reply, Draft, Delete CALENDAR AGENT (tool) memory 5 + Date & Time tool Calendar: Get Many, Availability, Create, Update, Delete MEETING AGENT (tool) memory 5 HTTP Request Tool x2 Fireflies: list -> fetch by ID Every action needing an ID follows list-then-act: Get Many first, extract the ID, then Reply / Update / Fetch
Jerry as built on Day 7: one master agent routing to three domain sub-agents attached as tools, each with its own memory, model and app tools.
Go deeper

In one line: Master orchestrator agent with domain sub-agents attached as AI Agent (tool) nodes; master memory >= sub-agent memory; master prompt routes by domain and sequences compound requests.

Rejected: sequential, parallel, keyword switch, classifier+switch (l3186042 0:54-0:58)

Master/sub-agent architecture via the AI Agent tool node; action nodes cannot be tools (l3186042 1:01-1:03)

Sub-agent input 'automatically defined by the model' (l3186042 1:04)

Memory: master 10, sub-agents 5 (l3186042 1:01-1:02)

Master prompt routes by domain and handles combinations 'in the order of requirement' (l3186042 1:20)

Compound email+calendar test succeeded (l3186042 1:22-1:24)

▶ Watch this taught:

03

Resource x Operation, and the list-then-act-by-ID pattern

Do you have the message ID? No. Then the first tool call is always 'get many'.

Every n8n app tool is configured as a Resource (message, draft, event, calendar) and an Operation (Get Many, Send, Reply, Delete, Create, Update, Get Availability). If the operation you need is not listed, check 'a level above' - Draft is its own resource; Get Availability lives under Calendar, not Event. Tools are Lego: duplicate and change resource/operation to mint a new skill.

Reply, delete, update - and Fireflies' fetch-transcript - all need an ID you do not possess. The fix is never hardcoded: the system prompt says 'first read via Get Many, extract the ID, then use the appropriate tool.' Without a system message 'my agent does not have a direction' and will hallucinate tool use - 'every agent is as good as the instruction that you give.' (Expression mode is used for prompts only because it gives a bigger editor.) Live debugging: wrong Gmail account produced 'I'm not authorized'; the default email signature/attribution was disabled in Send/Reply options.

Why it matters

This one prompt pattern makes 80% of CRUD agents work; it also explains why Day 4's support agent extracted the thread ID up front.

Go deeper

In one line: Tool = Resource x Operation; when an action needs an ID, instruct the agent to list first, extract the ID, then act.

Resource then Operation; look one resource up if the operation is missing (l3186042 0:36, 0:41, 1:08)

Reply/Delete/Update: Get Many -> extract ID -> act (l3186042 0:46-0:47, 1:11)

No system message = agent with no direction = hallucinated tool use (l3186042 0:44)

Duplicate tools as Lego pieces (l3186042 0:38, 0:42)

Debugged: wrong Gmail credential; default signature disabled (l3186042 0:48-0:51)

▶ Watch this taught:

04

'It thinks today is the cutoff date': the Date and Time tool, and memory as a cost dial

Ask an agent to book 'tomorrow' and it books tomorrow relative to the day its training ended.

Models are trained to a cutoff and, ungrounded, treat that as today, so relative dates in calendar commands land in the wrong year. Fix: attach n8n's built-in Date and Time tool (no configuration) and write into the Calendar Agent's prompt 'before you perform any action, get the current date.' The workflow time zone - three-dot menu, workflow settings - governs what 'now' means. The master does not need the date; email carries its own timestamps.

Memory is a cost dial, not a free feature: Simple Memory's context-window length is how many turns get re-sent with every message, so 'if my input size is large... you'll have to pay more money.' Hence 5 for sub-agents, 10 for the master, and 'no' to a learner asking for 500.

Why it matters

Two of the most common mystery failures in agent demos, each with a one-node fix.

Go deeper

In one line: Add Date and Time tool + 'get current date first' instruction for any date-relative action; size memory windows deliberately (5 sub / 10 master) because every turn re-sends them.

LLMs default 'today' to their training cutoff (l3186042 1:13)

Date and Time tool + prompt rule 'get current date before any action' (l3186042 1:14-1:16)

Workflow time zone set in settings (three-dot menu) (l3186042 1:18)

Only the calendar agent needs the date; email carries timestamps (l3186042 1:18-1:19)

Context window = re-sent turns = cost; 5 for sub-agents, not 500 (l3186042 0:34)

▶ Watch this taught:

05

Any API in an agent: cURL import, manual keys, and letting the agent build the body

how-to

Fireflies has no n8n node. Twenty minutes later Jerry is summarizing your last meeting anyway.

For any SaaS without a native node: register and copy its API key; ask the vendor's documentation AI (or ChatGPT/Perplexity) in plain English how to do the thing - Fireflies needs two calls, list transcripts (to get IDs) then fetch transcript + attendees by ID, the same list-then-act shape; copy the cURL and Import cURL into an HTTP Request Tool node, which fills headers, body and placeholders. Paste the key yourself: 'although all the APIs or any other LLMs will give you a structure, they don't have your API key.' Because tool fields cannot reference agent-extracted variables, the second call's JSON body (with the transcript-ID slot) is constructed by the agent at runtime, instructed in the system prompt. Live: 'give me the summary of the last meeting' chained both calls and returned the summary.

Do it in this order
Why it matters

This is the escape hatch that makes 'n8n supports 500 apps' irrelevant - it supports anything with an API.

Go deeper

In one line: HTTP Request Tool + Import cURL + manual API key; multi-call APIs follow list-then-act; the agent composes dynamic request bodies from the prompt.

Any external software = API key + documented calls (l3186042 1:38-1:45)

Import cURL auto-configures the HTTP Request Tool (l3186042 1:44-1:45)

LLMs give the structure but never your key - paste manually (l3186042 1:45)

Fireflies: list transcripts -> fetch by ID (l3186042 1:40-1:50)

Agent builds the dynamic body at runtime since tool fields can't take variables (l3186042 1:50-1:53)

Live meeting-summary test succeeded (l3186042 1:53-1:55)

▶ Watch this taught:

Every concept, three clicks deep

The same concepts as a quick reference: the closed row is the glance, open is the study card, and every timestamp jumps into the recording.

01AI node vs Agent node: memory, and a swappable brainAI node = stateless single-provider LLM call for fixed tasks;

AI node = stateless single-provider LLM call for fixed tasks; Agent node = memory + swappable model + tool coordination for conversational/compound work; plan commands before the canvas.

Difference is memory; agents also allow swapping the brain (l3186042 0:12-0:13)

AI nodes for single-shot classification like spam filtering (l3186042 0:14)

Both can call tools - not the distinguishing feature (l3186042 0:15)

Planning is step one; the trigger is only the first node (l3186042 0:09)

Commands per domain listed before building, plus compound commands (l3186042 0:17-0:25)

02Master agent, sub-agents as tools: why four other designs loseMaster orchestrator agent with domain sub-agents attached as AI Agent (tool) nodes;

Master orchestrator agent with domain sub-agents attached as AI Agent (tool) nodes; master memory >= sub-agent memory; master prompt routes by domain and sequences compound requests.

Rejected: sequential, parallel, keyword switch, classifier+switch (l3186042 0:54-0:58)

Master/sub-agent architecture via the AI Agent tool node; action nodes cannot be tools (l3186042 1:01-1:03)

Sub-agent input 'automatically defined by the model' (l3186042 1:04)

Memory: master 10, sub-agents 5 (l3186042 1:01-1:02)

Master prompt routes by domain and handles combinations 'in the order of requirement' (l3186042 1:20)

Compound email+calendar test succeeded (l3186042 1:22-1:24)

03Resource x Operation, and the list-then-act-by-ID patternTool = Resource x Operation;

Tool = Resource x Operation; when an action needs an ID, instruct the agent to list first, extract the ID, then act.

Resource then Operation; look one resource up if the operation is missing (l3186042 0:36, 0:41, 1:08)

Reply/Delete/Update: Get Many -> extract ID -> act (l3186042 0:46-0:47, 1:11)

No system message = agent with no direction = hallucinated tool use (l3186042 0:44)

Duplicate tools as Lego pieces (l3186042 0:38, 0:42)

Debugged: wrong Gmail credential; default signature disabled (l3186042 0:48-0:51)

04'It thinks today is the cutoff date': the Date and Time tool, and memory as a cost dialAdd Date and Time tool + 'get current date first' instruction for any date-relative action;

Add Date and Time tool + 'get current date first' instruction for any date-relative action; size memory windows deliberately (5 sub / 10 master) because every turn re-sends them.

LLMs default 'today' to their training cutoff (l3186042 1:13)

Date and Time tool + prompt rule 'get current date before any action' (l3186042 1:14-1:16)

Workflow time zone set in settings (three-dot menu) (l3186042 1:18)

Only the calendar agent needs the date; email carries timestamps (l3186042 1:18-1:19)

Context window = re-sent turns = cost; 5 for sub-agents, not 500 (l3186042 0:34)

05Any API in an agent: cURL import, manual keys, and letting the agent build the bodyHTTP Request Tool + Import cURL + manual API key;

HTTP Request Tool + Import cURL + manual API key; multi-call APIs follow list-then-act; the agent composes dynamic request bodies from the prompt.

Any external software = API key + documented calls (l3186042 1:38-1:45)

Import cURL auto-configures the HTTP Request Tool (l3186042 1:44-1:45)

LLMs give the structure but never your key - paste manually (l3186042 1:45)

Fireflies: list transcripts -> fetch by ID (l3186042 1:40-1:50)

Agent builds the dynamic body at runtime since tool fields can't take variables (l3186042 1:50-1:53)

Live meeting-summary test succeeded (l3186042 1:53-1:55)

Tools referenced

ToolCoverageMomentContext
n8ndemonstratedMaster/sub-agent build; AI Agent tool node; Simple Memory; HTTP Request Tool; Date and Time tool
Google GeminidemonstratedGemini 2.5 Flash as every agent's brain (free credits)
GmaildemonstratedEmail Agent tools
Google CalendardemonstratedCalendar Agent tools incl. Get Availability
FirefliesdemonstratedMeeting Agent via raw API; docs assistant used
Read AImentionedMeeting tool Jerry talks to rather than replaces

Action items

    Resources mentioned

    Resources
    • docJerry v1 architecture (as built)

    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
    any 10 / anything / item / an 8 / 11n8n
    In it / and it in classn8n (in test email text)
    white codingvibe coding (the PM half, not in this recording)
    zedthe letter Z (British/Indian English), not an error

    True on recording day — verify before relying