AI Actions plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

AI Actions

Community

OpenAI-powered actions for Filament v5. Drop complete Summarize, Rewrite, and Classify actions onto tables and forms — no DIY prompt wiring. Install via Composer, set OPENAI_API_KEY, then attach actions to table record actions or page header actions. Optionally write results back to a model attribute with applyTo().

Tags: Action
Supported versions:
5.x
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Muazzam Ali khan avatar Author: Muazzam Ali khan

Documentation

OpenAI-powered actions for Filament v5. Drop complete Summarize, Rewrite, and Classify actions onto tables and forms — no DIY prompt wiring.

#Requirements

Dependency Version
PHP ^8.2
Laravel ^11 / ^12
Filament ^5.0
OpenAI API key

#Installation

composer require muazzambuilds/filament-ai-actions

Publish config (optional):

php artisan vendor:publish --tag=filament-ai-actions-config
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o-mini

Optional panel registration:

use MuazzamBuilds\FilamentAiActions\AiActionsPlugin;

$panel->plugin(
    AiActionsPlugin::make()
        ->model('gpt-4o-mini')
);

#Usage

#Summarize

use MuazzamBuilds\FilamentAiActions\Actions\SummarizeAction;

SummarizeAction::make()
    ->attributes(['title', 'body'])
    ->applyTo('summary'); // optional: write result back to the record

#Rewrite

use MuazzamBuilds\FilamentAiActions\Actions\RewriteAction;

RewriteAction::make()
    ->attributes(['body'])
    ->applyTo('body')
    ->tones([
        'professional' => 'Professional',
        'casual' => 'Casual',
        'concise' => 'Concise',
    ]);

#Classify

use MuazzamBuilds\FilamentAiActions\Actions\ClassifyAction;

ClassifyAction::make()
    ->attributes(['body'])
    ->labels([
        'bug' => 'Bug report',
        'feature' => 'Feature request',
        'question' => 'Question',
    ])
    ->applyTo('category');

#Custom content source

SummarizeAction::make()
    ->content(fn ($record) => "Title: {$record->title}\n\n{$record->body}");

#Table example

use Filament\Tables\Table;
use MuazzamBuilds\FilamentAiActions\Actions\ClassifyAction;
use MuazzamBuilds\FilamentAiActions\Actions\RewriteAction;
use MuazzamBuilds\FilamentAiActions\Actions\SummarizeAction;

public function table(Table $table): Table
{
    return $table
        ->recordActions([
            SummarizeAction::make()->attributes(['title', 'body'])->applyTo('summary'),
            RewriteAction::make()->attributes(['body'])->applyTo('body'),
            ClassifyAction::make()
                ->attributes(['body'])
                ->labels(['bug', 'feature', 'question'])
                ->applyTo('category'),
        ]);
}

Actions hide themselves when OPENAI_API_KEY is missing.

#Configuration

// config/filament-ai-actions.php
return [
    'api_key' => env('OPENAI_API_KEY'),
    'organization' => env('OPENAI_ORGANIZATION'),
    'base_url' => env('OPENAI_BASE_URL', 'https://api.openai.com/v1'),
    'model' => env('OPENAI_MODEL', 'gpt-4o-mini'),
    'temperature' => 0.4,
    'max_tokens' => 1200,
];

#Support

If this package helps you, consider supporting development:

Buy Me A Coffee

#License

MIT — see LICENSE.

The author

Muazzam Ali khan avatar Author: Muazzam Ali khan

AI Engineer & Laravel Developer building intelligent SaaS products, AI agents, and Filament applications. I help founders ship production-ready software — from AI automation to Laravel & Filament admin panels, SaaS platforms, and AI-powered ecommerce. I publish plugins and tutorials as Muazzam Builds.

What I'm Building

  • AI Agents & business automation
  • Laravel & Filament applications
  • SaaS products and AI ecommerce

Tech Stack

Laravel • PHP • Filament • Livewire • MySQL • Python • Docker • OpenAI • Cloudflare • AWS

Connect

Plugins
4
Stars
1

From the same author