DEV Community

Med Marrouchi
Med Marrouchi

Posted on

Deploy an AI Chatbot on Your NextJS Website using FREE tools

Building an AI agent is easy to demo.

Shipping one to a real website, with your own knowledge and a working deployment, is the part that matters.

In this tutorial, you’ll see how to build a free customer support AI agent using a practical stack:

  • Hexabot for the chatbot workflow
  • OpenRouter as the LLM provider
  • Railway for hosting and Postgres
  • RAG to make the bot answer from your own website content
  • A chat widget to embed the agent on your site

The project starts locally with Node.js and the Hexabot CLI. From there, the support workflow is built visually and connected to an AI model through OpenRouter, which makes it easy to experiment with free LLMs without setting up a paid provider first.

The tutorial also uses Claude Code over MCP to help build and fix the chatbot workflow, showing how coding agents can speed up the development process instead of only being used inside the final product.

Once the bot works locally, the project is pushed to GitHub and deployed on Railway with a free Postgres database. This turns the chatbot from a local experiment into something accessible online.

The most important part is RAG. The bot ingests your own website content, then uses that knowledge to answer customer questions with more relevant responses instead of relying only on the model’s general knowledge.

The full flow looks like this:

→ Install Hexabot
→ Connect OpenRouter as the LLM provider
→ Build the support workflow
→ Add RAG from your website content
→ Deploy on Railway with Postgres
→ Embed the chat widget on your website
Enter fullscreen mode Exit fullscreen mode

This is an end-to-end path from zero to a working customer support AI agent running on a live website, using free tools and no credit card.

Top comments (0)