Skip to content
NEWError doctor and Watchtower: failed n8n runs explained in plain words, and emailed to you. See what is new

Library / Chatbots & Messaging Bots

Chatbots & Messaging Bots

Build a Custom Chat Agent with LangChain and Gemini

When a chat message is received, a Gemini model with stored conversation history answers it using a prompt that defines the agent's personality.

What it does

👇 Prompt Engineering - Define agent personality and conversation structure in the Construct & Execute LLM Prompt node's template variable - ⚠️ Template must preserve {chat_history} and {input} placeholders for proper LangChain operation

The steps

  1. When chat message received
  2. Google Gemini Chat Model
  3. Store conversation history
  4. Construct & Execute LLM Prompt

Similar automations