Skip to the letter
SecureAgentSandbox.com

Security for AI agents that run or test other companies' software: tenant isolation, untrusted code, outbound traffic, secrets, audit logs and questionnaires.

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

ArtifactWhat it can containWho usually needs it
Screenshots and videoEverything on screen, including other users' records in the appThe customer, to see a failure
Page snapshots and tracesPage content, form values, request and response headersEngineers, to debug a run
Network logsURLs, headers, cookies, response bodiesEngineers and security
Prompts and model outputsPage text sent to the model and the model's reasoningEngineers, for quality
Test results and reportsPass or fail, steps, extracts of the pageThe customer
Audit recordsWho did what and when, without secretsSecurity, for investigations
Files downloaded or uploadedExports, invoices, attachments from the appUsually nobody after the run
Credentials and sessionsPasswords, tokens, cookiesThe next run only
Derived dataEmbeddings, labelled examples, fine-tuning setsProduct 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.

  1. 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).
  2. 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).
  3. 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)

ProviderA sandbox's state by defaultSnapshots, paused sandboxes and logsData termsSource
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 useBrowser session recordings are stored in your own Amazon S3 bucketThe AWS GDPR Data Processing Addendum, whose UK and Swiss addenda are part of the AWS Service Terms and apply automaticallyRuntime sessions, Browser, GDPR Center
DaytonaStops 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 stopSnapshots become inactive after 2 weeks without use, and a deleted snapshot cannot be recoveredA Data Processing Agreement that takes effect when the customer accepts Daytona's Terms of ServiceSandboxes, Snapshots, DPA
E2BKilled when its timeout (5 minutes by default) expires, and its state is gone unless you set it to pause insteadPaused sandboxes have no time-to-live and are removed only when you kill them; sandbox logs are kept for 7 daysA Data Processing Addendum for GDPR, as a template from its Trust Center or a signed copy by emailSandbox 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 automaticallySnapshots are retained for their ttl and can be deleted soonerGoogle 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 AddendumSandboxes overview, Manage sandboxes, Manage snapshots, Zero data retention
ModalA Sandbox has a default maximum lifetime of 5 minutes, up to 24 hours with a timeoutSandbox 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 restA Data Processing Addendum incorporated by reference into its customer agreementSandboxes, 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)

ArtifactExample periodThen
Downloaded and uploaded filesEnd of runDeleted with the run environment
Credentials and sessions in the runEnd of runDeleted; the stored credential stays until rotated
Screenshots, video, traces30 days, or as the customer setsDeleted
Network logs14 daysDeleted
Prompts and model outputs30 daysDeleted, or kept longer only with consent
Test results and reportsLife of the contractDeleted at offboarding
Audit recordsA fixed period stated in the contractDeleted 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).

  1. Run deletion jobs with a tenant ID taken from your own records, never from a request body.
  2. Delete from every store: objects, databases, search indexes, caches, analytics copies and log stores.
  3. Delete old object versions, not only the current one.
  4. 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.

  1. Export what the contract says they may take, such as reports and audit records, in a standard format.
  2. Revoke and delete their credentials, as in our guide to handling customers' test credentials.
  3. Delete every artifact by tenant scope.
  4. Destroy the tenant's keys once the backup retention window allows.
  5. Send a dated confirmation listing the stores cleared and the date the keys were destroyed.

What we read for this article

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,

Revised , 8 minutes to read