ページ · Laravilt
Resource AI
Give a resource an AI agent for natural-language querying, CRUD and global search.
Define an ai() method on a resource to let the panel's AI assistant query and manage its records. Configure AI providers on the panel with ->aiProviders(). See the AI section.
Basic Configuration
php
CRUD Permissions
php
Searchable Columns & Global Search
php
When the panel has ->globalSearch() enabled, every resource with an AI agent and searchable columns shows up in global search.
Custom Provider & Model
php
AIAgent Methods
| Method | Description |
|---|---|
name(), description() | Agent identity |
systemPrompt() | System prompt |
columns() / addColumn() | AI columns |
searchable() | Searchable fields (also used by global search) |
canQuery(), canCreate(), canUpdate(), canDelete() | Allowed operations |
provider() | AI provider name |
aiModel() / model() | Model (string or enum) |
tools() / addTool() | Extra tools |
metadata() | Extra metadata |
handler() | Custom handler closure |