Skip to main content

Build your first AI agent

Workflow preview

Workflow preview
100%
Build your first AI agent preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This template launches your very first AI Agent —an AI powered chatbot that can do more than just talk— it can take action using tools. Think of an AI Agent as a smart assistant, and t...

Best for

  • Personal Productivity automation workflows
  • AI Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.rssfeedreadtool, n8n-nodes-base.httprequesttool, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.lmchatgooglegemini

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lucas Peyrin.

Original n8n.io source

1.1 Workflow description

Title
Build your first AI agent
Workflow name
Build your first AI agent

How it works

This template launches your very first AI Agent —an AI-powered chatbot that can do more than just talk— it can take action using tools.

Think of an AI Agent as a smart assistant, and the tools are the apps on its phone. By connecting it to other nodes, you give your agent the ability to interact with real-world data and services, like checking the weather, fetching news, or even sending emails on your behalf.

This workflow is designed to be the perfect starting point:

  • The Chat Interface: A Chat Trigger node provides a simple, clean interface for you to talk to your agent.
  • The Brains: The AI Agent node receives your messages, intelligently decides which tool to use (if any), and formulates a helpful response. Its personality and instructions are fully customizable in the "System Message".
  • The Language Model: It uses Google Gemini to power its reasoning and conversation skills.
  • The Tools: It comes pre-equipped with two tools to demonstrate its capabilities:
    1. Get Weather: Fetches real-time weather forecasts.
    2. Get News: Reads any RSS feed to get the latest headlines.
  • The Memory: A Conversation Memory node allows the agent to remember the last few messages, enabling natural, follow-up conversations.

Set up steps

Setup time: ~2 minutes

You only need one thing to get started: a free Google AI API key.

  1. Get Your Google AI API Key:

  2. Add Your Credential in n8n:

    • On the workflow canvas, go to the Connect your model (Google Gemini) node.
    • Click the Credential dropdown and select + Create New Credential.
    • Paste your API key into the API Key field and click Save.
  3. Start Chatting!

    • Go to the Example Chat node.
    • Click the "Open Chat" button in its parameter panel.
    • Try asking it one of the example questions, like: "What's the weather in Paris?" or "Get me the latest tech news."

That's it! You now have a fully functional AI Agent. Try adding more tools (like Gmail or Google Calendar) to make it even more powerful.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Introduction Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note12

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note13

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note15

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note16

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Get News

Type / Role
n8n-nodes-base.rssFeedReadTool - rssFeedReadTool
Config choices
Version 1.2

Block 8 - Get Weather

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 9 - Your First AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 10 - Example Chat

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 11 - Conversation Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 12 - Connect Gemini

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Build your first AI agent
Complexity intermediate
Nodes 13
Categories Personal Productivity, AI Chatbot
Author Lucas Peyrin
Published 22 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6270/6270.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build your first AI agent do?

How it works This template launches your very first AI Agent —an AI powered chatbot that can do more than just talk— it can take action using tools. Think of an AI Agent as a smart assistant, and t...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Personal Productivity, AI Chatbot use case.