このツールについて
Laravel TackleはLaravel向けのAIエージェントハーネスです。コードベースを読み、テストを実行し、PRをレビューし、依存関係をアップグレードし、失敗したジョブを修復するコーディングエージェントを提供し、Composer経由でインストールされます。
主な機能
- コーディングエージェント:
CodingAgentを実装するクラスはプロンプトを受け取り、ツールを呼び出し、結果を返します。 - コマンドスイート:
ai:code、ai:upgrade、ai:eval、ai:explain、ai:fix、ai:onboard、ai:respond、ai:review、ai:run、ai:test。 - 依存関係のアップグレード:
ai:upgradeは隔離されたworktreeでComposer依存関係の安全なメジャーバージョンアップグレードを監査、計画、解決、修正、検証し、PRとして提供します。 - コードレビュー:
ai:reviewは読み取り専用エージェントで、git diffをレビューし、実際の問題を重大度レベルとともに提示します。 - テスト生成:
ai:testは任意のクラスまたはメソッドのPestテストファイルを生成します。 - 問題修正:
ai:fixは貼り付けた例外、Sentryの問題(--sentry=ID)、またはGitHubの問題(--issue=N)を受け取り、エージェントが診断、パッチ、検証します。 - CIとcron:
ai:runはターミナルなしで同じエージェントを実行し、1つのタスク、JSON結果、終了コードを返します。 - PRインタラクション:
ai:respondはプルリクエストに残された/tackleコメントに基づいて、要求された変更を適用し、PRブランチにプッシュし、スレッドで返信します。 - 開発者オンボーディング:
ai:onboardはコードベースのガイド付き読み取り専用ツアーを提供し、質問に答えます。 - ベンチマーク:
ai:evalはシードされたバグに対してエージェントをベンチマークします — 修正率、誤修正率、トークン、コスト。
アーキテクチャと安全性
laravel/ai上に構築され、同様にプロバイダー非依存です。Tackleはツール呼び出しをサポートする任意のlaravel/aiプロバイダーで動作します。- すべてのエージェントは同じツールインフラストラクチャと安全レイヤーを通じて実行されます。
NetworkExfiltrationGuardは、エージェント作成コード内のアウトバウンドHTTP、curl ... | sh、外部curl/wgetなどの流出トランスポートをフラグします。モードはblock(デフォルト)、confirm、offです。
使用と設定
- Composer経由でインストール。
- 設定を公開:
php artisan vendor:publish --provider="Laravel\Ai\AiServiceProvider"。 php artisan ai:codeを実行し、小さなテストタスクを入力して接続を確認します。- メジャーアップグレードは長いセッションです — 開始前に
AI_CODE_BUDGETをデフォルトの$1以上に上げることを検討してください。 laravel/ai >=0.1 <0.11が必要です。laravel/ai 0.1.x自体はPHP ^8.4を要求し、PHP 8.3ではComposerが0.2以降を解決します。
オープンソースと商用化
- オープンソース、無料。
- 学習曲線: 中程度。
機能と用途
[ ] Publish the laravel/ai config: php artisan vendor:publish --provider="Laravel\Ai\AiServiceProvider"[ ] Run php artisan ai:code and type a small test task to confirm everything connects.4' } - run: composer install --no-interaction --no-scripts - run: | php artisan ai:upgrade pestphp/pest \ --headless --output=json --no-worktree \ --ref-issue=${{ githuba human stays the trigger — read it and run php artisan ai:upgrade <package> to turn it into a PR, or wire up the unattended mode belowAgentsClasses implementing CodingAgent that receive a prompt, call tools, and return a resultai:evalBenchmarks the agent against seeded bugs — fix rate, false-fix rate, tokens, costai:explainExplains what a file, class, or method does in plain Englishai:fixA focused fix session: paste an exception, point it at a Sentry issue (--sentry=ID) or GitHub issue (--issue=N), and the agent diagnoses, patches, and verifies the fixai:onboardOnboards a new developer: a guided, read-only tour of the codebase — what it is, how it's put together, how to run it, where to be careful — then answers their questionsai:respondActs on a /tackle comment left on a pull request: applies the requested change, pushes it to the PR branch, and replies in the threadai:reviewA read-only agent that reviews git diffs and surfaces real issues with severity levelsai:runThe same agent with no terminal attached: one task, a JSON result, and an exit code — for CI and cron