Laravel Tackle: AI Coding Agent as Artisan Commands | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    Laravel Tackle: Run an AI Coding Agent Inside Your Laravel Application        On this page       1. [  What Is Laravel Tackle? ](#what-is-laravel-tackle)
2. [  Installation ](#installation)
3. [  Available Agents ](#available-agents)
4. [  Safety Boundaries ](#safety-boundaries)
5. [  Self-Healing Queue Jobs ](#self-healing-queue-jobs)
6. [  MCP Server ](#mcp-server)
7. [  Key Takeaways ](#key-takeaways)

  ![Laravel Tackle: Run an AI Coding Agent Inside Your Laravel Application](https://cdn.msaied.com/573/8f6b08a47a4bf04ae26b9f03d8e2e697.png)

 [  Laravel ](https://msaied.com/articles?category=laravel) [  AI ](https://msaied.com/articles?category=ai)  #Laravel   #AI   #Artisan   #Composer Package   #AI Agent  

 Laravel Tackle: Run an AI Coding Agent Inside Your Laravel Application 
========================================================================

     19 Aug 2026      4 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   What Is Laravel Tackle?  ](#what-is-laravel-tackle)
2. [  02   Installation  ](#installation)
3. [  03   Available Agents  ](#available-agents)
4. [  04   Safety Boundaries  ](#safety-boundaries)
5. [  05   Self-Healing Queue Jobs  ](#self-healing-queue-jobs)
6. [  06   MCP Server  ](#mcp-server)
7. [  07   Key Takeaways  ](#key-takeaways)

 What Is Laravel Tackle?
-----------------------

Laravel Tackle, created by Jordan Dalton, is an AI coding agent that runs as a set of Artisan commands inside your Laravel application. Because it boots with the framework, it has direct access to the tools you already use: route listing, Telescope exceptions, database queries, and Laravel Pint for formatting after edits.

Safety controls — path restrictions, Artisan allowlists, and per-session spend limits — are enforced in PHP code, not in a prompt. The package is built on `laravel/ai` and defaults to Claude, but `AI_CODE_PROVIDER` lets you switch to OpenAI, Gemini, Groq, or a local model via Ollama.

Installation
------------

Tackle requires PHP 8.3 and Laravel 12 or 13.

```bash
composer require jordandalton/laravel-tackle

php artisan vendor:publish --provider="Laravel\Ai\AiServiceProvider"
php artisan vendor:publish --tag="tackle-config"

```

Add your API key to `.env`:

```env
ANTHROPIC_API_KEY=sk-ant-...

```

To use a local Ollama model instead:

```env
AI_CODE_PROVIDER=ollama
AI_CODE_MODEL=deepseek-coder-v2
AI_CODE_PRICE_INPUT=0
AI_CODE_PRICE_OUTPUT=0

```

> **Tip:** Commit or stash your work before the first session. The agent edits files in place unless worktree mode is enabled.

Available Agents
----------------

Tackle ships several focused agents:

- **`ai:code`** — interactive REPL with plan mode, slash commands, image attachments, and persistent history
- **`ai:run`** — non-interactive, single-task execution with `--output=json` for pipelines
- **`ai:fix`** — targeted fix from a pasted exception, a Sentry issue (`--sentry=ID`), or a GitHub issue (`--issue=N`)
- **`ai:review`** — reads a diff or pull request and posts inline review comments with severity levels
- **`ai:upgrade`** — migrates a Composer package across a major version using the package's own upgrade guide
- **Self-healer** — watches for failed queue jobs and scheduled tasks, patches code in an isolated worktree, and opens a pull request
- **Tackle Remote** — a companion package serving the same harness as a mobile browser UI

Safety Boundaries
-----------------

All limits live in `config/tackle.php` and cannot be overridden by a prompt:

```php
return [
    'budget_usd' => env('AI_CODE_BUDGET', 1.00),
    'shell' => [
        'local'      => env('AI_CODE_SHELL', 'approve'),
        'production' => env('AI_CODE_SHELL', 'off'),
    ],
    'artisan_allowlist' => [
        'local'      => ['make:*', 'migrate:*', 'db:seed', 'route:list', 'test'],
        'production' => ['route:list'],
    ],
    'protected_paths' => ['.env', '.env.*', 'storage/*', 'vendor/*', '.git/*'],
];

```

`protected_paths` blocks reads as well as writes, so the agent cannot read your `.env`. The budget is a hard stop — the session aborts when estimated spend crosses the limit, with a warning at 80%.

Self-Healing Queue Jobs
-----------------------

Enable self-healing with `AI_CODE_HEALING_ENABLED=true`, publish the migration, and start a worker on the `healer` queue. When a job fails, Tackle dispatches a healing agent that applies a minimal fix, runs your test suite, and either opens a pull request or merges directly in `patch` mode.

You can opt specific jobs out with an attribute:

```php
use Tackle\Attributes\Healable;

#[Healable(false)]
class IssueRefund implements ShouldQueue
{
    public function handle(): void
    {
        // Skipped by the healer entirely.
    }
}

```

All healing attempts are logged to a `tackle_healing_log` table, queryable via `php artisan tackle:healing-log`.

MCP Server
----------

Tackle can expose its Laravel-aware tools over MCP so external editors like Claude Code, Cursor, or Zed can call `ListRoutes`, `QueryDatabase`, `ReadTelescopeEntry`, and `RunLarastan` against your app:

```bash
claude mcp add tackle -- php artisan tackle:mcp

```

The exposed tool set defaults to read and analysis tools only — no file writes, no shell access.

Key Takeaways
-------------

- Safety rules are PHP code, not prompt instructions — they cannot be talked around
- Six specialised agents cover coding, fixing, reviewing, upgrading, and self-healing
- Worktree mode keeps edits isolated until you review the diff
- `TACKLE.md` lets you encode project conventions, boundaries, and gotchas for every session
- MCP support lets external editors use the same Laravel-aware tools
- Currently at v1.27.3, MIT-licensed, on GitHub at `JordanDalton/laravel-tackle`

---

*Source: [Laravel Tackle on Laravel News](https://laravel-news.com/laravel-tackle)*

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fmsaied.com%2Farticles%2Flaravel-tackle-run-an-ai-coding-agent-inside-your-laravel-application&text=Laravel+Tackle%3A+Run+an+AI+Coding+Agent+Inside+Your+Laravel+Application) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmsaied.com%2Farticles%2Flaravel-tackle-run-an-ai-coding-agent-inside-your-laravel-application) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  What PHP and Laravel versions does Laravel Tackle require?        Laravel Tackle requires PHP 8.3 and either Laravel 12 or Laravel 13. 

      Q02  How does Laravel Tackle prevent the AI agent from accessing sensitive files like .env?        The `protected_paths` setting in `config/tackle.php` blocks both reads and writes to listed paths such as `.env`, `storage/*`, and `vendor/*`. These restrictions are enforced in PHP before any tool runs and cannot be overridden by a prompt. 

      Q03  Can Laravel Tackle automatically fix failed queue jobs without human intervention?        Yes. With `AI_CODE_HEALING_ENABLED=true`, Tackle listens for `JobFailed` events, runs a healing agent in an isolated git worktree, executes your test suite, and either opens a pull request or merges the fix directly in `patch` mode. Jobs can be excluded from healing using the `#[Healable(false)]` attribute. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://msaied.com/articles) 

 [ ![Advanced Authorization in Laravel: Gates, Policies, and Response-Based Access Control](https://cdn.msaied.com/571/e2c97418f4d543aac16e77c5dfd1055a.png) laravel authorization security 

### Advanced Authorization in Laravel: Gates, Policies, and Response-Based Access Control

Go beyond simple boolean gates. Learn how Laravel's response-based authorization lets you return rich denial r...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 20 Aug 2026     3 min read  

  Read    

 ](https://msaied.com/articles/advanced-authorization-in-laravel-gates-policies-and-response-based-access-control-4) [ ![Queue::forward(): Reroute Laravel Queues in One Place](https://cdn.msaied.com/572/c3ded57b390d88d1ceb9bd8570729835.png) Laravel Queues Laravel 13.26 

### Queue::forward(): Reroute Laravel Queues in One Place

Laravel 13.26 introduces Queue::forward(), letting you redirect any queue to a different name, connection, or...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 19 Aug 2026     3 min read  

  Read    

 ](https://msaied.com/articles/queueforward-reroute-laravel-queues-in-one-place) [ ![Read-Through Disks and Debounced Listeners in Laravel 13.26](https://cdn.msaied.com/568/580ae69765054f5f750614e4d977ff56.png) Laravel 13.26 Filesystem Queue 

### Read-Through Disks and Debounced Listeners in Laravel 13.26

Laravel 13.26 ships a read-through filesystem driver for lazy storage migration, extends #\[DebounceFor\] to que...

  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said 

 18 Aug 2026     4 min read  

  Read    

 ](https://msaied.com/articles/read-through-disks-and-debounced-listeners-in-laravel-1326) 

   [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

Explore

- [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [Contact](https://msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
