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

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

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

  [ home ](https://www.msaied.com)    [ articles ](https://www.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://www.msaied.com/articles?category=laravel) [  AI ](https://www.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%2Fwww.msaied.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%2Fwww.msaied.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://www.msaied.com/articles) 

 [ ![Streaming AI Responses in Laravel: Token Budgets, Structured Output, and Agent Contracts](https://cdn.msaied.com/584/3ffe135721c65ab3f9b40401dc3c41de.png) laravel ai llm 

### Streaming AI Responses in Laravel: Token Budgets, Structured Output, and Agent Contracts

Learn how to stream LLM responses in Laravel, enforce token budgets, and lock structured output to typed PHP c...

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

 23 Aug 2026     4 min read  

  Read    

 ](https://www.msaied.com/articles/streaming-ai-responses-in-laravel-token-budgets-structured-output-and-agent-contracts) [ ![Typed PHP 8.3 Enums as Eloquent Casts, Route Parameters, and Validation Rules](https://cdn.msaied.com/583/7301900aac0f2ec5d1347df11ce92188.png) laravel php8.3 enums 

### Typed PHP 8.3 Enums as Eloquent Casts, Route Parameters, and Validation Rules

Go beyond basic enum casting. Learn how to wire PHP 8.3 backed enums into Eloquent, route model binding, and c...

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

 23 Aug 2026     1 min read  

  Read    

 ](https://www.msaied.com/articles/typed-php-83-enums-as-eloquent-casts-route-parameters-and-validation-rules) [ ![Livewire v3 Lazy Components, Islands, and Deferred Loading in Practice](https://cdn.msaied.com/582/564b2d098d2b94b53d4f5319ac77d58b.png) livewire laravel performance 

### Livewire v3 Lazy Components, Islands, and Deferred Loading in Practice

Lazy components, islands, and deferred loading in Livewire v3 let you ship fast initial pages without sacrific...

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

 23 Aug 2026     1 min read  

  Read    

 ](https://www.msaied.com/articles/livewire-v3-lazy-components-islands-and-deferred-loading-in-practice-1) 

   [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://www.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://www.msaied.com)
- [Projects](https://www.msaied.com/projects)
- [Articles](https://www.msaied.com/articles)
- [Certificates](https://www.msaied.com/certificates)
- [Contact](https://www.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)
