News

Laravel Converse and Agent Kit for Chat Bots and AI Agents

Published
Laravel Converse and Agent Kit for Chat Bots and AI Agents image

The Laravel team just published documentation for two new first-party AI tools: Laravel Converse, a package for building chat bots, and Agent Kit, a starter kit for building AI agents.

Laravel Converse

Converse gives you one API for chat bots that work in Slack, Telegram, GitHub, and your own application's web pages. You write the bot once, and Converse handles each platform's webhooks, threads, and message formats.

You can install it with Composer and then run the install command:

composer require laravel/converse

php artisan converse:install

You register bots in routes/bot.php. Here is an example from the docs:

use App\Ai\Agents\SupportAgent;
use App\Bots\DeployBot;
use Laravel\Converse\Facades\Converse;

Converse::agent('support', SupportAgent::class)
    ->connection('slack', 'telegram');

Converse::bot('deploy', DeployBot::class)
    ->connection('slack');

The support bot answers messages with an AI agent built on the Laravel AI SDK, and it listens on Slack and Telegram. The deploy bot answers with a PHP handler class you write, which the docs recommend for predictable commands like /deploy.

Some of the features include:

  • converse:chat to talk to a bot from your terminal
  • converse:setup to connect a bot to Slack, Telegram, or GitHub
  • Web chat with a Chat component for React and Vue
  • Tool approvals and scheduled turns for agents
  • Cards with buttons and menus

Converse requires PHP 8.4 or higher. It processes messages on your queue, and your bots only reply while a queue worker is running.

Agent Kit

Agent Kit is a starter kit for a new agent project. It comes with the AI SDK, Converse, Laravel MCP, and Laravel Boost already installed, and conversation memory, webhook routing, and queue processing are configured for you.

You create a new application with one command:

composer create-project laravel/agent-kit my-agent

A new application starts with an Assistant agent in app/Ai/Agents, uses OpenAI by default, and includes Pest's evals plugin for grading your agent's answers. The docs walk through building a weather agent, chatting with it in the terminal, and connecting it to Slack.

Agent Kit doesn't include a web frontend or user authentication. If you want users to chat with an agent on your own pages, the docs recommend starting from one of Laravel's full-stack starter kits and adding the AI SDK and Converse.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Filed in

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
Test Tool Approval Flows in the Laravel AI SDK image

Test Tool Approval Flows in the Laravel AI SDK

Read article
Cutting Laravel News' Laravel Cloud Bill Nearly in Half image

Cutting Laravel News' Laravel Cloud Bill Nearly in Half

Read article
Inertia UI Notifications: Toasts and a Laravel Inbox image

Inertia UI Notifications: Toasts and a Laravel Inbox

Read article
Laravel AutoBuilder: Build Visual Automation Workflows image

Laravel AutoBuilder: Build Visual Automation Workflows

Read article
Pun: Format, Lint, and Analyze PHP With One Rust Binary image

Pun: Format, Lint, and Analyze PHP With One Rust Binary

Read article
Form Request Model Lookups and PHP 8.6 Support in Laravel 13.44 image

Form Request Model Lookups and PHP 8.6 Support in Laravel 13.44

Read article