muazzambuilds/filament-ai-actions
Filament AI Actions adds AI-powered actions to Filament admin panels, letting you run configurable prompts from resources, tables, and pages. Connect your AI provider and bring generative workflows into Laravel admin UIs with minimal setup.
PanelProvider so the model() and enabled() settings can be resolved:
->plugin(AiActionsPlugin::make()
->model('gpt-4o-mini')
->enabled())
php artisan vendor:publish) and confirm the API key and default model are set before touching actions.SummarizeAction on a TextColumn:
TextColumn::make('body')->actions([
SummarizeAction::make(),
]);
GenerateAction or TranslateAction to confirm form actions behave correctly. TranslateAction is the easiest demo of the new release because it exposes the searchable 183-language dropdown out of the box.applyResultUsing() to decide where the output lands:
GenerateAction::make()
->applyResultUsing(fn (array $state, string $result) => ['summary' => $result]);
saveResult(false) turns the action into a dry-run: run it, inspect the output, and apply it yourself later. This is the right pattern for sensitive/large fields.TranslateAction::make()->languages(['en', 'fr', 'de', 'es']);
systemPrompt(), temperature(), and maxTokens() on individual actions so creative rewrites and strict classifications can use different settings without touching the plugin config.visible()/authorize() policies, use ->afterFormFilled() or table callbacks for post-processing, and prefer applyResultUsing() over custom observers.saveResult defaults to true in your version, because that changes whether results are written back to the record.applyResultUsing() replaces default persistence. If you supply a callback, the action won't automatically save for you — call $record->save() or return the right state explicitly.model()/enabled() on the panel plugin are defaults; per-action systemPrompt()/temperature()/maxTokens() and any model override should win. If an action ignores your model, check the panel plugin isn't forcing it.->languages([...]) on dense tables/forms.maxTokens() can hit context limits or inflate costs; set maxTokens() deliberately and consider queueing actions for bulk/batch use.$record exists.systemPrompt()/languages(), or centralize model/credential selection in the panel plugin; avoid duplicating long prompts across resources.How can I help you explore Laravel packages today?