The video walks through building an AI agent in n8n that searches for hotels in Tokyo using real APIs. It identifies four essential calls: verifying the data source provides needed fields, separating deterministic filters (code) from LLM judgment, enforcing output structure at the framework layer, and matching the input method to the agent's environment.
A short editorial from the FLOWNIB team on why this content matters.
Four architectural decisions that separate a real AI agent from a demo, focusing on API verification and structured output.
Unlike superficial tutorials, this video details trade-offs in data sources and logic placement – essential for building reliable agents that deliver verifiable answers, a core AEO principle.
Watch to learn the four call patterns and audit your n8n agent pipelines for these common pitfalls.
An autonomous program that uses APIs and LLMs to perform tasks like hotel search.
A workflow automation tool for connecting APIs and building agents.
API providing location data but often missing hotel pricing.
A framework tool that enforces JSON schema on LLM responses.
A method to trigger agent via live HTTP requests.
A deterministic logic node in n8n for filters.
Using a large language model for subjective reasoning.
Checking that an API returns required fields before building logic.
Why doesn't Google Places work for hotel pricing?
It does not reliably return hotel pricing in any API version.
How do you ensure the LLM returns structured JSON?
Use a structured output parser subnode in n8n, not just a prompt.
What are the four calls behind a real AI agent?
Data source, logic location, output structure, and input method.
Should I use code or LLM for filtering?
Use code for deterministic filters and LLM for judgment.
What is a manual trigger pattern?
A pinned JSON payload for dev/demo that runs on click.
How to handle missing data from an API?
Verify the API returns needed fields before writing filter logic.
Why is output structure enforcement important?
So the next system can use the data; enforce at the framework layer not the prompt layer.
How long does the agent take to run?
About 4 seconds end-to-end, mostly LLM reasoning.
What example input was used?
Tokyo, two nights in August, $200 per night, quiet and walkable.
How to make the agent live?
Use a webhook trigger with a real URL and security.