Complete AI Training
Sign inGet my AI kit

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

AI agent for chief digital officers

Data Retention and Purge Agent

Data deleted on schedule, no earlier or later than policy, with held records protected

Data Retention and Purge Agent: what goes in, what the agent does and what you get

What it does

Data is kept longer than policy allows, or deleted too early. This agent compares each table's record ages with the retention schedule and lists the records due for deletion. It checks for legal holds and dependent records, such as invoices tied to a customer. It runs a dry run that shows exactly what would go, and it verifies counts after the purge. If the dry run touches anything on hold or still needed, it removes that from the list and repeats the dry run. The data owner approves each purge. Edge case: a customer record is past retention but has an open dispute, so the agent excludes it.

How it works

Follow the arrows from top to bottom. The orange dashed arrow is the loop: when a check fails, the agent goes back and tries again.

Start and resultWhat it doesA check on its own workWaits for your OKGoes back and retries
Yes, continueApprovedYes, continueNoNo 1 STARTS WHEN Monthly retention review 2 USES A TOOL Read the retention schedule and the record ages 3 DOES List records due for deletion by table 4 USES A TOOL Check the legal hold list and dependent records 5 CHECKS THE RESULT Are any due records on hold or needed by other data? If not: remove them from the list and recheck. Back tostep 3. 6 USES A TOOL Run a dry run and count affected rows 7 YOU APPROVE Data owner approves the purge 8 USES A TOOL Run the purge 9 CHECKS THE RESULT Do the counts after the purge match the dry run? If not: stop, restore from backup if needed and reportthe difference. Back to step 6. 10 RESULT Purge record with counts
Read the steps as a list
  1. Monthly retention review
  2. Read the retention schedule and the record ages
  3. List records due for deletion by table
  4. Check the legal hold list and dependent records
  5. Are any due records on hold or needed by other data?If not: remove them from the list and recheck. Back to step 3.
  6. Run a dry run and count affected rows
  7. Data owner approves the purgeThe agent waits here for your OK.
  8. Run the purge
  9. Do the counts after the purge match the dry run?If not: stop, restore from backup if needed and report the difference. Back to step 6.
  10. Purge record with counts

How it decides

A record is due when it exceeds its retention period, has no hold and has no dependent record that needs it.

  • Exclude any record under legal hold
  • Keep records that other required records depend on
  • Require a dry run before every purge
  • Verify counts afterward

Make it yours

Every agent is a starting point. You choose these settings for your own situation.

  • Retention schedule
  • Hold list source
  • Run frequency
  • Tables in scope

What keeps you in control

It always asks you first

  • Data owner approves each purge

Hard limits

  • Never deletes without approval and a dry run
  • Never touches records under legal hold

It stops when

  • Done: the purge matches the dry run and is recorded
  • Stop: the legal hold list is unavailable

Set it up

We guide you through the set-up, step by step

Members get the full set-up guide for this agent. No technical skills needed: you copy, paste and upload.

10 minto set it up in your AI
5 AIsChatGPT, Claude, Copilot, Gemini, Grok
  • One set of instructions to paste into your AI, with the clicks for ChatGPT, Claude, Microsoft 365 Copilot, Gemini and Grok
  • The agent then walks you through connecting your own data, one source at a time
  • A downloadable copy with the flow chart, the rules and the full guide
Get access to this agent

An example run

What happensThe dry run for a support table listed 52,000 records past 3 years. The hold check found 310 tied to an open dispute, so the agent removed them and reran. The owner approved 51,690 deletions. After the purge, the count matched the dry run exactly. The agent saved the record of deletions for the audit.

More agents for chief digital officers