How long to keep AI agent run data, and how to delete a customer's data for good
In short
List every artifact an agent run creates, give each one a retention period the customer can see, delete on schedule by exact tenant scope including versions, replicas and backups, and make the deletion provable by encrypting each customer's data under its own key and destroying that key at the end.
A data retention policy for agent runs states, for every kind of data a run creates, how long it is kept, why, and how it is destroyed. A vendor whose AI agent works inside customers' apps creates more of this data than most SaaS products, because every run can record screens, pages and traffic that belong to the customer and to the customer's own users.
What data does an agent run create?
An agent run creates a stack of artifacts, most of which contain the customer's data. Start by listing them, because a retention period can only be applied to data you know exists.
Table: Artifacts of an AI agent run and what they can contain
| Artifact | What it can contain | Who usually needs it |
|---|---|---|
| Screenshots and video | Everything on screen, including other users' records in the app | The customer, to see a failure |
| Page snapshots and traces | Page content, form values, request and response headers | Engineers, to debug a run |
| Network logs | URLs, headers, cookies, response bodies | Engineers and security |
| Prompts and model outputs | Page text sent to the model and the model's reasoning | Engineers, for quality |
| Test results and reports | Pass or fail, steps, extracts of the page | The customer |
| Audit records | Who did what and when, without secrets | Security, for investigations |
| Files downloaded or uploaded | Exports, invoices, attachments from the app | Usually nobody after the run |
| Credentials and sessions | Passwords, tokens, cookies | The next run only |
| Derived data | Embeddings, labelled examples, fine-tuning sets | Product teams, if the contract allows |
Which rules apply to keeping and deleting run data?
Three public frameworks set the expectations most customers will quote back to you.
- SOC 2 confidentiality criteria. The Trust Services Criteria include C1.1, "The entity identifies and maintains confidential information to meet the entity's objectives related to confidentiality", with a point of focus to "determine the period over which the confidential information is to be retained", and C1.2, "The entity disposes of confidential information to meet the entity's objectives related to confidentiality" (AICPA 2017 Trust Services Criteria, March 2020 edition, read 2026-11-26).
- GDPR, where the run touches personal data. Article 5(1)(e) requires personal data be "kept in a form which permits identification of data subjects for no longer than is necessary", and Article 28(3)(g) requires a processor, "at the choice of the controller", to delete or return "all the personal data to the controller after the end of the provision of services relating to processing", and to delete "existing copies unless Union or Member State law requires storage" (Regulation (EU) 2016/679, read 2026-11-26).
- NIST SP 800-53. SI-12 asks you to "Manage and retain information within the system and information output from the system in accordance with applicable laws" and related requirements, and MP-6 to sanitize media before disposal or reuse (NIST SP 800-53 Rev. 5, read 2026-11-26).
What do retention defaults look like on a hosted sandbox?
On a hosted sandbox, part of your retention schedule is set by the provider's defaults, so read them and copy them into your own schedule. Six providers publish such defaults on their own pages, all read 2026-11-26.
Promigence's security page says that whatever a run changes is discarded unless you keep it, that you can delete a snapshot whenever you like, and that it does not train on your code, your agent's outputs or your test results; its home page says of customer code, "Encrypted at rest and never trained on." The same security page states one default in days: a failed sandbox's state is kept for up to 7 days, so it can be reopened, or deleted sooner. Its limits page adds that a paused sandbox which reaches 30 days without being resumed is deleted with its files, and that an email goes to the organization's owner 7 days and 1 day before. The security page also notes that a Data Processing Addendum is available on request for workloads that handle personal data.
The other five providers publish these defaults:
Table: Retention defaults published by AWS, Daytona, E2B, Google Cloud and Modal (read 2026-11-26)
| Provider | A sandbox's state by default | Snapshots, paused sandboxes and logs | Data terms | Source |
|---|---|---|---|---|
| AWS (Amazon Bedrock AgentCore) | A Runtime session's memory and disk last only as long as its compute, which is terminated with its memory sanitized when the session completes; Browser sessions are temporary and reset after each use | Browser session recordings are stored in your own Amazon S3 bucket | The AWS GDPR Data Processing Addendum, whose UK and Swiss addenda are part of the AWS Service Terms and apply automatically | Runtime sessions, Browser, GDPR Center |
| Daytona | Stops after 15 minutes of inactivity; a stopped container sandbox is archived after 7 days and is not deleted automatically unless you set an auto-delete interval; ephemeral sandboxes are deleted when they stop | Snapshots become inactive after 2 weeks without use, and a deleted snapshot cannot be recovered | A Data Processing Agreement that takes effect when the customer accepts Daytona's Terms of Service | Sandboxes, Snapshots, DPA |
| E2B | Killed when its timeout (5 minutes by default) expires, and its state is gone unless you set it to pause instead | Paused sandboxes have no time-to-live and are removed only when you kill them; sandbox logs are kept for 7 days | A Data Processing Addendum for GDPR, as a template from its Trust Center or a signed copy by email | Sandbox lifetime, Internet access, Security |
| Google Cloud (Gemini Enterprise Agent Platform sandboxes) | Kept for its TTL, from 7 days for a custom container to 14 days for code execution, and billed while it exists; a ttl set at creation removes it automatically | Snapshots are retained for their ttl and can be deleted sooner | Google states it will not use your data to train or fine-tune AI/ML models without your prior permission or instruction, and refers to its Cloud Data Processing Addendum | Sandboxes overview, Manage sandboxes, Manage snapshots, Zero data retention |
| Modal | A Sandbox has a default maximum lifetime of 5 minutes, up to 24 hours with a timeout | Sandbox memory snapshots are kept 7 days and filesystem snapshots 30 days by default (configurable); container logs are kept 1 day on Starter and 30 days on Team; stored data is encrypted at rest | A Data Processing Addendum incorporated by reference into its customer agreement | Sandboxes, Security and privacy, DPA |
For a testing vendor, each of these defaults becomes a row in the schedule built in Step 1 below.
Step 1: How do I set a retention period for each artifact?
Set a period per artifact from who needs it and for how long, write it down, and show it to customers. The schedule below is an example of the shape, not a recommendation; your contracts and the law decide the numbers.
Table: An example retention schedule for agent run data (illustrative values)
| Artifact | Example period | Then |
|---|---|---|
| Downloaded and uploaded files | End of run | Deleted with the run environment |
| Credentials and sessions in the run | End of run | Deleted; the stored credential stays until rotated |
| Screenshots, video, traces | 30 days, or as the customer sets | Deleted |
| Network logs | 14 days | Deleted |
| Prompts and model outputs | 30 days | Deleted, or kept longer only with consent |
| Test results and reports | Life of the contract | Deleted at offboarding |
| Audit records | A fixed period stated in the contract | Deleted at the end of the period |
Let customers shorten periods for their tenant, and let them turn off recordings they do not need. Data you never store needs no deletion.
Step 2: How do I delete one customer's data without touching another's?
Delete by an exact, authorized tenant scope, and include every copy. OWASP's multi-tenant sheet says "Ensure tenant deletion targets only that tenant's objects", using an exact prefix such as tenants/acme/ "rather than tenants/acme", which "could also match tenants/acme-west/", and to "Account for object versions, replicas, and backups when applying retention and deletion policies" (OWASP Multi-Tenant Security Cheat Sheet, read 2026-11-26).
- Run deletion jobs with a tenant ID taken from your own records, never from a request body.
- Delete from every store: objects, databases, search indexes, caches, analytics copies and log stores.
- Delete old object versions, not only the current one.
- Record each deletion as an audit event with counts per store.
Step 3: How do I make deletion provable, including backups?
Make it provable by encrypting each customer's data under its own key and destroying that key when the data must go. NIST SP 800-88 Rev. 2 defines cryptographic erase as "A purge sanitization technique in which key sanitization is applied to one or more keys providing confidentiality protections for the encrypted target data, making recovery of the decrypted target data infeasible". For storage you cannot reach physically it is often the only option: "For an ISM that takes the form of logical/virtual storage (e.g., cloud storage), cryptographic erase may be the only viable purge sanitization technique option" (NIST SP 800-88 Rev. 2, read 2026-11-26).
The method only works if every copy, including backups and logs, was encrypted under that customer's key and no plaintext copy exists elsewhere. Test it: OWASP suggests you "Test a backup with two tenants: recover one tenant, verify the other tenant's records and objects are absent" (OWASP Multi-Tenant Security Cheat Sheet).
What should happen when a customer leaves?
When a customer leaves, run one documented offboarding procedure and send them its result.
- Export what the contract says they may take, such as reports and audit records, in a standard format.
- Revoke and delete their credentials, as in our guide to handling customers' test credentials.
- Delete every artifact by tenant scope.
- Destroy the tenant's keys once the backup retention window allows.
- Send a dated confirmation listing the stores cleared and the date the keys were destroyed.
What we read for this article
- AICPA 2017 Trust Services Criteria (March 2020 edition, archived copy) and the current AICPA edition page, read 2026-11-26
- Regulation (EU) 2016/679, General Data Protection Regulation (Articles 5 and 28), read 2026-11-26
- NIST SP 800-53 Rev. 5, Security and Privacy Controls (controls SI-12 and MP-6), read 2026-11-26
- NIST SP 800-88 Rev. 2, Guidelines for Media Sanitization, read 2026-11-26
- OWASP Multi-Tenant Application Security Cheat Sheet, read 2026-11-26
- https://www.promigence.ai/security (Security and data handling), read 2026-11-26
- https://www.promigence.ai/ (home page), read 2026-11-26
- https://www.promigence.ai/docs/limits (Limits), read 2026-11-26
- AWS: AgentCore Runtime sessions, AgentCore Browser and GDPR Center, read 2026-11-26
- Daytona: Sandboxes, Snapshots and Data Processing Agreement, read 2026-11-26
- E2B: How long does a sandbox live?, Internet access and Security, read 2026-11-26
- Google Cloud: Agent Platform sandboxes overview, Manage sandboxes, Manage snapshots and Zero data retention, read 2026-11-26
- Modal: Sandboxes, Security and privacy and Data Processing Addendum, read 2026-11-26
Questions readers ask
What data does an AI testing agent create during a run?
Screenshots, video, page snapshots and traces, network logs, prompts and model outputs, test results, audit records, and sometimes copies of credentials or files from the app. Each can contain the customer's data or their users' personal data.
Does GDPR require a vendor to delete data at the end of a contract?
Where the vendor processes personal data as a processor, Article 28(3)(g) requires the contract to say the processor deletes or returns all the personal data at the controller's choice after the services end, and deletes existing copies unless EU or member state law requires storage.
How do you delete data from backups?
Either wait for backups to expire on a stated schedule and say so, or encrypt each customer's data with its own key and destroy the key. NIST SP 800-88 Rev. 2 calls the second method cryptographic erase.
Can a vendor keep run data to improve its agent?
Only if the contract allows it. Data kept for product improvement is still the customer's data, has its own retention period, and must be deleted with everything else when the customer leaves unless agreed otherwise.
Yours,
SecureAgentSandbox editors
Revised , 8 minutes to read