alfasix / alfakit-ai
AI built into AlfaKit panels with laravel/ai: one-line AI actions, field writing assistance, natural-language table filters, a panel copilot that respects policies, an MCP server and usage logging.
Requires
- php: ^8.3
- alfasix/alfakit: ^0.1|@dev
- laravel/ai: ^1.2
Requires (Dev)
None
Suggests
- alfasix/alfakit-api: MCP clients can authenticate with the API plugin's personal access tokens.
- laravel/mcp: ^1.0 — required for AiPlugin::make()->mcp(), the MCP server of a panel.
- laravel/sanctum: MCP clients can authenticate with Sanctum personal access tokens.
Provides
None
Conflicts
None
Replaces
None
README
by Alfa Six
AI for AlfaKit panels on laravel/ai, with the panel's own permissions: one-line AI actions (summarise, translate, extract into fields, classify), a writing assistant on text fields, natural-language table filters validated against the table's own filters, a copilot that searches, reads and proposes actions the user confirms, an MCP server for your resources, and usage logging with cost estimates. It renders in React, Vue and Svelte.
Installation
composer require alfasix/alfakit-ai php artisan vendor:publish --tag=alfakit-ai-migrations php artisan migrate php artisan alfakit:ai-setup
The MCP server also needs composer require laravel/mcp.
Register
use AlfaSix\AlfakitAi\AiPlugin; $panel->plugin( AiPlugin::make() ->copilot() ->mcp() ->redact(['email', 'phone']) ->pricing(['gpt-4.1-mini' => ['input' => 0.4, 'output' => 1.6]]), );
use AlfaSix\AlfakitAi\Actions\SummarizeAction; $table->recordActions([SummarizeAction::make()])->aiFilters(); Textarea::make('notes')->aiAssist();
Read the documentation for every option, the safety model and testing with laravel/ai fakes.
License
MIT. See LICENSE.md.