Adds an embeddings generator to Payload collections. A field opts in through a custom property, and embeddings are created each time the document is saved. The vectors can be searched with MongoDB Atlas search indexes. It currently requires a custom fork of Payload and may break between updates.
AI in payload
Installation
npm i payload-plugin-ai15
Stars
0
Forks
0
Open Issues
3 years ago
Last Updated
25
Weekly Downloads
v1.1.0
npm Version
401.2 KB
Unpacked Size
3
Dependencies
150 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 15 |
| Dec 4, 2026 | 15 |
| Dec 3, 2026 | 15 |
| Dec 2, 2026 | 15 |
| Dec 1, 2026 | 15 |
| Nov 30, 2026 | 15 |
| Nov 29, 2026 | 15 |
| Nov 28, 2026 | 15 |
| Nov 27, 2026 | 15 |
| Nov 26, 2026 | 15 |
| Nov 25, 2026 | 15 |
| Nov 24, 2026 | 15 |
| Nov 23, 2026 | 15 |
| Nov 22, 2026 | 15 |
| Nov 21, 2026 | 15 |
| Nov 20, 2026 | 15 |
| Nov 19, 2026 | 15 |
| Nov 18, 2026 | 15 |
| Nov 17, 2026 | 15 |
| Nov 16, 2026 | 15 |
| Nov 15, 2026 | 15 |
| Nov 14, 2026 | 15 |
| Nov 13, 2026 | 15 |
| Nov 12, 2026 | 15 |
| Nov 11, 2026 | 15 |
| Nov 10, 2026 | 15 |
| Nov 9, 2026 | 15 |
| Nov 8, 2026 | 15 |
| Nov 7, 2026 | 15 |
| Nov 6, 2026 | 15 |
| Nov 5, 2026 | 15 |
| Nov 4, 2026 | 15 |
| Nov 3, 2026 | 15 |
| Nov 2, 2026 | 15 |
| Nov 1, 2026 | 15 |
| Oct 31, 2026 | 15 |
| Oct 30, 2026 | 15 |
| Oct 29, 2026 | 15 |
| Oct 28, 2026 | 15 |
| Oct 27, 2026 | 15 |
| Oct 26, 2026 | 15 |
| Oct 25, 2026 | 15 |
| Oct 24, 2026 | 15 |
| Oct 23, 2026 | 15 |
| Oct 22, 2026 | 15 |
| Oct 21, 2026 | 15 |
| Oct 20, 2026 | 15 |
| Oct 19, 2026 | 15 |
| Oct 18, 2026 | 15 |
| Oct 17, 2026 | 15 |
| Oct 16, 2026 | 15 |
| Oct 15, 2026 | 15 |
| Oct 14, 2026 | 15 |
| Oct 13, 2026 | 15 |
| Oct 12, 2026 | 15 |
| Oct 11, 2026 | 15 |
| Oct 10, 2026 | 15 |
| Oct 9, 2026 | 15 |
| Oct 8, 2026 | 15 |
| Oct 7, 2026 | 15 |
| Oct 6, 2026 | 15 |
| Oct 5, 2026 | 15 |
| Oct 4, 2026 | 15 |
| Oct 3, 2026 | 15 |
| Oct 2, 2026 | 15 |
| Oct 1, 2026 | 15 |
| Sep 30, 2026 | 15 |
| Sep 29, 2026 | 15 |
| Sep 28, 2026 | 15 |
| Sep 27, 2026 | 15 |
| Sep 26, 2026 | 15 |
| Sep 25, 2026 | 15 |
| Sep 24, 2026 | 15 |
| Sep 23, 2026 | 15 |
| Sep 22, 2026 | 15 |
| Sep 21, 2026 | 15 |
| Sep 20, 2026 | 15 |
| Sep 19, 2026 | 15 |
| Sep 18, 2026 | 15 |
| Sep 17, 2026 | 15 |
| Sep 16, 2026 | 15 |
| Sep 15, 2026 | 15 |
| Sep 14, 2026 | 15 |
| Sep 13, 2026 | 15 |
| Sep 12, 2026 | 15 |
| Sep 11, 2026 | 15 |
| Sep 10, 2026 | 15 |
| Sep 9, 2026 | 15 |
| Sep 8, 2026 | 15 |
| Sep 7, 2026 | 15 |
| Sep 6, 2026 | 15 |
30+20 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 30 |
| Dec 4, 2026 | 23 |
| Dec 3, 2026 | 22 |
| Dec 2, 2026 | 21 |
| Dec 1, 2026 | 24 |
| Nov 30, 2026 | 23 |
| Nov 29, 2026 | 31 |
| Nov 28, 2026 | 22 |
| Nov 27, 2026 | 23 |
| Nov 26, 2026 | 26 |
| Nov 25, 2026 | 24 |
| Nov 24, 2026 | 20 |
| Nov 23, 2026 | 19 |
| Nov 22, 2026 | 12 |
| Nov 21, 2026 | 12 |
| Nov 20, 2026 | 10 |
| Nov 19, 2026 | 9 |
| Nov 18, 2026 | 9 |
| Nov 17, 2026 | 8 |
| Nov 16, 2026 | 8 |
| Nov 15, 2026 | 6 |
| Nov 14, 2026 | 9 |
| Nov 13, 2026 | 11 |
| Nov 12, 2026 | 14 |
| Nov 11, 2026 | 15 |
| Nov 10, 2026 | 16 |
| Nov 9, 2026 | 15 |
| Nov 8, 2026 | 17 |
| Nov 7, 2026 | 14 |
| Nov 6, 2026 | 12 |
| Nov 5, 2026 | 13 |
| Nov 4, 2026 | 13 |
| Nov 3, 2026 | 14 |
| Nov 2, 2026 | 15 |
| Nov 1, 2026 | 15 |
| Oct 31, 2026 | 21 |
| Oct 30, 2026 | 31 |
| Oct 29, 2026 | 25 |
| Oct 28, 2026 | 24 |
| Oct 27, 2026 | 25 |
| Oct 26, 2026 | 26 |
| Oct 25, 2026 | 24 |
| Oct 24, 2026 | 19 |
| Oct 23, 2026 | 8 |
| Oct 22, 2026 | 9 |
| Oct 21, 2026 | 9 |
| Oct 20, 2026 | 7 |
| Oct 19, 2026 | 5 |
| Oct 18, 2026 | 5 |
| Oct 17, 2026 | 7 |
| Oct 16, 2026 | 7 |
| Oct 15, 2026 | 7 |
| Oct 14, 2026 | 8 |
| Oct 13, 2026 | 7 |
| Oct 12, 2026 | 10 |
| Oct 11, 2026 | 23 |
| Oct 10, 2026 | 25 |
| Oct 9, 2026 | 26 |
| Oct 8, 2026 | 28 |
| Oct 7, 2026 | 27 |
| Oct 6, 2026 | 27 |
| Oct 5, 2026 | 23 |
| Oct 4, 2026 | 13 |
| Oct 3, 2026 | 9 |
| Oct 2, 2026 | 12 |
| Oct 1, 2026 | 11 |
| Sep 30, 2026 | 11 |
| Sep 29, 2026 | 15 |
| Sep 28, 2026 | 17 |
| Sep 27, 2026 | 16 |
| Sep 26, 2026 | 19 |
| Sep 25, 2026 | 16 |
| Sep 24, 2026 | 14 |
| Sep 23, 2026 | 14 |
| Sep 22, 2026 | 13 |
| Sep 21, 2026 | 11 |
| Sep 20, 2026 | 9 |
| Sep 19, 2026 | 6 |
| Sep 18, 2026 | 5 |
| Sep 17, 2026 | 7 |
| Sep 16, 2026 | 9 |
| Sep 15, 2026 | 8 |
| Sep 14, 2026 | 10 |
| Sep 13, 2026 | 10 |
| Sep 12, 2026 | 9 |
| Sep 11, 2026 | 9 |
| Sep 10, 2026 | 8 |
| Sep 9, 2026 | 7 |
| Sep 8, 2026 | 6 |
| Sep 7, 2026 | 8 |
| Sep 6, 2026 | 10 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/623612490-root)<a href="https://payloaddirectory.dev/plugins/623612490-root"><img src="https://payloaddirectory.dev/badge/623612490-root.svg" alt="Payload Directory"></a>README
ATTENTION: This plugin currently requires a custom fork of payload to work (replace payload with yarn add alessiogr/payload#production-with-custom). This is because this plugins depends on two PRs which haven't been merged into payload yet:
In this repository I will add a bunch of AI stuff! Currently, it can just generate embeddings for fields using the OpenAI API. Expect things to break with updates without notice.
yarn add payload-plugin-ai
Add this to your payload.config.ts:
import { ai } from 'payload-plugin-ai';
...
plugins: [
ai({
OPENAI_SECRET: process.env.OPENAI_SECRET,
NLPCLOUD_API_KEY: process.env.NLP_CLOUD_API_KEY,
embeddings: {
provider: "nlpcloud", // Nlpcloud is recommended
},
}),
]

To enable embeddings on a field, simply add this property to the field:
import { genEmbeddings } from 'payload-plugin-ai';
...
yourField: {
...
custom: {
...genEmbeddings({ visible: true }),
},
}
Now, every time you save the collection, embeddings for that field will be generated.
You can use MongoDB atlas search to search through embeddings. In MongoDB Atlas, create a search index which looks like this:
{
"mappings": {
"fields": {
"textArea_embeddings": [
{
"dimensions": 768,
"similarity": "euclidean",
"type": "knnVector"
}
]
}
}
}
Replace textArea_embeddings with the name of the embeddings field generated by this plugins.
Once the index is created, you can search through your documents using something like mongoose. There's an example in the payload.config.ts in the demo folder (make sure you adjust the index name and the path).
Project structure inspired by payload-plugin-cloud-storage and pcms-backpop
payload ai chatbot
AI chatbot that answers visitors from your Payload content and syncs its knowledge base on publish
6455/wk0v3
payload ai manager
Generate product titles, descriptions, attributes and translations with Claude, ChatGPT, Gemini or Kimi
7022/wk1v3
payload ai plugin
AI assistant in the Payload admin with multiple providers, CMS mentions and signed action proposals
54301/wk4v3
seo
Fork of the official Payload SEO plugin that generates meta titles and descriptions with OpenAI
48115/wk335v3
payload plugin ai localization
Auto-translate localized fields from the default locale using OpenAI from the Payload admin
4334/wk26v3
payload plugin ai chat
Adds ChatGPT-style chat to Payload collections using OpenAI models
3312/wk15v1