Getting an AI agent to answer a question is the easy part. Putting it in front of your team is harder. You need a webhook handler for each chat platform, thread handling that works differently in Slack, Telegram and GitHub, somewhere to store conversation history, and a queue so slow replies don’t time out.
Laravel Converse, released on 1 December 2026 (with v1.1.0 following on 4 December), is Laravel’s first-party answer to that problem. It connects agents built with the Laravel AI SDK to Slack, Telegram, GitHub and your own web pages through one API. This tutorial walks through installing it, registering a bot, testing it from the terminal, adding tool approvals and scheduled turns, and writing a test. Everything here follows the official Converse documentation and the launch post.
Where Converse fits in the Laravel agent stack
Laravel now has a first-party package for each part of building an agent:
- Laravel AI SDK – one API for agents and tools across OpenAI, Anthropic, Gemini and others.
- Laravel Converse – puts those agents in Slack, Telegram, GitHub and web chat.
- Laravel MCP – connects your app to MCP clients and servers.
- Laravel Boost – helps coding agents write idiomatic Laravel.
- Agent Kit – a starter kit with all four already wired together.
If you already have a Laravel app, add Converse to it. If you’re starting a new agent from scratch, Agent Kit is the quicker route:
composer create-project laravel/agent-kit my-agent
Installing Converse
Converse requires PHP 8.4 or higher.
composer require laravel/converse
php artisan converse:install
The installer publishes config/converse.php, routes/bot.php and the Converse and AI SDK migrations. It also generates an Assistant agent in app/Ai/Agents and registers it as the assistant bot. It asks whether you plan to build a web chat. If you say yes and your app uses Inertia with React or Vue, it scaffolds a chat page too.
The generated agent uses the AI SDK’s default provider, so add your key (for example OPENAI_API_KEY) to .env.
One thing to remember: Converse processes messages on your queue. Your bots only reply while a queue worker is running:
php artisan queue:work
Registering a bot
Bots live in routes/bot.php. An agent bot answers messages with an AI agent. A handler bot answers with a plain PHP class, which is useful for predictable commands like /deploy.
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');
You can generate either kind with Artisan:
php artisan make:bot SupportAgent --agent
php artisan make:bot DeployBot
An agent that answers bot messages should use the AI SDK’s RemembersConversations trait, so it keeps earlier messages from each thread. make:bot --agent applies the trait for you.
To check what’s registered, run php artisan converse:list.
Passing the current user to your agent
Web turns run on the queue, where nobody is logged in, so auth()->user() returns null inside your agent. Instead, accept the chat’s owner as $participant and pass it in. Your tools can then limit queries to that user’s records:
use App\Ai\Agents\Assistant;
use App\Models\User;
use Laravel\Converse\Facades\Converse;
Converse::agent('assistant', fn (?User $participant) => new Assistant($participant))
->connection('web');
Chat from the terminal before connecting anything
You don’t need a Slack workspace to start. Terminal chat runs synchronously, so it needs no platform, no deployment and no queue worker. For agent bots it also prints every tool call:
php artisan converse:chat support
php artisan converse:chat support --user=1 # chat as a specific app user
Type /help for built-in commands and exit to leave. The command prints the thread ID, so you can resume later with --thread.
Connecting Slack, Telegram or GitHub
Once the bot behaves, connect a platform:
php artisan converse:setup slack
This writes the credentials to your local .env and points the platform at your bot’s webhook. Each bot receives webhooks at:
{APP_URL}/converse/{bot}/{connection}
So the support bot gets Slack events at /converse/support/slack. Converse verifies and acknowledges each webhook immediately, then does the work on the queue. A connection that isn’t registered on the bot returns a 404, including the platform’s verification request. Register the bot on the connection before you configure the platform.
Every platform needs a public HTTPS URL. Locally, use a tunnel such as Laravel Herd, Expose or ngrok. If you set up against a deployed URL, copy the generated variables into production too.
Built-in tools and tool approvals
Converse gives agent bots built-in tools grouped by capability. threadContext (read history, look up users, download attachments), reactions and subscriptions are on by default. messaging and cards are off until you return them from your agent’s tools() method.
Approvals are the safety feature to understand early. When an agent calls a tool that requires approval, Converse pauses the turn and posts a card with Approve and Reject buttons. Only the user who started the turn can answer. On platforms without buttons, such as GitHub, users reply with words like “yes” or “reject”.
use Laravel\Converse\Ai\Tools\SendMessage;
use Laravel\Converse\Facades\Converse;
public function tools(): iterable
{
return [
...Converse::tools()->messaging()->requireApproval(SendMessage::class),
];
}
Your own AI SDK tools that require approval work automatically. Pending approvals expire after one hour by default. You can change that with approval_ttl (in seconds) in the turns array of config/converse.php. Tool approvals require an agent that uses RemembersConversations.
Scheduled and prompted turns
An agent bot can post on a schedule, for example a weekday morning summary:
Converse::agent('support', SupportAgent::class)
->connection('slack')
->schedule('Summarize yesterday and flag anything unusual.', 'daily-summary')
->in('slack', '#general')
->weekdays()
->dailyAt('09:00');
If the agent decides there’s nothing worth reporting, Converse sends nothing. Scheduled turns need both the scheduler and a queue worker. Set CONVERSE_SCHEDULES_ENABLED=false locally to switch them off.
You can also trigger a turn from your own code, such as a failed-deployment listener. Pass a key so a retried job doesn’t post twice:
Converse::bot('support')
->thread('slack', '#deployments')
->prompt("Deployment {$deployment->id} failed. Find out why.", key: "deploy-{$deployment->id}");
Production settings worth knowing
- Timeouts: queued turns time out after 60 seconds by default. Raise it with
CONVERSE_TURN_TIMEOUT=180, and keep your queue’sretry_afterhigher than that. - Dedicated queue: set
CONVERSE_QUEUE_CONNECTIONandCONVERSE_QUEUE_NAMEto keep bot work off your main queue. - Locks: Converse locks each thread while it answers, so the cache store must support atomic locks and be shared by all workers.
- Attachments: if workers and web servers run on different machines, store files on shared object storage such as S3.
Testing your bot
Converse::fake() captures outgoing messages so your tests never hit real Slack or Telegram APIs. Use RefreshDatabase and the sync queue driver:
use Laravel\Converse\BotEvents\Message;
use Laravel\Converse\Facades\Converse;
use Laravel\Converse\Thread;
use Laravel\Converse\User;
test('the bot replies to a mention', function () {
$fake = Converse::fake();
Converse::incoming('deploy', Message::make(
new Thread('slack', 'C0123456789'),
'Hello @deploy',
new User('U0000001', name: 'Jane'),
now()->toDateTimeImmutable(),
)->withMention());
$fake->assertSent('Hello, Jane!');
});
Takeaway
Converse removes the dull work of putting an agent into Slack, Telegram, GitHub or a web page: webhooks, threads, history and approvals. Start in the terminal with converse:chat, add approvals to any tool that changes data, and keep a queue worker running. The full docs also cover cards, web chat components for React and Vue, custom drivers and account linking.
