Laravel AI Chat With Telegram Bot: an AI assistant for any Laravel site

A Composer package that adds an AI assistant chat to a site with one line of Blade. The AI answers customers, calls your PHP code as tools, and when it can't help, hands the conversation to a live admin in Telegram.

TypeOpen-source Composer package
StackPHP 8.3, Laravel 11–13, OpenAI, Anthropic, Telegram Bot API
LicenseMIT
Year2026
Laravel AI Chat With Telegram Bot

Task and solution

Small site owners get the same questions from customers over and over and can't answer around the clock. Hosted chat services mean another subscription, someone else's server and an AI that doesn't know the site's real data: stock, prices, orders.

The goal was a solution that installs into the Laravel project itself, works with its data and never leaves a customer without an answer when the AI can't cope.

  • Chat widget added with one @include, no JavaScript build step on the host site
  • OpenAI and Anthropic out of the box, any other provider by implementing one interface
  • Function calling: the AI calls your PHP code — product search, order status, stock
  • Full conversation history in the database, for logged-in users and anonymous visitors
  • Human handoff: customer messages go to an admin in Telegram, replies come back to the widget
  • 10+ color themes, every option configurable via .env
  • Pest tests, published on Packagist under the MIT license

The package in numbers

1line of Blade to install
2LLM providers out of the box
3Laravel versions: 11, 12, 13
11widget color themes

Want the same result?

Tell me about your task or estimate the cost in the calculator.

Assistant
Online now