workflows.fit
Back to n8n workflows
n8n templateFreeBy John Alejandro SIlva

Create a human-like Evolution API WhatsApp agent with Redis, PostgreSQL and Gemini

🤖 Human-like Evolution API Agent with Redis & PostgreSQL This production-ready template builds a sophisticated AI Agent using Evolution API that mimics human interaction patterns. Unlike standard chatbots that reply ...

DevelopmentData & StorageCore NodesAILangchainN8n-nodes-evolution-api.evolution ApiSetSwitch
Loading interactive preview...

Template notes

🤖 Human-like Evolution API Agent with Redis & PostgreSQL

This production-ready template builds a sophisticated AI Agent using Evolution API that mimics human interaction patterns. Unlike standard chatbots that reply instantly to every incoming message, this workflow uses a Smart Redis Buffering System. It waits for the user to finish typing their full thought (text, audio, or image albums) before processing, creating a natural, conversational flow.

It features a Hybrid Memory Architecture: active conversations are cached in Redis for ultra-low latency, while the complete chat history is securely stored in PostgreSQL. To optimize token usage and maintain long-term coherence, a Context Refiner Agent summarizes the conversation history before the Main AI generates a response.

✨ Key Features

- Human-like Buffering: The agent waits (configurable time) to group consecutive messages, voice notes, and media albums into a single context. This prevents fragmented replies and feels like talking to a real person. - Hybrid Memory: Combines Redis (Hot Cache) for speed and PostgreSQL (Cold Storage) for permanent history. - Context Refinement: A specialized AI step summarizes past interactions, allowing the Main Agent to understand long conversations without exceeding token limits or increasing costs. - Multi-Modal Support: Natively handles text, audio transcription, and image analysis via Evolution API. - Parallel Processing: Manages "typing..." status and session checks in parallel to reduce response latency.

📋 Requirements

To use this workflow, you must configure the Evolution API correctly:

1. Evolution API Instance: You need a running instance of Evolution API. - [Configuration Guide](https://community.n8n.io/t/evolution-api-and-n8n-how-to-configure/96559) 2. N8n Community Node: Install the Evolution API node in your n8n instance. - [n8n-nodes-evolution-api](https://www.npmjs.com/package/n8n-nodes-evolution-api) 3. Database: A PostgreSQL database for chat history and a Redis instance for the buffer/cache. 4. AI Models: API keys for your LLM (OpenAI, Anthropic, or Google Gemini).