PHP code example of alfasix / alfakit-ai

1. Go to this page and download the library: Download alfasix/alfakit-ai library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alfasix / alfakit-ai example snippets


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();
bash
composer vendor:publish --tag=alfakit-ai-migrations
php artisan migrate
php artisan alfakit:ai-setup