# Audit Your Content with AI

> Source: https://agilitycms.com/docs/editors/ai-recipe-content-audit

Before a redesign, a migration, an accessibility push or just a spring clean, it helps to know what state your content is in. An AI assistant connected to Agility can read through your content lists and pages and report on what's missing or out of date, without changing anything.

If you haven't connected an assistant yet, start with [Using AI Assistants with Agility CMS](/docs/editors/using-ai-assistants-with-agility).

## Goal

A clear, shareable report of content that needs attention:

- items and pages with **empty descriptions** or meta descriptions
- **images with no alt text**
- **stale content** that hasn't been updated in a long time
- **links** that may be broken

The audit is **read-only**. You decide what to fix afterwards, and fix it in small, reviewed batches.

## Step 1: Map what's there

Start by asking the assistant what it can see, so the audit covers the right lists:

```text
In the [instance name] Agility instance, [en-us] locale, list the content
lists and how many items each has, and list the sitemaps.
This is a read-only audit: don't save, publish or delete anything.
```

Pick the lists that matter. Lists your developers use for settings or navigation usually don't need auditing.

## Step 2: Run the audit

Paste this, editing the lists and the date:

```text
Read-only audit. Don't save, publish or delete anything.

In the [instance name] instance, [en-us] locale, check the [Blog Posts],
[Case Studies] and [Resources] content lists, and the pages on the [website]
sitemap. For each, report:

1. Empty descriptions: items with an empty summary or SEO description field,
   and pages with an empty Meta Description.
2. Missing alt text: image fields with no alt text, and images in rich text
   with an empty or missing alt attribute.
3. Stale content: items last modified before [January 1, 2025].
4. Links: every link in rich text and link fields that points to a page path
   that isn't on the sitemap, and every external link, grouped by domain.

Give me one table per check with: item or page name, content list, the field,
the problem, and a link to open it in Agility. Finish with a summary count.
```

Large lists take a while. If the assistant stops part way, say "Continue from where you stopped."

## What the assistant does

In plain words, behind the scenes:

1. **Finds the instance, locale and lists** (`get_available_instances`, `get_locales`, `get_containers`).
2. **Reads the content models** to know which fields are descriptions, images, rich text and links (`get_content_model_details`).
3. **Reads the items** in each list, up to 250 at a time, paging through larger lists (`get_content_items`, `get_content_item`). Each item comes with its last modified date and who changed it.
4. **Reads the page tree and pages** for the sitemap you named (`get_sitemap`, `get_page`), including each page's SEO fields.
5. **Compares and reports.** It checks the fields you asked about and builds the tables. With a read-only prompt it should only use tools that read. Most assistants show each tool they call, so you can check that none of them saved, published or deleted anything.

## About the link check

The Agility tools can read your links but can't visit them, so be clear about what the link check means:

- **Internal links** to your own pages are usually stored as site paths (in link fields they start with `~/`). The assistant can compare these with the page paths on your sitemap and flag any that don't match a page. That catches most links to renamed or removed pages, but some may be valid routes your developers handle outside the sitemap, so check before you change them.
- **External links** can only be listed. Some assistants can also browse the web, and you can ask them to check whether each external URL loads. Otherwise, run the list through a link checker.

## Review the result in Agility

1. Spot-check a few rows from each table: open the link, and confirm the problem is real.
2. Use [Content Search](/docs/editors/finding-your-content) to find similar issues the audit might have missed, such as a phrase that's out of date.
3. Confirm nothing changed: the items you opened should be in the same state as before (no new Staging versions from the audit).
4. Save the report somewhere your team can see it. Ask the assistant to "format the report as a CSV" if you want to paste it into a spreadsheet.

## Fix it in batches

Once you've reviewed the report, fix one kind of problem at a time, with a show-before-save step:

- **Descriptions and SEO:** follow [Fill In Missing SEO Titles and Descriptions with AI](/docs/editors/ai-recipe-seo-metadata).
- **Alt text:** "For the first 10 images in the missing alt text table, suggest alt text that describes what the image shows. Show me first, don't save." Alt text should describe the image for someone who can't see it, so check each suggestion against the image.
- **Stale content:** decide with your team whether to update, unpublish or leave each item. Unpublishing is something to do deliberately in Agility, not as part of an audit.
- **Links:** fix links in Agility, or ask the assistant to update specific links you've confirmed are wrong.

Every fix the assistant saves lands in Staging for you to review and publish, as usual, unless your organization has set that content up for autonomous publishing.

## Variations

- **Accessibility only.** Run just check 2, across every list with images.
- **One locale against another.** "Which items exist in en-us but not in fr-ca?" See [Draft Translations for Another Locale with AI](/docs/editors/ai-recipe-translate-content).
- **Workflow backlog.** "List every item that's been in Staging for more than 30 days and who last changed it."
- **Media library.** "List the assets in the media library and flag files with the same name in different folders." This uses `list_media`.
- **Run it fully automated.** A scheduled job or agent can run the audit on a regular cadence, fix the kinds of issues your organization has approved for autonomous publishing (for example, empty SEO descriptions), check and publish those fixes with `publish_content`, and send the rest of the report to your team. The audit step itself stays read-only. See [Choose how much the assistant does](/docs/editors/using-ai-assistants-with-agility#choose-how-much-the-assistant-does).

## Pitfalls

- **Forgetting "read-only".** Always say it in the first message of an audit. If the assistant offers to fix things as it goes, say no until you've read the report.
- **"Empty" that isn't.** A field can be empty on purpose, for example when your site falls back to another field. Ask your developer which fields actually reach the page.
- **Stale isn't always wrong.** An old evergreen page may be fine. Use the date as a prompt to review, not a reason to delete.
- **Partial results on big lists.** Ask the assistant for item counts per list and compare them with what you see in Agility, so you know the whole list was checked.

## Related articles

- [Using AI Assistants with Agility CMS](/docs/editors/using-ai-assistants-with-agility)
- [Fill In Missing SEO Titles and Descriptions with AI](/docs/editors/ai-recipe-seo-metadata)
- [Content Search](/docs/editors/finding-your-content)
- [SEO Analysis app](/docs/apps/seo-analysis), which checks alt text, links and meta description length per page in the editor
