# How to Run a Local AI Agent for Free Using n8n and Google Gemini

> A step-by-step play for standing up a working AI agent on your own laptop in about twenty minutes, at zero cost, before you commit budget to any platform.

**Type:** Play · **Read time:** 5 min · **For:** COO, Delivery lead · **Published:** 23 Jan 2025

**Video companion:** https://www.youtube.com/watch?v=R_Uw6OmXIPY

[All resources](https://aigenticlab.com/resources) · [View as HTML](https://aigenticlab.com/resources/run-ai-agent-free-n8n-gemini)

---

### Start here
## You do not need a contract to prove what AI can do

Most professionals exploring AI agents assume they need a paid API, a cloud subscription, or a developer on speed dial. None of that is true. You can run a fully functional AI agent on your laptop today, at zero cost, using two pieces of open-source software that take about twenty minutes to configure.

This is the exact setup: n8n Community Edition as the workflow engine and Google's Gemini model as the language model. No credit card. No vendor lock-in. No trial that silently starts billing you in thirty days.

The AI hype machine wants you to believe the fastest path to AI-enabled delivery is signing a contract, sitting through a demo, and waiting for the rollout. That burns budget, produces shiny presentations, and rarely delivers anything a fee earner actually uses. The smarter move is to prove what AI can do in your firm's context before you commit to anything.

> Running a local agent is the fastest way to build the internal credibility that moves your team from "we've heard about this" to "we're using this daily."

### What you need
## Four things, and none of them is a purchase order

- **A laptop.** Windows, Mac, or Linux, Intel or ARM.
- **Docker Desktop.** Free, from docker.com.
- **A Google account.** For a free Gemini API key via Google AI Studio.
- **Twenty minutes.** That is the whole budget.

### Ten minutes of clicks
## Install Docker, then pull and run n8n

Docker is the container engine that lets you run n8n locally without wiring up Node.js dependencies by hand. Download it from docker.com, pick the build for your operating system (Windows Intel users want the amd64 build), and run the installer. You do not need an account — the Personal Edition is enough.

Then stand up n8n:

- **Find the image.** Open Docker Desktop, search **n8n**, and select the official `n8n-io/n8n` image. Click Run.
- **Set the port.** Before it starts, open the optional settings and set the port to **5678** on both the host and container sides. Leave everything else at its defaults. Click Create and Run.
- **Confirm it is live.** Docker downloads the image and starts the container. Within seconds you will see the service available at `localhost:5678`.

Open a browser at `localhost:5678` and create your account. This is a local account only — it does not create a profile on any external server or share your data anywhere. Enter your name, email, and a strong password, work through the brief onboarding questions, and you are inside your own n8n instance.

### Build it
## Three nodes, one API key, a working agent

Create a new workflow. The structure is three nodes:

- **Chat Trigger.** The input interface — when a user types a message, this node fires.
- **AI Agent.** The orchestration layer. Leave the default settings in place for now.
- **Google Gemini Chat Model.** The language model node, where you connect the Gemini API.

In the Gemini node you will be prompted to add a credential. Go to aistudio.google.com, sign in, and click **Create API Key**. Select or create a Google Cloud project, generate the key, and copy it. Paste it into the n8n credential field and save, then choose your model. The experimental models, including Gemini 1.5 Flash, are currently free of charge — though that will not last indefinitely.

### See it run
## Test the agent, then map what comes next

With all three nodes connected, click the chat icon to open the test interface. Type anything — "summarise this paragraph" or a prompt relevant to your practice. The agent calls Gemini, processes the response, and returns it in the interface. If it responds, your local AI agent is live.

This is a starting point, not an end state. The KWA framework — Knowledge, Workflow, Agents — shows what to build next:

- **Knowledge.** The agent has no firm-specific knowledge yet. The immediate next step is giving it your documents, templates, and standard operating procedures, so it answers based on how your firm actually works rather than generic training data.
- **Workflow.** n8n connects to hundreds of tools — email, CRM, Slack, SharePoint, HubSpot — via built-in integrations. Once the agent works locally, you can wire it into real processes without writing code.
- **Agents.** With knowledge and workflow in place, the agent can start completing tasks autonomously — drafting proposals, routing client queries, generating reports — with human review at the right checkpoints.

Most firms that struggle with AI have jumped straight to the Agents layer without building the Knowledge and Workflow foundations first. That is the single most common reason expensive rollouts fail to stick.

### The honest trade-offs
## Two limits worth naming before you scale

- **Gemini's free tier will not last.** Google's experimental models are free while in preview. Build the habit and the workflow now, but plan for a small API cost once the model moves to general availability — a few pounds a month at typical professional-services volumes.
- **Local means local.** The agent runs on your machine and is not accessible to your team until you move it to a shared server or cloud environment. That is a deliberate advantage for early testing — nothing leaves your machine — but a constraint to plan around as you grow.

### The takeaway
## What to actually do on day one

Generic advice tells you to "start your AI journey" without telling you what to do first. This is what to do first: install Docker, pull n8n, connect Gemini, and have a working agent running on your laptop before lunch.

That agent is the foundation. Once it works, you layer in your firm's knowledge, connect it to your tools, and start building workflows that do real delivery work. That is how you make AI work so your team can deliver — not by buying a platform, but by building a practice.
