
Laravel is expanding its AI development ecosystem. On December 1, 2026, the Laravel team introduced Laravel Agent Kit and Laravel Converse, giving PHP developers a more integrated way to build AI agents that can communicate through Slack, Telegram, GitHub and web applications.
Instead of manually building every webhook, conversation handler and chat integration, developers can use Laravel's AI tools and conventions to assemble an agent application.
In this tutorial, we will explore the architecture, create an agent, add a custom tool, connect a chat platform, understand MCP integration, evaluate responses and prepare the application for deployment.
Table of Contents
- What Are Laravel Agent Kit and Laravel Converse?
- Why Is This Important for PHP Developers?
- Laravel Agent Kit Architecture
- Step 1: Create a Laravel Agent Kit Application
- Step 2: Configure Your AI Provider
- Step 3: Understand the Agent Kit Project Structure
- Step 4: Understand the Assistant Agent
- Step 5: Create a Custom AI Tool
- Step 6: Register the Tool with the Agent
- Step 7: Test the Agent from the Terminal
- Step 8: Connect the Agent to Slack
- Step 9: Connect Telegram and GitHub
- Step 10: Understand MCP Integration
- Step 11: Evaluate AI Agent Responses
- Step 12: Deploy the Agent Application
- Laravel Agent Kit vs Building an AI Agent Manually
- Good Practices for Laravel AI Agents
- Common Mistakes to Avoid
- Frequently Asked Questions
- Conclusion
- Suggested Internal Links
- Official Sources and Further Reading
What Are Laravel Agent Kit and Laravel Converse?
Laravel Agent Kit is a starter kit for building AI agents. It brings together the Laravel AI SDK, Laravel Converse, Laravel MCP and Laravel Boost in a ready-to-use Laravel application.
Laravel Converse is the package that connects agents to chat platforms. It handles platform-specific webhooks, message formats, threads and conversation storage.
The important distinction is that Agent Kit helps you start an agent application, while Converse helps people communicate with agents through supported platforms.
Laravel AI ecosystem components
| Component | Main responsibility | When to use it |
|---|---|---|
| Laravel AI SDK | Agents, prompts and tool execution across supported AI providers | When adding AI capabilities to a Laravel application |
| Laravel Converse | Chat-platform communication, threads and webhooks | When users need to communicate with agents |
| Laravel MCP | Connects applications and agents to MCP servers and tools | When agents need external capabilities |
| Laravel Boost | Provides Laravel-specific guidance for coding agents | When developing with AI coding assistants |
| Laravel Agent Kit | Combines the ecosystem in a starter application | When starting a new AI-agent project |
These components can also be used independently. You do not have to adopt Agent Kit to use Converse or the Laravel AI SDK.
Why Is This Important for PHP Developers?
Building an AI chatbot is relatively straightforward. Building an agent that can safely interact with real systems is more complicated.
A production agent may need:
- Conversation history and thread management.
- Tool calling and external API access.
- Authentication and authorization.
- Queue processing for slow AI requests.
- Platform-specific webhook handling.
- Human approval before sensitive operations.
- Automated evaluations of agent responses.
Laravel's new agent stack provides integrated building blocks for these concerns. It does not remove the need to design permissions, monitor costs or validate AI-generated actions.
Laravel Agent Kit Architecture
A typical request moves through the following components:
- A user sends a message through Slack, Telegram, GitHub or a web chat.
- Laravel Converse receives the platform webhook.
- The message is processed through the Laravel queue.
- The configured AI agent receives the message and conversation context.
- The model may request one or more available tools.
- The application executes authorized tools and returns their results.
- The agent generates a response.
- Converse sends the response through the original platform.
MCP can provide additional external tools, while the AI SDK remains responsible for the agent and model interaction.
Step 1: Create a Laravel Agent Kit Application
According to the official documentation, Agent Kit requires PHP 8.4 or higher. Create a new application using Composer:
The starter kit installs dependencies, creates the environment file and SQLite database, generates an application key, runs migrations and installs Laravel Boost guidance for supported coding agents.
Enter the project directory:
Step 2: Configure Your AI Provider
A new Agent Kit application uses OpenAI by default. Add your provider credential to the environment file:
Never commit real API keys to Git. Use your deployment platform's secret-management facilities in production.
The Laravel AI SDK supports multiple providers. For example, if you configure Anthropic instead, add the appropriate key and select the provider in the AI SDK configuration.
Step 3: Understand the Agent Kit Project Structure
Agent Kit follows Laravel conventions and adds a few AI-specific directories:
app/Ai/Agentscontains agent classes.app/Ai/Toolscontains custom tools.routes/bot.phpregisters bots and their connections.config/mcp.phpconfigures MCP clients.tests/Evalscontains agent evaluation tests.
Step 4: Understand the Assistant Agent
The starter application includes an Assistant agent. It uses Laravel AI SDK contracts and the Promptable trait.
Its instructions define the agent's role and behavior. Its tools method determines which tools are available to the model.
The following is a simplified example based on the documented Agent Kit structure:
This example demonstrates the documented contracts and traits. Keep the generated starter-kit implementation as your starting point and adapt its existing class rather than replacing unrelated project code.
Step 5: Create a Custom AI Tool
An agent becomes more useful when it can retrieve real information instead of relying only on its model's training data.
Laravel Agent Kit supports Artisan tool generation. Let's create a weather tool as a practical example.
The generated tool defines three important methods:
description()explains what the tool does.schema()defines the arguments the model may provide.handle()executes the actual application logic.
Replace the generated tool implementation with the following documentation-based example:
This example uses Open-Meteo's public geocoding and forecast endpoints. It does not require an API key for the demonstrated requests. For production use, add HTTP timeouts, response validation, error handling, rate limits and caching.
Step 6: Register the Tool with the Agent
Import the tool class and return an instance from the Assistant's tools method:
Now the model can request the weather tool with a city argument. The application executes the tool and makes its result available to the agent.
Step 7: Test the Agent from the Terminal
You do not need to configure Slack or Telegram before testing your first agent.
Use Converse's terminal chat command:
Try a prompt such as:
The agent should use the weather tool and answer using the returned data. If it does not, inspect the provider configuration, tool registration, network connectivity and application logs.
Step 8: Connect the Agent to Slack
Converse can connect a bot to supported platforms. Register your bot in routes/bot.php.
For example, a bot named weather can listen to Slack:
Verify the registration:
Then run the Slack setup command:
The setup process guides you through creating the Slack app, configuring credentials and pointing its webhook to your Laravel application.
The application needs a publicly reachable HTTPS URL for Slack webhook verification. A local development server by itself is not publicly accessible. Use a secure tunnel for development or deploy to a public HTTPS environment.
Step 9: Connect Telegram and GitHub
Converse also supports Telegram and GitHub connections. You can register multiple connections on the same bot:
Run the setup command for each platform you want to connect:
Each platform has its own credential and webhook requirements. Configure only the permissions your bot needs. For GitHub integrations, review the app or token permissions before granting access to repositories.
Step 10: Understand MCP Integration
Model Context Protocol, commonly called MCP, provides a standard way for AI applications to connect to external tools and resources.
Laravel Agent Kit includes MCP configuration and example clients for GitHub, Linear and Playwright. This allows developers to expose external capabilities to their agents without manually implementing every integration.
For example, the documented Agent Kit pattern uses the Laravel MCP facade to retrieve tools from a configured GitHub client:
Configure the GitHub token required by the example client in your environment:
The exact available tools depend on the MCP server and its configuration. Do not assume that every MCP server exposes the same capabilities.
Step 11: Evaluate AI Agent Responses
A successful API response does not prove that an AI agent is reliable. Agents can misunderstand instructions, choose the wrong tool or produce unsupported answers.
Agent Kit includes Pest evaluation support. Evaluations send prompts to the agent and ask a model to grade whether the answer meets a defined requirement.
A simple evaluation example from the official documentation looks like this:
Run the evaluation suite using:
Important: evaluations make real AI provider requests and can incur API costs. The evaluator may also use a separate model for scoring. Keep evaluation datasets focused and review results rather than relying only on an automated score.
Step 12: Deploy the Agent Application
Converse processes platform messages through Laravel's queue system. A running queue worker is therefore essential for responding to incoming messages.
Before deploying, check the following:
- Configure a production database.
- Set AI provider credentials securely.
- Configure a queue connection and worker.
- Set up public HTTPS access for webhooks.
- Configure platform credentials and webhook URLs.
- Check logs, failed jobs and provider errors.
- Test authentication and authorization for every tool.
For a local environment, the documented development command can start the application and worker together:
For production, use your hosting platform's process manager or managed queue worker. Laravel Cloud is one documented deployment option, but Agent Kit remains a Laravel application and can run on other suitable Laravel hosting environments.
Laravel Agent Kit vs Building an AI Agent Manually
| Area | Agent Kit approach | Manual approach |
|---|---|---|
| Initial project | Starter application with integrations configured | Set up each package and configuration |
| Agent definition | Laravel AI SDK conventions | Choose and implement an agent architecture |
| Chat platforms | Converse integrations | Build webhook handlers and platform adapters |
| MCP | Laravel MCP included in the starter | Configure MCP separately |
| Evaluations | Pest evaluation setup included | Build an evaluation workflow |
| Customization | Normal Laravel application structure | Full control over architecture |
Agent Kit reduces setup work, but it does not automatically make an agent production-ready. Manual implementation may still be appropriate when a project has unusual security, infrastructure or integration requirements.
Good Practices for Laravel AI Agents
- Give each agent a clear purpose and limited responsibilities.
- Define tool schemas carefully and validate arguments.
- Use authorization checks inside tools, not only in prompts.
- Require human approval for irreversible or sensitive operations.
- Use queues for slow provider requests and external integrations.
- Set timeouts, retries and rate limits for external APIs.
- Evaluate agent behavior using realistic prompts.
- Track model usage and provider costs.
- Keep secrets out of source control and logs.
Common Mistakes to Avoid
- Assuming an AI agent can safely perform every tool action without authorization.
- Forgetting to run a queue worker.
- Using an inaccessible local URL for a platform webhook.
- Giving a GitHub integration broader permissions than necessary.
- Assuming an MCP server has tools that have not been configured.
- Running expensive evaluations without understanding provider usage.
- Putting all business logic inside one enormous agent class.
- Trusting an AI response as proof that an external operation succeeded.
Frequently Asked Questions
What is Laravel Agent Kit?
Laravel Agent Kit is a starter kit for creating AI-agent applications. It combines the Laravel AI SDK, Converse, MCP and Boost with an initial agent, tool structure, bot routes and evaluation setup.
What is Laravel Converse used for?
Laravel Converse connects AI agents to supported chat platforms such as Slack, Telegram and GitHub, as well as web chat. It handles platform-specific messaging, webhooks and conversation threads.
Does Laravel Agent Kit require PHP 8.6?
No. The official Agent Kit documentation specifies PHP 8.4 or higher. Check the current package and dependency requirements before installing it.
Can I use Laravel Agent Kit with an existing Laravel application?
Agent Kit is intended as a starter application for new agent projects. Existing Laravel applications can instead add the AI SDK and Converse packages independently.
Does Agent Kit include a web frontend?
The Agent Kit starter does not include a web frontend or user authentication. For an application-specific web chat, use a Laravel full-stack starter kit and integrate the AI SDK and Converse web-chat functionality.
Can Laravel AI agents use MCP tools?
Yes. Laravel MCP can connect an agent to configured MCP servers. The available tools depend on the configured server and its permissions.
Does Laravel Converse need a queue worker?
Yes. Converse processes chat-platform and web-chat messages through the application's queue. A running worker is required for agents to respond.
Can one Laravel agent connect to multiple chat platforms?
Yes. Converse allows a bot to register multiple supported connections, subject to each platform's credentials and setup requirements.
Conclusion
Laravel Agent Kit and Converse represent an important addition to the PHP AI ecosystem. They give developers a more integrated starting point for building agents that can communicate with teams, use tools and connect to external services.
The most useful way to explore the stack is to start with one small agent, add one carefully scoped tool, test it in the terminal, and then connect a chat platform. Once that works, add MCP integrations, evaluations, approval flows and production monitoring.
AI agents should not be treated as ordinary chatbots with unrestricted access to application data. Their tools, permissions and side effects need the same engineering discipline as any other backend integration.
Have you started building AI agents with Laravel? Share your experience with Agent Kit, Converse or MCP and tell us which integration you are building next.
Suggested Internal Links
- Laravel AI SDK Tutorial: Build AI Agents with PHP
- Laravel MCP Server and Client Integration Guide
- How to Build an AI Agent with Tool Calling
- Laravel Queue Jobs and Redis: Complete Guide
- Laravel 13 Development and Upgrade Guide
- RAG vs Agentic RAG: Architecture and Practical Examples
Use these as suggested anchor texts only. Link them to matching existing Web-Beast articles after checking the published URLs. Do not create links to pages that do not exist.
Official Sources and Further Reading
- Introducing Laravel Converse and Agent Kit — Laravel Blog, December 1, 2026.
- Laravel Agent Kit Documentation — official Laravel documentation, accessed December 4, 2026.
- Laravel Converse Documentation — official Laravel documentation, accessed December 4, 2026.
- Laravel Open Source Changelog — November 2026 updates.
- Introducing Laravel Rust — Laravel Blog, December 1, 2026.
- Laravel Blog — release announcements and engineering articles.
