r/n8n•
vojta147

Google Gemini's Implicit Context Caching

Help

Hi everyone,

I’m running a workflow using the AI Agent node with Google Gemini Flash 3.0.

Scenario: I pass a massive "Master Diary" document (currently around 130k tokens) as context in every run. The document is append-only, meaning the beginning is always identical, and it just grows larger over time.

Question: Has anyone successfully managed to get Gemini's Implicit Context Caching working in n8n?

I am not seeing any cache hits yet. I suspect the AI Agent node might be injecting dynamic instructions (tools/memory) at the very beginning of the prompt, which would break the "static prefix" rule required for caching.

I am putting the large context in the System message.

Do I perhaps have to bypass the standard AI Agent node and use a direct http Request instead?

Thanks for any tips!

https://ai.google.dev/gemini-api/docs/caching

Posted Feb 7, 2026, 10:57 PM UTC

54
Loading comments…