AI Assistant

Adds an admin dashboard AI assistant that reads CMS context, supports mentions, and creates signed action proposals.

Community 0 131/wk MIT v1.3.2

Installation

pnpm add @mvriu5/payload-ai

About

Payload AI Assistant adds a chat assistant to the Payload admin dashboard. The assistant can read collection schemas and document context, accept @-mentions of collections, and propose create, update, delete, and global update actions. Each proposal is signed with an HMAC derived from PAYLOAD_SECRET and verified server-side before it is applied, so the model cannot push arbitrary changes that bypass validation. Providers run through the Vercel AI SDK. Built-in adapters cover OpenAI, Anthropic (Claude), Google, Mistral, and OpenRouter, and any OpenAI-compatible endpoint (Ollama, vLLM) can be pointed at via a custom baseURL. Credentials can be handled two ways: per user, where the plugin adds aiProvider and aiApiKey fields to the admin user collection, or centrally, where you define managed provider profiles with their own models, default model, and server-side API key. Collection permissions are granular. You can allow read, create, update, and delete per slug, and read controls schema access, document search, and mentions. Media uploads can be attached to a chat and passed to the endpoint, with acceptedMimeTypes and maxFileSize guards. Upload references in proposals are restricted to the current request's attachments, which blocks the model from inventing media IDs for upload fields. Token usage can be capped per user or per site across rolling 24-hour and 7-day windows, stored in a hidden payload-ai-usage collection, with HTTP 429 returned once a limit is crossed. An audit log collection (payload-ai-auditlog) records every applied proposal with before and after state, token counts, and the acting user. The plugin targets Payload 3.x, and the provider SDK packages are optional peer dependencies that must be installed only for the providers you use.

Package info

Package name
@mvriu5/payload-ai
Latest version
1.3.2
Unpacked size
371 kB
License
MIT
Weekly downloads
131
Last publish
Jun 26, 2026

Similar plugins

More in AI