This website uses cookies

Read our Privacy policy and Terms of use for more information.

In partnership with

⚙️ THE WORKFLOW

Most people who discover the AI Agent node in n8n treat it like a more powerful LLM call. It's not. An agent can decide which tools to use, call them in sequence, evaluate the results, and try again if the output isn't what it needs. The difference between a simple LLM call and an agent is the loop — the agent reasons, acts, observes, and reasons again until the task is complete.

Here's a workflow that uses an n8n AI agent to research a topic, gather sources, and produce a structured brief — without any human in the loop.

The node chain:

Node

What it does

Webhook or Schedule

Triggers with a research topic as input

AI Agent

Orchestrates the research process using tools

→ Tool: HTTP Request

Fetches search results from a search API

→ Tool: RSS Read

Pulls recent articles from relevant feeds

→ Tool: Baserow

Checks for existing research on the topic

→ Tool: HTTP Request

Fetches and extracts article content

Google Gemini Chat Model

Powers the agent (gemini-3.1-flash-lite-preview)

Postgres Memory

Stores conversation context across agent steps

Code Node

Formats the agent's output as structured JSON

Baserow

Saves research brief to Content table

Posts brief summary with Baserow link

Step by step:

1. System prompt design

The agent system prompt is the most important configuration. For a research agent:

"You are a research assistant for StackSignal, a newsletter for indie operators. When given a topic, your task is: (1) search for 5–8 recent, relevant articles using the search tool; (2) fetch the full content of the 3 most relevant articles; (3) identify the key insights, emerging trends, and contrarian takes; (4) produce a structured research brief with: main insight, 3 key points, 3 source URLs with one-line summaries, and a suggested newsletter angle. Use tools iteratively — search first, then evaluate results, then fetch content for the most relevant hits."

2. Tool configuration

Connect tools as sub-nodes to the AI Agent node. For research:

  • HTTP Request (configured as tool): POST to a search API (Brave Search API, SerpAPI, or Exa — all have free tiers)

  • RSS Read (as tool): configured per feed, the agent decides which feeds to query

  • Baserow (as tool): the agent can check what topics have been covered recently

3. Memory setup

Connect a Postgres Chat Memory node to the agent. Session ID: research_[topic-slug] (slugify the topic at runtime). Memory persists the agent's reasoning between steps, which matters for multi-step research tasks.

4. Max iterations

Set maxIterations to 5–8 for a research task. Too low and the agent gives up before finishing. Too high and a confused agent will spin. 6 is usually right for a 3–4 tool research flow.

5. Output parsing

The agent returns natural language. A Code node after the agent extracts structured fields: topic, main_insight, key_points[], sources[], suggested_angle. Use a regex or JSON parse depending on how well your prompt enforces structure.

The first time this workflow runs on a real topic and comes back with a genuinely useful research brief, it feels disproportionately impressive. That feeling is justified.

🔧 THE STACK MOVE

Exa — the search API built for AI agents

Standard search APIs return titles and snippets. Exa returns full document content, semantic similarity scores, and supports natural language queries rather than keyword strings. It's designed for exactly this use case: AI agents that need to understand content, not just find it.

Price: Free tier includes 1,000 searches/month. Paid starts at $25/month for 5,000 searches. For an agent that runs weekly research briefs, the free tier covers it easily.

The honest tradeoff: Exa's index skews heavily toward technical content, research papers, and developer-adjacent topics. It's excellent for the StackSignal audience's interests (automation, AI, self-hosting, indie business). If you're researching lifestyle, entertainment, or highly localised topics, Exa's relevance drops noticeably. Brave Search API is a better general-purpose alternative at $3/1,000 queries — less semantically sophisticated but broader index coverage. I use Exa for technical research and Brave for everything else.

📡 THE SIGNAL

AI agents are still not reliable for high-stakes taskslatent.space

The gap between what AI agents can do in demos and what they can do reliably in production is still significant. The failure modes are subtle — the agent confidently completes the wrong task, or loops on a subtask indefinitely. For automation use cases, build in explicit output validation: if the agent's output doesn't match your expected schema, route to a human review step rather than failing silently.

Multi-agent architectures are coming to n8nblog.n8n.io

n8n's roadmap includes orchestrator-agent patterns — one master agent that delegates to specialised sub-agents. This is already possible with Execute Workflow nodes as agent tools, but native support will make it more accessible. Worth watching.

The prompt engineering is still the hard partnews.ycombinator.com

Every AI agent article focuses on the tool configuration and glosses over prompt engineering. The system prompt is where agents succeed or fail. A poorly specified prompt produces an agent that hallucinates tools it doesn't have, loops indefinitely, or completes a subtly different task than intended. Spend 60% of your agent development time on the prompt. It's not glamorous, but it's the work.

1,000+ Proven ChatGPT Prompts That Help You Work 10X Faster

ChatGPT is insanely powerful.

But most people waste 90% of its potential by using it like Google.

These 1,000+ proven ChatGPT prompts fix that and help you work 10X faster.

Sign up for Superhuman AI and get:

  • 1,000+ ready-to-use prompts to solve problems in minutes instead of hours—tested & used by 1M+ professionals

  • Superhuman AI newsletter (3 min daily) so you keep learning new AI tools & tutorials to stay ahead in your career—the prompts are just the beginning

Reply

Avatar

or to participate

Keep Reading