n8n AI agent token cost: per workflow and per month
Short answer: n8n AI Agent burns about 45K input tokens (50% cached) and 2,500 output tokens per typical task, so one task costs $0.0712 on Grok 4.7. At 500 tasks a month that is $35.62; without caching the same task would cost $0.1050. Evidence: measured.
Cost per task, three price points
One row per scenario from our tool data. The three price columns price the identical token counts on the cheapest, mid and premium reference models, so the difference is the model rate, not the workload.
| Scenario | Input tokens | Cached input | Output tokens | Cheapest current model | Mid-tier reference model | Premium reference model |
|---|---|---|---|---|---|---|
| Light task one short request with a small context and one or two tool calls | 10K | 30% | 800 | $0.00113 | $0.0203 | $0.2260 |
| Typical task one coding or agent task with several tool calls and a medium context | 45K | 50% | 2,500 | $0.00373 | $0.0712 | $0.7450 |
| Heavy session a multi-turn agent session with a large repo or long history; input counts all tokens re-sent across turns | 150K | 60% | 6K | $0.0099 | $0.2010 | $1.98 |
Rates: input $2 / cached $0.5 / output $6 per 1M on Grok 4.7. Prices checked 2026-11-18.
Monthly budget
| Scenario at 500 tasks / month | Cheapest current model | Mid-tier reference model | Premium reference model |
|---|---|---|---|
| Light task | $0.5650 | $10.15 | $113 |
| Typical task | $1.86 | $35.62 | $372 |
| Heavy session | $4.95 | $100 | $990 |
At 500 tasks a month, one task at the typical size costs $0.0712 on Grok 4.7, so $100 covers about 1404 tasks. The same budget buys 134 tasks on the premium reference and 26846 on the cheapest one.
Server-rendered from the typical task on Grok 4.7 at 500 tasks a month. Change a field to recalculate; nothing is sent anywhere and the formula is the one under Method.
Where the tokens go
- 45K input tokens, 50% of them cached. In n8n (and LangChain-style agents), every tool result is appended to the agent context, so a large RAG or HTTP response can dominate the bill, and each additional tool-call iteration resends the whole context. Memory nodes, system prompts and schema text add a fixed overhead to every request. of the input is the tool's prompt, tool schema and history; the cached share is what the provider can reuse on the next step without re-reading it at the full rate.
- 2,500 output tokens — 18.0× fewer tokens than the input. The answer is short relative to the context the tool sends with it, which is the normal shape for an agent step.
- Output is 5% of the token count but 21% of the bill on Grok 4.7. Output is priced higher than input, so the visible answer still matters even when most tokens are input.
- Per 1,000 tasks: $71.25. That is the number to put in a budget line, not the per-token rate: 1,000 tasks at the typical size cost $71.25 on Grok 4.7 and $745 on GPT-6 Cyber.
- At 500 tasks a month: $35.62 on Grok 4.7 and $372 on GPT-6 Cyber. The premium reference is 10.5× the mid-tier bill; the cheapest reference is $1.86.
The provider basis behind these numbers
A published n8n debugging case (Classmethod, 2025-12-17) measured an AI Agent context breakdown of 2,000 tokens of system prompt, 3,000 of conversation history, 20,000 of tool/RAG results and 100 for the user question - about 25k input per agent request, with tool results fed back into every later request. The tiers scale that measured per-request cost to 1 step (light), 2-3 steps with tool results (typical) and a multi-turn chatflow with memory (session).
What caching is worth here
Our data does not assume a cached prefix for this tool (50% cached share), so the task price above is already the uncached input price. If the tool does repeat a stable prefix, adding it to the provider cache cuts the input side to $0.5 per 1M on Grok 4.7.
How to reduce it
- Pre-process large tool results in a Code or HTTP node and pass only the extracted fields to the AI Agent.
- Keep the system prompt and tool descriptions short; they are resent on every step.
- Prefer workflow steps over tools for operations that always run or return large payloads.
- Clear or summarize chat memory between unrelated conversations.
Each tip changes a different part of the formula: caching changes the input rate, trimming history changes the input count, and routing simple steps to a cheaper model changes the rate for part of the work.
Sources and evidence
| Source | Read on | What it establishes |
|---|---|---|
| dev.classmethod.jp | 2026-11-04 | Measured n8n AI Agent token breakdown (system prompt, history, tool result) and the workflow change that cut token use. |
| docs.n8n.io | 2026-11-04 | Official n8n AI Agent node documentation: tools, memory and agent architecture. |
Evidence label: Measured
A published n8n debugging case (Classmethod, 2025-12-17) measured an AI Agent context breakdown of 2,000 tokens of system prompt, 3,000 of conversation history, 20,000 of tool/RAG results and 100 for the user question - about 25k input per agent request, with tool results fed back into every later request. The tiers scale that measured per-request cost to 1 step (light), 2-3 steps with tool results (typical) and a multi-turn chatflow with memory (session).
Method
The formula
Cost per task = (uncached input × input rate + cached input × cached rate + output × output rate) ÷ 1,000,000. Rates are the standard list prices in the price table (checked 2026-11-18); token counts come from src/tools.json (tool data reviewed 2026-11-05).
Why three reference models
The columns are the cheapest, median and most expensive current models by the cost of one typical agent task, named above so you can check each rate. They are a range, not a prediction of which model n8n AI Agent uses.
What the monthly figure assumes
500 tasks a month (the tasks-per-month field in our tool data), the same count for every scenario, at the standard rate with no batch discount. A heavy session can count as several tasks, so replace the number with your own before you put it in a budget.
Official links
Related skills & plugins
Other entries in the Workflow automation category. Each name links to its token-cost page or its official site.
- LangChain agent — Open-source agent framework that rebuilds prompt context on every step. ($0.0558 per task, Estimated)
- Dify — Open-source LLM app platform with per-node workflow token logs. ($0.0489 per task, Estimated)
- Zapier Agents — Zapier's AI agents, billed per activity instead of per token. ($0.0400 per task, Estimated)
- All skills, plugins and MCP token costs
Related models
The three reference models in the cost table, with their full price tiers.
- GPT-6 Luna — $0.1 input / $0.5 output per 1M tokens, $0.00373 per typical task in the table above
- Grok 4.7 — $2 input / $6 output per 1M tokens, $0.0712 per typical task in the table above
- GPT-6 Cyber — $20 input / $100 output per 1M tokens, $0.7450 per typical task in the table above
More
- Benchmark comparison: price vs performance
- Best LLM for coding in 2026
- Find a model for your use case
- Compare two to four models on price
Related
- All skills, plugins and MCP token costs
- Best LLM for coding in 2026
- Find a model for your use case
- Token cost calculator
- Compare two models on price
- Claude Code token cost
- OpenAI Codex CLI token cost
Questions
How much does n8n AI Agent cost per task?
One typical task costs $0.0712 on Grok 4.7, $0.00373 on the cheapest reference model (GPT-6 Luna) and $0.7450 on the premium reference (GPT-6 Cyber). The spread is the model rate: the token counts are identical in all three columns.
What does n8n AI Agent cost per month at 500 tasks?
$35.62 a month on Grok 4.7 at the typical task size. Without the 50% cached input assumption it would be $52.50. Per 1,000 tasks the token bill is $71.25.
Why does n8n AI Agent use so many input tokens?
In n8n (and LangChain-style agents), every tool result is appended to the agent context, so a large RAG or HTTP response can dominate the bill, and each additional tool-call iteration resends the whole context. Memory nodes, system prompts and schema text add a fixed overhead to every request. The token shape is 45K input tokens (50% cached) against 2,500 output per typical task; input is resent every step, output is not.
Are the n8n AI Agent token numbers measured or estimated?
The evidence label is "Measured". A published n8n debugging case (Classmethod, 2025-12-17) measured an AI Agent context breakdown of 2,000 tokens of system prompt, 3,000 of conversation history, 20,000 of tool/RAG results and 100 for the user question - about 25k input per agent request, with tool results fed back into every later request. The tiers scale that measured per-request cost to 1 step (light), 2-3 steps with tool results (typical) and a multi-turn chatflow with memory (session). Sources and read dates are in the table above; if a number is an estimate, the basis says what it assumes, and it is never described as a measurement.
Next step → See every tool cost side by side
Price data last checked 2026-11-18 against official sources · how we verify
Price-change alerts
One short email when a provider changes a price or a promo ends. No spam, unsubscribe any time.