# How to use Wagtail AI Part One | Installing the package & planning where to use it

Source: https://djangotv.com/videos/wagtail-cms/2026/how-to-use-wagtail-ai-part-one-installing-the-package-planning-where-to-use-it/
Date: 2026-04-16

## Summary

Wagtail AI is designed as an optional package rather than part of Wagtail core, so teams can choose whether and where to use AI in their publishing workflows. Installation involves meeting the package requirements, configuring an AI provider, adding `wagtail_ai` to `INSTALLED_APPS` above other Wagtail apps, setting models and secrets, and running migrations. The package can generate titles, meta descriptions, image metadata, rich-text completions and corrections, and content feedback, but editors should review its output. The main planning task is identifying fields that creators often forget or dislike—such as SEO titles, meta descriptions, social descriptions, and image alt text—and replacing selected Wagtail panels or blocks with their AI-enabled versions.

## Transcript

### [00:00] Wagtail AI Intro

[00:00] Hey y'all, I'm here today to talk about everybody's favorite topic in tech right now. You guess it. It's AI. Yep. I want to be clear up front then on this. channel. We serve AI realism. We very much do not serve AI hype. Nope. Eh ehh eh no AI hype here. We're not gonna tell you that AI is gonna cure cancer in three days. We're not gonna tell you that AI is going to make it possible for us to live on Mars. We're not going to oversell. We're going to focus very much on what AI can help you with in managing your content and with your publishing workflows. And this philosophy extends to the design of the package that we're going to be looking at in the next few videos, which is the Wagtail AI package.

[00:51] package. And first of all, it's a package because it's very important to us to not have AI in Wagtail Core And the reason for that is we don't want anybody who uses Wagtail to ultimately wind up being dependent on using AI to publish their content. We want to make it possible for users to decide how much or how little AI they use. And that went into how we design the package and how we design the features. Okay, so we're going to walk through how to install the Wagtail AI package. That is honestly not going to take us all that long, but then what we're going to do is I'm going to walk you through the thought process and deciding.

### [01:23] Wagtail AI Installation

[01:36] deciding like which parts of a Wagtail AI do I want to use in my particular project? Because you know every Wagtail project is different. You know what I use in my project is not the same as is what you might use in your project. What I need help with AI from might be different from what you need help with And so we'll go through that thought process together so that you can use that process to decide which parts of Wagtail AI will be more useful. To you. So my chronic magarane has honestly been a whole lot better since I've started a new treatment, but I'm still going to be wearing these hot, hot glasses during parts of the recording. Okay, y'all. Welcome to the Wagtail AI documentation.

[02:22] I will put a link down in the video description for easy access. And so what you need to install Wagtail AI is a Wagtail project that meets these requirements here. If it doesn't meet these requirements, definitely go do a little upgrading first. But the other thing you're going to need is an API key or something to connect Wagtail AI to your AI provider. And so we have another section of the documentation here that goes over how which AI providers you can use. Pretty much like this, these libraries support multiple providers and models. You can use pretty much anything within it, but you definitely want to have an API key ready before you do the installation.

[03:09] I will note that for this demo and for testing purposes, we use Scaleway which offers a few different models. It's very important the Torchbox to have a European-based AI provider, digital sovereignty is becoming much more of an important thing given the current events in the world. And so that's the one we use, but you're welcome to use anyone you would like to use Alright, so back here on installation, what you want to do is you want to install the Wagtail AI package using whatever command works for your package manager. The example we have here is for PIP. For our Wagtail. org purposes, we use Poetry and Docker, so it's a slightly more complicated command

[03:57] Poetry install and then also getting Docker to behave with the poetry lock file. And then you want to use you can also use UV is another popular option here and then let's just pop over to our base. py file for wagtail. org so I can show you how the settings are set up You definitely want to add Wagtail AI to your installed apps list in your settings file. And the only key thing here is you want to make sure it is definitely listed above any other Wagtail apps that are included in your apps list. And so you can see our Wagtail apps are listed much further down here. So that totally works. And let's do a big old scroll down here to a section I created called Wagtail

[04:45] AI Settings. You'll notice here that I have listed as provider open AI even though it's Scaleway. If you read the documentation in providers, you'll notice that OpenAI is kind of a standard term even if you're not using openai that might be how you're configuring it really depends on your provider and how things are set up so definitely look into that There should be some documentation from your provider as well as the libraries as well that can help you figure out which one you need to use there. And then I have the model listed. We're going with Mistral Small for this demonstration. And then I am not

[05:30] gonna show you my API key because, you know, the little sysadmin that's sitting on my shoulder here would be shaking his head very, very hard and poking me in the ear, being like, Hey, don't do that. Don't show the internet your API keys. So I currently have this set up as an environmental variable and that's a practice that you should use too when you put these into production. You definitely want to make sure your secrets are. are controlled and then you there will be a base URL from your AI provider as well. You can usually find that within the documentation for your provider. And so I have both the default and the vision have the same model in this demo, but you can actually use different models for different things in Wagtail AI if you want to.

[06:20] So right now the image settings for Wagtail AI defaults to the vision setting here. And so I'm just using the same model for both because I'm pretty happy with the results. But if there is a model that works better for images that you really like, then you can totally use two different models if you want to. And you know, we might get to the point with this package where you can have like, you know, different models and prompts set up in different ways. And You know, it's honestly kind of you know, exciting the different things that we could potentially do with this. So but for right now, let's keep it simple. Just one to test out everything. Okay, one other thing you should definitely not forget to do before we dive in a bit further is run your migrations because you know

[07:12] Wagtail AI needs some additional tables and stuff like that. So whether you're using regular virtual environment or Docker or any sort of container Use whatever command manage. py migrate command, whatever flavor of that you need to migrate all the tables, and then you should be ready to go and Wagtail AI should be installed. Okay, now that we have Wagtail AI installed, you are going to have to take some extra steps to configure it, but first I wanted to kind of show you the different things that you can do with Wagtail AI. And so I this is the already configured version that I have which right now

### [07:38] Wagtail AI features demo

[07:57] I have configured Wagtail AI to give me an option to generate titles And so I can generate a title in a blog post and it gives me the option to keep the title that I currently have or use the one that it generates one other area that I added into the blog post page model here is the option to use AI to come up with meta descriptions. I always forget meta descriptions. and you know, am not the greatest at coming up with them. And so I can click AI here, generate description. And here we have a option here where I get to read through it before I decide whether I want to use it or not.

[08:46] Alright, other things that you can do with Wagtail AI that are kind of baked in, this one actually doesn't need that much configuration. Whenever you have a rich text. box you now have the option when you have the menu which I will get to show up here let's go ahead and actually just add new paragraph block here and come to me menu. This is going to help me prompt the menu And let's get the menu up here. Yep, there we are. I'm gonna go ahead and pin that so that I don't lose it.

[09:34] But you'll notice that we have all our standard things in the rich text menu here, but now we have the option to use AI prompts as well. So if I wanted to get help with writing content based on what we've written, or if I wanted to correct grammar and spelling in the box, then I have that option right here as well. I'm gonna go ahead and delete that and show you one other Wagtail AI feature we have here. If we go over to the checks panel right here What we have is the option to get content feedback. And so let's go ahead and click that. And it's going to generate some feedback for us here.

[10:20] And right now it looks like overall feedback is pretty strong actually so you know it seems to be pretty happy with that. So it does have some suggested improvements. You still have to copy and paste them here instead of inserting them directly it can take you to the section where it's suggesting you add it And if you do the hover here, the tooltip shows you kind of why the AI is suggesting that. And one other thing I want to show you here in terms of the

[11:06] AI features is let's go to one of our images here. I already have a pretty good description here but I can also used AI to generate titles and generate the AI generate the descriptions for the images as well. So let's see, maybe it can come up with a nicer image title for me. Cliffs of Moher overlooking the Atlantic Ocean. I have no idea if that's the name of the cliffs. So I don't think I'm gonna use that one without looking it up because accuracy is pretty important to me. But let's see what it comes up with for the description here

[11:55] Yeah, yeah, I do kind of like that one. That is actually kind of a nice description And so I'm just gonna go ahead and use that and that automatically adds it into the field. So let's get back to showing you the settings here then. So the prompts that I was talking about, there are some listed here for AI completion and AI correction. And so those are the ones that appear in the rich text editor. And so if you want to you know Definitely configure those a bit more specifically and get some more specific direction for your AI. This is where you want to change these

[12:41] setups. settings. So you can definitely edit it to provide a more specific prompt based on your particular needs and your particular project. We'll stick with the generic one for right now. And so we'll we'll leave those there. And the other ones to configure is a setting we have right now set up as agents And so right now every single title panel that you have throughout across the project uses the same prompt. And so if you want to use if you want to make that a bit more specific you can do that and the description fields are also tied to the same thing and you can update that prompt here.

[13:27] Okay, I am back at the Wagtail Docs documentation because I kind of want to just show you one little code thing. And basically what you're doing code-wise is you're going to be swapping out one chunk of code in your Wagtail project for the Wagtail AI version of that code. And so the example here is the Wagtail AI title field panel. And so in your Wagtail project, instead of using a regular field panel, you would put the AI title field panel in the panel that you want to add the AI feature to. And so that means you have to do some thinking about which particular fields would be more useful to have these features on.

### [13:28] Wagtail AI code example

### [14:14] Deciding where to use AI

[14:14] So we're actually not going to look at code for the rest of this video. And na developer, hey, come back here, come back here, don't run away, don't run away. I mean, unless you're gonna run away and grab your editor and then bring them back here too. That's that's totally fine. But this is important. You need to hear this. Because what makes a Wagtail developer go above and beyond is the thought that they put into making a great experience for their editor. And so that's why it's important for you to go through the pages that you have in your Wagtail projects and think what parts of publishing with Wagtail. do I really not like? What do I hate? Or also you can think of what do I forget most often when I hit publish?

[15:00] Because it's pretty common to like really enjoy writing the actual content itself, like the body article and things like that. But then, you know, coming up with SEO optimized headlines. You know meta descriptions, things that make it search engine discoverable and now discoverable by AI chatbots. You know, all that stuff is not particularly fun. For most content creators, and this is an opportunity for AI to actually step in and be pretty helpful to you. So definitely go through that stuff, make a list. And I'm gonna show you a couple of our pages here on Wagtail. org so that you can get an idea what I thought of when I was going through and deciding where I wanted to put Wagtail in.

[15:50] I just kind of looked at the fields on these pages and thought about where would AI be the most useful to me as a content editor and content editor creator and a lot of that comes down to like which pieces do I forget about the most or which pieces do I just really not like doing and very common ones for me or I hate SEO optimized titles. I hate doing machine optimized titles. I'm much more happy with like you know a pithy joke or something like that for humans but you know that might not rank and then the other thing that I have a tendency to forget and other writers on the site have a tendency to forget is adding specifically search titles and meta descriptions

[16:35] as well that are optimized to the machines. So, and then also like we have options here to add different descriptions for social media sites as well. So, you know, that could be a good opportunity to add some AI to here. And then over here on the blog page, you know, it's a very similar situation. The title field would be very useful to have some AI help with. And then also again the meta description and the social description and things like that I decided would be great opportunities to add some AI. Now with images, I definitely will get the title and description pieces in the image library by default when we're installing WagTel AI. Don't have to configure it.

[17:21] configure that. But I do have to think about anything that I have stream filled on and have images in. If I want to take advantage of any of Wagtail AI's features for my blocks, then I have to go through and think what do I want to update here If your if your project is structured so that you have an image block that appears across your whole project and you just want to add AI to everything. Then great congratulations you can just add it to everything if you want to ours is a little bit more complicated because we use image blocks a little bit differently for different page types And so I decided that, you know, definitely would be useful to have Wagtail AI's features for contextual alt text on the

[18:07] The blog. It is not necessarily as useful on the content page, but I might consider adding that later. But I definitely want to add the AI image block here on the blog so that I can take full advantage of the features So really that installation is pretty simple, y'all. It's just like any other Django package. But the thought that goes into like which parts of Wag till AI do I want to use my project that takes some more effort. So go ahead, take some, you know, walk away and do that thinking and then come back. And we'll have the next video in the series here for you where we'll go over how to use Wagtail AI's text features. And if you want to make sure that you don't miss that video or any video in this series, please like and subscribe.
