Skip to content

Session 5: AI Agents, Workflows & n8n โ€‹

Date: October 17, 2025
Duration: 2 hours
Participants: WiseTech Global Team
Recording: Watch Session Recording

๐Ÿ“‹ Overview โ€‹

In this comprehensive session, we explored the landscape of AI application development, from understanding where startup dollars go in AI spending to building practical AI agents with n8n. The session covered context engineering principles, AI agent fundamentals, and provided hands-on demonstrations of creating intelligent assistants with memory and tool capabilities using the Amap (้ซ˜ๅพทๅœฐๅ›พ) MCP service.


๐ŸŽฏ Key Topics Covered โ€‹

1. AI Application Spending Report โ€‹

Understanding the economics of AI applications is crucial for strategic decision-making.

Key Reports:

Key Insights:

  • Infrastructure costs dominate early-stage AI applications
  • Token consumption patterns reveal usage optimization opportunities
  • Strategic resource allocation is critical for AI product success

2. Context Engineering โ€‹

Context engineering is the art and science of optimizing how we provide information to AI models for better results.

Featured Resources:

Core Principles:

  • Precision over Volume: More context isn't always better - relevance matters
  • Structured Information: Organize context hierarchically for better comprehension
  • Dynamic Context: Adapt context based on conversation flow and user intent
  • Memory Integration: Leverage conversation history effectively

3. AI Agents & Workflow Platforms โ€‹

AI Agents Ecosystem

Platform Comparison:

PlatformTypeStrengthsUse Cases
ChatGPT AgentKitFrameworkOfficial OpenAI supportPrototyping, research
LlamaIndexFrameworkData integration focusRAG applications
FirecrawlToolWeb scraping + agentsData collection agents
n8nWorkflowVisual, open-sourceBusiness automation
CozePlatformLow-codeRapid prototyping
DifyPlatformEnterprise featuresProduction deployments

Key Resources:


4. Understanding n8n โ€‹

From "nodemation" to "n8n" โ€‹

The founder Jan Oberhauser originally wanted to name this tool nodemation.

Name Construction:

markdown
nodemation = node + automation
    โ”‚          โ”‚        โ”‚
    โ”‚          โ”‚        โ””โ”€ Automation
    โ”‚          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Node (dual meaning)
    โ”‚
    โ””โ”€ โ‘  Built with Node.js
       โ‘ก Node-based visual interface

But Jan thought the name was too long and not concise enough. So he used a clever approach:

markdown
nodemation
n  o  d  e  m  a  t  i  o  n
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ 8 letters โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ†“ Replace middle 8 letters with the number 8

n8n โœจ

Numeronym Examples:

OriginalAbbreviationExplanation
KubernetesK8s8 letters between K and s
Internationalizationi18n18 letters between i and n
Localizationl10n10 letters between l and n
nodemationn8n8 letters between n and n

5. Traditional AI vs AI Agent โ€‹

Traditional AI:

  • You ask: "What's the weather today?"
  • It answers: Weather information

AI Agent:

  • You say: "Help me plan a weekend trip"
  • It will:
    • Check weather forecast
    • Recommend suitable destinations
    • Find transportation options
    • Even book hotels for you

Core Difference:

  • Traditional AI = Information retriever
  • AI Agent = Autonomous thinking and acting intelligent assistant

Formula:

markdown
Agent = Loop (LLM + Tools + Context + Memory)

Capability Comparison:

DimensionTraditional AIAI Agent
Response ModePassive answersActive execution
Processing DepthSingle-turn dialogueMulti-step planning
Decision MakingFixed processDynamic decisions
Capability RangeSingle functionTool invocation

6. Building Your First AI Agent with n8n โ€‹

Step 1: Understanding Agent Architecture โ€‹

Three-Layer Architecture:

  1. Trigger Layer: How to start? (Chat/Webhook/Schedule)
  2. Processing Layer: How to think? (LLM + Memory)
  3. Execution Layer: How to act? (Tools)

Modular Design Benefits:

  • Flexibly replace any layer without affecting others
  • Quickly locate problems at specific layers
  • Reuse existing modules to build new systems

Step 2: Adding AI Agent Node โ€‹

  1. Open n8n workflow canvas
  2. Click "Add Node" button (+)
  3. Search for "AI Agent"
  4. Select the AI Agent node

The AI Agent node comes with a chat trigger, enabling interactive conversation.

Step 3: Three Connection Points โ€‹

  1. Left: Chat Model - Agent's "brain" (determines intelligence level)
  2. Middle: Memory - Agent's "memory bank" (remembers conversation history)
  3. Right: Tools - Agent's "toolbox" (grants execution capabilities)

7. Adding Memory to Your Agent โ€‹

Memory Storage Options:

Storage TypeUse CaseAdvantagesDisadvantages
Simple MemoryTesting/DevelopmentZero configurationLost on restart
RedisHigh concurrencyFast performanceRequires maintenance
MongoDBComplex dataHigh flexibilityComplex setup
PostgreSQLEnterprise appsStrong reliabilityResource intensive

Progressive Upgrade Principle:

  1. Start with the simplest (Simple Memory)
  2. Upgrade when encountering limitations
  3. Don't over-design

Memory Configuration:

  • Context Window Size: 10 (remember last 10 conversation turns)
  • Session ID: Automatically managed for chat triggers

{{ $json.sessionId }}


8. Integrating Tools - Amap MCP Service โ€‹

What is MCP? โ€‹

MCP (Model Context Protocol) is a standardized protocol that allows AI models to safely access external tools and services.

MCP Advantages:

  • โœ… Standardized interface - Unified calling method
  • โœ… Plug-and-play - No complex configuration
  • โœ… Feature-rich - Multiple capabilities in one service

Amap (้ซ˜ๅพทๅœฐๅ›พ) MCP Capabilities โ€‹

  • Weather Query - Get real-time weather and forecasts for any city
  • Address Search - Find specific addresses and coordinates
  • Nearby Search - Find restaurants, hotels, gas stations, etc.
  • Route Planning - Calculate optimal travel routes
  • Administrative Divisions - Get city and district information

9. System Prompt Design โ€‹

Understanding System Message vs User Message:

System Message (System Prompt):

  • Defines AI's identity, behavior rules, and working methods
  • Users can't see it, but it affects all AI responses
  • Content: Role setting, output format, tool usage rules
  • Scope: Entire conversation session

User Message (User Prompt):

  • User's specific questions or instructions
  • Content: Specific questions, needs, dialogue content
  • Scope: Current conversation turn

Example System Prompt for Weather Agent:

markdown
You are an intelligent life assistant equipped with Amap tools. Please follow these requirements:

## Basic Principles
1. Always reply in Chinese
2. Maintain professional yet friendly tone
3. Be honest if uncertain about answers

## Tool Usage Guide

### Weather Query
- Keywords: weather, temperature, rain, sunny, etc.
- Action: Call weather query tool
- Output Format: Strictly follow this template for personalized weather forecast

**Weather Forecast Output Template:**
1. ๐ŸŒค๏ธ Today's Weather Overview
2. ๐ŸŒก๏ธ Temperature and Feels-Like Temperature
3. ๐Ÿ‘” Clothing Suggestions
4. ๐Ÿš— Travel Reminders
5. ๐Ÿ’ก Life Tips

Requirements:
- Vivid and friendly language suitable for daily reading
- Include practical life advice
- Use emojis for readability
- Total length: 200-300 characters

### Location Query
- Keywords: where, address, how to get, route, nearby, around, find, etc.
- Action: Call address search, nearby search, or route planning tools
- Output Format:
  - Use ๐Ÿ“ to mark address location
  - Use โญ for rating information
  - Use ๐Ÿšถโ€โ™‚๏ธ๐Ÿš— for distance and transportation
  - Provide **specific numbers and distances**
  - Sort recommendations by **distance and rating**

10. Practical Use Cases โ€‹

Scenario 1: Trip Planning

  • User: "Going to Shanghai tomorrow for business, check the weather for me"
  • Agent Actions:
    • Calls weather query tool
    • Formats response with travel suggestions
    • Provides clothing recommendations

Scenario 2: Location Search

  • User: "Find nearby coffee shops"
  • Agent Actions:
    • Detects current location
    • Searches nearby coffee shops
    • Returns sorted results with ratings and distances

Scenario 3: Complex Query

  • User: "I'm at Nanjing South Station, need to go to Confucius Temple, what's the weather like?"
  • Agent Actions:
    • Queries weather for destination
    • Calculates route and travel time
    • Provides comprehensive travel plan

๐Ÿ“Š Presentations & Materials โ€‹

Session Recording โ€‹

๐ŸŽฅ Watch Full Session

Recording Highlights:

  • AI spending report analysis
  • Context engineering principles
  • Live n8n agent building demo
  • Amap MCP integration walkthrough
  • System prompt design best practices
  • Real-world use case demonstrations

Demo Configuration โ€‹

๐Ÿ“„ Download n8n Workflow Configuration

This configuration file contains the complete n8n workflow demonstrated in the session, including:

  • AI Agent node with Amap MCP integration
  • Simple Memory configuration
  • System prompt templates
  • Tool configurations

To import:

  1. Open your n8n instance
  2. Click "Import from File"
  3. Select the downloaded JSON file
  4. Configure your API keys and settings

Industry Reports & Research โ€‹

  1. a16z AI Application Spending Report - Startup spending analysis
  2. OpenAI 1T Tokens Customers - Usage patterns
  3. a16z Report (Chinese) - Translated insights

Context Engineering โ€‹

  1. YouTube: Context Engineering - Video tutorial
  2. LangChain + Manus (Chinese) - Best practices
  3. Manus 1.5 Release - Latest features

AI Agent Platforms & Tools โ€‹

  1. ChatGPT AgentKit - OpenAI's official framework
  2. LlamaIndex - Data integration platform
  3. LlamaIndex Multi-Agent - Production framework
  4. Firecrawl - Web scraping tool
  5. Firecrawl Agent Builder - Open source builder
  6. n8n - Workflow automation platform
  7. n8n GitHub - Source code
  8. Coze - Low-code agent platform
  9. Dify - Enterprise AI platform
  10. Dify GitHub - Open source code

๐ŸŽฎ Quiz Activity โ€‹

Quiz Details โ€‹

Total Questions: TBD
Duration: 15 minutes
Topics Covered:

  • AI agent fundamentals
  • Context engineering principles
  • n8n workflow design
  • MCP protocol understanding
  • System prompt engineering

๐Ÿ† Quiz Results & Winners โ€‹

๐Ÿฅ‡ First Place โ€‹

Winner: Leo Qian


๐Ÿฅˆ Second Place โ€‹

Winner: Anthony Liang


๐Ÿฅ‰ Third Place โ€‹

Winner: Hunter Yang


๐Ÿ“Š Full Results โ€‹

RankName
๐Ÿฅ‡ 1Leo Qian
๐Ÿฅˆ 2Anthony Liang
๐Ÿฅ‰ 3Hunter Yang

๐Ÿ”‘ Key Insights โ€‹

  1. Agent Formula: Understanding Agent = Loop (LLM + Tools + Context + Memory) provides a systematic approach to agent design
  2. Modular Architecture: Three-layer architecture (Trigger, Processing, Execution) enables flexible and maintainable agent systems
  3. Progressive Development: Start simple (Simple Memory) and upgrade based on actual needs, avoiding over-engineering
  4. Prompt Engineering: Well-designed system prompts are crucial for consistent and reliable agent behavior
  5. MCP Standardization: Model Context Protocol provides a unified way to integrate external tools and services
  6. Context Engineering: Quality over quantity in context provision leads to better AI responses

๐Ÿ’ฌ Practical Takeaways โ€‹

For Developers:

  • Start with n8n's visual interface for rapid prototyping
  • Use MCP services for standardized tool integration
  • Apply the three-layer architecture thinking to all agent designs
  • Test memory configurations progressively

For Product Teams:

  • Understand AI application spending to optimize costs
  • Consider agent capabilities when planning AI features
  • Design user experiences around agent workflows
  • Leverage existing platforms before building custom solutions

For Everyone:

  • AI Agents are fundamentally different from chatbots
  • Tool integration multiplies agent capabilities
  • Memory enables continuity in conversations
  • Context engineering improves response quality

๐Ÿ“š Further Learning โ€‹

Next Steps:

  • Explore n8n's official documentation and templates
  • Experiment with different MCP services
  • Study prompt engineering techniques
  • Build a personal assistant agent as practice

Recommended Resources:

  • n8n Academy courses
  • MCP specification documentation
  • LangChain agent tutorials
  • OpenAI prompt engineering guide

๐ŸŽฏ What's Next? โ€‹

Looking forward to Session 6, where we'll explore:

  • Advanced agent orchestration patterns
  • Multi-agent collaboration systems
  • Production deployment strategies
  • Monitoring and observability for AI agents

Want to Try This Yourself?

All demo configurations and code samples are available. Start with n8n Community Edition (free) and experiment with building your first agent!

Questions or Feedback?

Reach out to Damien Li or the Crossroad AI team for discussions, clarifications, or collaboration opportunities!


Session 5 | October 17, 2025 | AI Agents, Workflows & n8n | Damien Li

Internal WiseTech Global Resource