Artificial Intelligence (AI) agents are no longer reserved for developers with advanced coding skills. With n8n, a powerful workflow automation tool, you can build your own AI agent without writing a single line of code. In Kevin Stratvert’s tutorial, we explore how to set up a free AI agent step by step using the Gemini model, memory, and practical tools.
Core Components of an AI Agent in n8n
To get started, you’ll configure three key components:
1. Model (LLM) – The Brain of the Agent
- The tutorial uses the free Gemini model.
- You can get an API key from Google AI Studio
2. Memory – Remembering Conversations
- Memory enables the AI to retain context across interactions.
- In this setup, “simple memory” is used with a session ID to store the last five messages.
- This allows the agent to provide coherent, context-aware responses.
(Timestamp: 06:43)
3. Tools – Giving the Agent Superpowers
Tools define what the agent can do beyond chatting. Kevin integrates:
- QuickBooks Online → Identify overdue invoices (07:16).
- Email → Send personalized payment reminders using invoice data (08:00).
- Discord → Adds a “human in the loop” step so emails can be reviewed and approved by a person before being sent (16:17).
Defining the Agent’s Role with Prompts
Once the model, memory, and tools are configured, a detailed prompt defines the agent’s role and boundaries.
- Example: The prompt specifies that the agent should check QuickBooks for overdue invoices, draft polite reminder emails, and wait for human approval before sending.
- Kevin even recommends using ChatGPT to refine your prompts for best results.
(Timestamp: 11:51)
Automating the Workflow
The final workflow is scheduled to run weekly:
- AI checks QuickBooks for overdue invoices.
- Drafts reminder emails.
- Submits them for approval via Discord.
- Sends the finalized emails automatically.
(Timestamp: 18:23)
This setup not only automates repetitive tasks but also keeps humans in control of critical communication.
Why This Matters
- For businesses: Saves hours of manual work chasing overdue invoices.
- For individuals: A no-code way to learn and experiment with AI agents.
- For AI enthusiasts: Demonstrates how memory + tools make agents truly useful.
Final Thoughts
With n8n and the free Gemini model, building an AI agent is accessible to everyone. By combining structured memory, practical tools, and thoughtful prompts, you can create agents that don’t just answer questions but take meaningful actions.

Leave a Reply