Optimize my workflow time

I am using this workflow to receive message and audio from my site, then use then to generate a response and send back to my site. But if i ask something like:“Do a resume of all the archives you have” the response takes 20 or more seconds and i want to reduce this time.

Information on your n8n setup

  • n8n version:1.91.2
  • Database (default: SQLite):SQL,supabase
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):n8n cloud
  • Operating system: windows 11 pro

Hi i know what you want to do because i also have tried to optimize it and nothing you cant do because it will depends how much token you generate each request, you can analize which node generate the most latency

This following guide will help you with openAI Latency optimization knowledge https://platform.openai.com/docs/guides/latency-optimization

1 Like

Captura de tela 2025-05-15 081010

I need to use memory to response and basically all the time is importing memory from postgres, and using the memory to formulate my response, i dont know how to solve this but i will try, thanks.

What about your AI Agent node latency? because you said it can take 20s so i guess OpenAI not produce the longest latency


The first is my agent, and the second the conversion to audio for my site using OpenAI node.

Make sure you use GPT 4o-mini as the model. It responds a lot faster

I’m already using it

yeah thats the problem, but the other topics is someone point to AI Agent has some bug and i dont know if it already fix or not for now

I think you could try Redis if the delay is caused by the database. It’s faster than Postgres for in-memory operations.

1 Like

according OpenAI, GPT 4.1 Nano is the fastest models for now

I will try the suggestions above, and try to make the audio start playing in site when start to generate. thanks everyone.