Download the PHP package anselmokossa/filament-chatai without Composer

On this page you can find all versions of the php package anselmokossa/filament-chatai. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-chatai

Filament ChatAI

Filament ChatAI

An AI assistant inside your Filament panel. It answers with KPIs, tables, charts, maps and pictures from your own data, fills in forms and opens records, and asks before it changes anything. Installed with one command and set up on screen.

Latest Version on Packagist Total Downloads Tests Filament v5 PHP 8.2+ Laravel 11, 12, 13


Screenshots

Full-page chat — KPIs and charts from your data

Full-page chat with KPIs and a chart

Maps — orders per country, a click on a point asks about it

Map of orders per country

Record cards with their pictures

Product cards with pictures

Charts you can drill into — click a bar to see more

Bar chart with drill-down

An image dropped in the chat goes onto the record, after confirmation

An attached image saved on a product

History — pin conversations, group them in folders, rename in place

History with pinned conversations and groups

Floating chat — knows the record on screen

Floating chat over a product edit page

Fills in the form on screen — the chat shrinks to a bar on the chat button while it works

The assistant filling a form, minimised to a bar

…every step of a wizard in one go; the user reviews and saves

Wizard step filled in by the assistant Fields filled in on the page and summary in the chat

…ending with "review and save" — a click reopens the chat

Form filled in, minimised bar with review and save

Suggestions for the page on screen

Starter questions on a product edit page

Opens pages and records for the user

The assistant opening a product for editing

Every answer: copy, answer again, 👍 / 👎 with a reason

Answer controls and a not-helpful reason

Memory — what each user asked it to remember

Memory panel

Changes ask first — a form prefilled by the model

A form in the chat to register a customer

…and many at once as one paginated list with a single approval

Fifteen customers from a CSV, approved at once

After Confirm, the card shows what changed

Confirmation card with before and after

Attach a file, get an Excel back

Attached CSV and generated Excel file

@ picks a tool, / applies a skill

@ to pick a tool

Tools made on screen — no code

Tools page with no-code tools Editor of a Totals for a period tool

Tool editor — test the tool by chatting before saving

Tool editor with a test chat

Usage — cost, tokens and cache, per user and per model

Usage page

Models — the first enabled answers, the next take over

Models in fallback order

Logs — question, tools, model, tokens and time

Logs of every question

Settings — assistant, screen, voice, permissions, files, limits, prices

Settings tabs

Launchpad tiles — live figures and one tile per suggested question

ChatAI tiles on the launchpad

Requirements

Install

The installer publishes and runs the migrations, publishes the assets, adds the plugin to the panels you pick and asks who manages the assistant (e-mails or role names). Then open ChatAI → Providers in the panel, paste a key, and the chat is ready. No other code is needed.

Without questions, e.g. in a deploy script:

If you'd rather register it by hand, add the plugin to your panel provider and run php artisan vendor:publish --tag=chatai-migrations && php artisan migrate && php artisan filament:assets:

Who may use it and who manages it

Set in Settings → Permissions, or in .env before anyone has signed in. Each entry is an e-mail, a user id or a role name (spatie/laravel-permission):

Managers always may chat, and Filament Shield's super admin always manages. Nobody else sees the admin pages until named here, because they hold API keys. A manager cannot remove themselves.

Optional code

Everything below is optional, for apps that want it in code. Code wins over what is set on screen.

Set it up on screen

Everything is configured in the panel, under the ChatAI menu. No .env editing is needed.

Page What you set
Providers Each account/endpoint with its own key (encrypted): Anthropic, OpenRouter, OpenAI, a local Ollama… Monthly and daily spending limits per provider.
Models The models in order: the first enabled one answers, the next ones take over if it fails (any number of providers). Effort and price per model. "Test" per model.
Settings Assistant name, icon, instructions and starter questions · Who may use and who manages it · Voice (browser, Azure or Google, keys, voices users may pick) · Limits (messages per user, tool steps, timeout) · Currency and voice prices.
Usage Estimated cost, questions, tokens (with the share served from prompt cache), voice, per day, user and model.
Tools Adjust code tools (on/off, wording, profiles) and build new ones without code: query a panel resource, or call an allowed GET API. Full-page editor with a live test chat and the tool as JSON / cURL / laravel/mcp code.
Skills Saved instructions for a kind of task, linked to the tools to use.
Logs Every question: who, tools used, tokens, time and cost.

Claude requests use prompt caching automatically: system prompt, tools and history are billed at the cache-read price on every tool round and follow-up question.

Tools made on screen (no code)

Tools → New tool builds a tool from a form, tried in a test chat next to it before saving. Five kinds:

Kind What it does Example
List records Rows of a resource: fields (also of related records, customer.name), a search over several columns, filters, fixed conditions (status ≠ cancelled, qty < security_stock), counts per value, totals of related records (orders, total spent) and their latest rows orders, low stock, a customer card
Totals for a period Count / sum / average… for today, the week, month, year or custom dates, compared with the previous period, broken down by day, month, a column or a related record — over the records or a relation of them sales of the month, best sellers, headcount per department
Create a record The chosen columns become the form; unique columns are checked new customer
Change a record Finds the record by one of the lookup columns; each column is set or added to, never below zero adjust stock, change order status
API call GET to an allowed host, with query/path parameters and a key an external service

They always run through the resource's own query (scopes, tenancy) and its permissions (canViewAny, canCreate, canEdit). Create and change tools go through the confirmation form below.

The demo's nine code tools were rebuilt this way and answered the same questions with the same figures.

The screen: what the user sees, filling in its form, opening pages

The server applies the same switches: with reading off, a snapshot sent by the browser is ignored; only fields that are on screen can be filled.

Answers without a tool of its own

When no tool answers, the assistant reads the resource itself (query_data): it filters and adds up the records of any resource the user may see — "how many billable hours does Camilla Schimmel have?" — with the resource's own query, scopes and permissions, picking a related record by name. Asked to "filter this list", it applies the list's own filters on screen, so the user sees the same records it counted. Switch it off in Settings → Permissions (chatai.query_data.enabled).

The assistant improves itself

A manager can ask for something no tool answers yet — "I want the employees sorted by date of birth, you have no tool for that: build it". The assistant looks at the panel's data (describe_data), then proposes a new list or totals tool built only from real columns and relations, or a skill. The proposal is a confirmation card the manager can edit; on Confirm the tool must answer a test call before it is saved, and it answers from the next question. It shows up in Tools, where it can be adjusted or switched off like any tool made on screen.

For reusable summaries, comparisons and tasks that combine existing tools, the assistant proposes a skill. Record names, dates and reference profiles are requested when the skill is used. Creating the skill does not require choosing those records or running the task first. describe_tools lists the tools available to the current user; a request with name returns that tool's exact input schema without executing it.

Skill proposals check that their declared tools exist and are available. Optional JSON call examples are checked against those schemas without running them; invalid examples are returned to the model for correction before showing a confirmation card. Loading a skill includes the current schemas of its available dependencies, so old parameter names and enum values can be corrected. Every tool call validates its arguments before its handler runs, without converting their types. Structural validation cannot prove that all prose in a skill is correct.

Only managers get this, and only while tools that change data are allowed. It never writes code. Switch it off in Settings → Permissions (chatai.builder.enabled).

Several changes at once

When one answer proposes several changes with the same tool — e.g. "create these customers" with a CSV attached — they come as one list to approve: paginated (10 per page), each row can be left out, one Confirm all (n) button. Rows are checked and run one by one, so a bad row is marked without stopping the others.

Tools that change data

A laravel/mcp tool without #[IsReadOnly] changes data. The assistant never runs it straight away:

  1. It calls the tool with the values it understood — even with some missing — and the app shows a form on the card, built from the tool's schema: one field per property (title as label, required, enum → select, integer/number → number, boolean → checkbox, format: email|date → email/date input), filled with what the model gave. The user completes or corrects it.
  2. Confirm checks the values against the schema (missing or wrong ones are marked on the form), then runs it — with the user's permissions checked again at that moment — and the card shows what the tool returned. Cancel changes nothing.
  3. Either way, the outcome goes into the conversation, so the model knows it in the next question.

Switch it off in Settings → Permissions (read-only tools only), or keep a provider read-only with new LaravelMcpToolProvider($tools, readOnlyOnly: true).

Filament Shield

Turn on Settings → Permissions and each tool needs its own permission, named like Shield's own (UseChatAiTool:SalesStats); using the chat can also require UseChatAi. They show up in Shield's roles editor, Custom permissions tab (enable shield_resource.tabs.custom_permissions), so you tick per role who may use what. A user without a tool's permission does not get that tool, so the assistant tells them it has no access to that data. A tool can require an existing permission instead (e.g. ViewAny:Order). Resource tools also follow the resource's policies, and Shield's super admin always passes.

Clickable records

Rows of a table that come from a list tool open their record: the tool hands the model each row's address (only when the user may open that record) and a click takes the user there, with the chat following. Addresses outside the application are dropped.

Memory

Say "remember that I look after the Maputo store" or "call me Boss and keep answers short": the assistant keeps it for that user and follows it in their next conversations (a small "Memory updated" note shows when it saves something). Each user sees and deletes their own in the chat menu → Memory. It never stores passwords, salaries, health or ID numbers. Switch it off in Settings → Assistant (chatai.memory.enabled).

Starters and shortcut

Interactive clarification questions

When the assistant needs to clarify the user's intent, it asks through a form in the conversation: up to three questions, each with optional choices and a free-text answer. Nothing is preselected. A compact card with numbered options and a one-line custom answer stays anchored immediately above the message composer while the conversation history scrolls. Questions appear one at a time with a progress indicator, Back and Next. Answers stay filled when going back. On the last step, the user presses Send answers; the assistant continues in the same conversation. The answered form stays in the history after reloading. Available in full-page chat, floating chat and the tool editor's test chat.

The model uses show_ui with this component (the system prompt teaches it the format):

Showing questions ends the turn and waits for the user. Answers are checked against the saved questions, kept on the original message, and sent as a normal user turn. Empty answers, invalid options and duplicate submissions are rejected. Forms that confirm data changes still use the existing confirmation flow.

Answer controls

Every answer can be copied, answered again, and rated 👍 / 👎 (a 👎 can say what went wrong); the last question can be edited — the last exchange is replaced, not added to. Stop ends an answer mid-way: the server stops at its next safe point and keeps what was written. Ratings and comments show in Logs, with a filter, so whoever looks after the assistant sees what went wrong.

Stop is also checked between tools returned in the same round: remaining handlers and new write proposals do not start. A handler already running finishes before the stop takes effect. If the provider returns no text and no usable UI, the user gets an explicit failure message; if this happens after the tool-step limit, the message explains that limit. Unexpected handler exception details remain in server logs.

Stop and long answers need the server to take more than one request at a time (php-fpm, Octane…). With php artisan serve use PHP_CLI_SERVER_WORKERS=4 php artisan serve --no-reload. A turn may take up to chatai.max_turn_seconds (300 s).

Files

Pictures, maps and charts you can click

Filament Launchpad

With anselmocossa/filament-launchpad (1.16+) installed, the assistant adds its own tiles to the launchpad's card library, ready to drag onto a page:

Tile Shows Opens
Assistant the user's questions in the last 30 days, a bar per day the chat
Changes to confirm changes the assistant proposed that wait for the user, with a badge the chat
Assistant cost this month's cost, an area per day — only for managers the Usage page
One tile per starter question the questions set in Settings → Assistant the chat, asking it straight away

Tiles appear only on panels that use the assistant and only to users who may use it. Nothing happens without the launchpad; switch it off with chatai.launchpad.enabled.

Optional: .env defaults

Handy on servers or CI. A provider saved on screen without a key uses these; values saved on screen win.

On first visit, the Providers and Models pages import whatever is set here, so nothing is typed twice. At runtime a panel or tenant can still override the model (->llm(fn () => new LlmConfig(...))) and the voice (->speech(fn () => new AzureSpeech(...))).

How it works

POST /{panel}/chatai/api/conversations/{id}/messages streams server-sent events: delta, tool_start, tool_end, component, done, error. The model renders UI by calling the internal show_ui tool. Every component is validated server-side (Ui\ComponentValidator) before it reaches the browser. The catalog lives in Ui\Catalog, and it is the contract any client (web, mobile) renders.

Each answered question fires Filament\ChatAi\Events\TurnCompleted (model, tokens, latency, tools used), which you can use for usage logs or quotas.

Test

Use Filament\ChatAi\Testing\FakeLlmClient::script([...]) to script the model in your own tests.

The harness regression scenarios cover invalid arguments, unknown tools, failure recovery, Stop within a batch, exhausted steps, malformed UI and confirmation after tool availability or schema changes. See documentation index.

Changelog

See CHANGELOG.md.

Security

Please do not open a public issue for a security problem. Report it through a private advisory or by e-mail to [email protected]. SECURITY.md says what is in scope, what to include and what to expect.

Credits

License

MIT. See LICENSE.md.


All versions of filament-chatai with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^5.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
opis/json-schema Version ^2.4
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package anselmokossa/filament-chatai contains the following files

Loading the files please wait ...