Build an AI deep research agent
A research agent takes a question (who are my competitors, which vector database should I use, what changed in my market this week), plans a few searches, reads the pages it finds and writes a short report with a source link for every claim. It uses our email and automation stack: a trigger (a form, a sheet row or a schedule), a model with a web search tool in a loop, and a delivery step that sends the report to your inbox or a doc.
Uses the picker's Email / automation agent stack, with advice specific to this use case.
Recommended stack
Model
- OpenAI GPT-6 Luna: ~$0.10 in / $0.50 out per 1M tokens (verified 2026-11-22)
- Anthropic Claude Sonnet 5.5: ~$2 in / $10 out per 1M tokens (verified 2026-11-22 on anthropic.com/pricing)
Framework
- OpenAI Agents SDK: Free, open source; pay for model usage
- LangChain / LangGraph: Open source (free); LangSmith Developer $0 (5k traces/mo), Plus $39/seat/mo (verified 2026-11-15)
Hosting
No-code alternative
- n8n: Community Edition self-host free; Cloud Starter €20/mo, Pro €50/mo billed annually (verified 2026-11-22)
- Zapier: Free 100 tasks/mo; Pro from $19.99/mo billed annually ($29.99 monthly) for 750 tasks (verified 2026-11-15)
- Make: Free 1,000 credits/mo; Core from $9/mo for 10,000 credits (verified 2026-11-15)
Rough monthly cost
$0–25/mo (n8n self-host or Zapier/Make tier + tokens)Approximate. Tool prices checked 2026-11-15.Difficulty
Beginner (no-code) / Intermediate (code)Some links may be affiliate links. Disclosure
Why this stack
- Built-in web search tools save you from running your own scraper. OpenAI's web search tool costs $10 per 1,000 calls, plus the retrieved search content billed as tokens at the model's rates; Gemini 3 and newer models include 5,000 Grounding with Google Search requests a month, then $14 per 1,000 (OpenAI and Gemini API pricing pages, checked 22 Nov 2026).
- Use two models: a cheap one such as GPT-6 Luna (about $0.10 in / $0.50 out per 1M tokens) to summarise each page into notes, and a stronger one such as Claude Sonnet 5.5 or GPT-6.1 Sol (both about $2 in / $10 out) to plan the searches and write the final report. GPT-6.2 Sol, released 17 Nov 2026 at the same $2 / $10, is OpenAI's new option for everyday agent work (checked 22 Nov 2026).
- The OpenAI Agents SDK or LangGraph handle the plan, search, read, write loop in code. Without code, n8n's AI Agent node can run the same loop on a schedule and email the result; self-hosted n8n Community Edition is free.
- Old tutorials may use OpenAI's o3-deep-research or o4-mini-deep-research models. OpenAI deprecated both, with shutdown scheduled for 23 July 2026 (OpenAI API changelog), so start from a current model with web search instead.
Step-by-step
- Pick one question you research again and again, and write a report template: the sections, the length, and what counts as a good source (official docs, filings, primary data).
- Prototype in a single call: a model with web search turned on, asked to answer with a source link after every claim. Open the links and check them yourself.
- Turn it into a loop: plan three to five sub-questions, search each one, summarise each page into short notes with its URL using the cheap model, then have the stronger model write the report from those notes only.
- Set a budget per run: a maximum number of searches, pages and tokens. Log the cost of every report so you know what one costs.
- Schedule it (weekly with n8n or a cron job) and deliver the report by email or to a doc. Spot-check the citations on every report for the first few weeks.
Common pitfalls
- Citations can be wrong. A model may link a page that doesn't say what it claims, so check every number and quote against its source before you act on it.
- Web pages are untrusted input and can contain hidden instructions. Don't give a research agent tools that send emails, post, buy or delete; let it read and write a report only.
- Agent loops can run dozens of searches per report. At $10 per 1,000 calls (OpenAI) or $14 per 1,000 after the free monthly quota (Gemini), plus the retrieved content tokens, set hard limits.
- Respect each site's terms and paywalls. Don't feed the agent pages behind your logins unless you are allowed to use them this way.
- Search results go stale. Ask the agent to record each source's publication date and to say when it couldn't find recent information.
FAQ
How much does an AI research report cost?
It depends on how many searches and tokens each report uses. For example, 20 OpenAI web search calls cost $0.20 in tool fees, plus model tokens for the retrieved content, the page notes and the final report. With Gemini 3 and newer models, the first 5,000 Google Search grounding requests each month are free (checked 22 Nov 2026).
Can I build a research agent without coding?
Yes. In n8n, a schedule trigger, an AI Agent node with a web search or HTTP tool, and an email node can produce a weekly cited report. Keep a person reading the report before anyone acts on it.
What's the difference between a research agent and RAG?
RAG answers questions from your own documents, which you index in advance. A research agent searches the open web at run time. You can combine them: research the web, then save the notes into your RAG index.
Try it in the picker: AI research agent that writes reports · Deep research on my competitors · Weekly market research report
Customise this stack in the picker →Related stacks
- Build an AI email and automation agent (Email / automation agent)
- Build an AI browser agent or web scraper (AI browser agent & web scraper)
- Build a docs Q&A (RAG) app (RAG / docs Q&A)
Last updated 2026-11-22.