Data Retention
Choose how much run content m8tes stores. metadata_only removes stored outputs and transcripts; starting instructions and configuration are still retained. Provider retention is a separate setting.
Two modes
from m8tes import M8tes
client = M8tes()
client.settings.update(retention_mode="metadata_only") # reduce stored run contentThe mode is resolved onto each run when it starts, so it applies to every run created after you set it.
What metadata_only does and doesn't keep
Paused tool-call arguments are cleared when the run ends. Sensitive text in a starting instruction or configuration field remains stored. Contact support if you need fully ephemeral inputs.
What stops working under metadata_only
Retention is account-wide and applies to new runs. It does not erase earlier content. Per-agent overrides are not available.
About upstream model providers
retention_mode controls m8tes storage. Model-provider retention depends on the route:
Gateway ZDR is enabled by default. A model's zdr_supported=true means a capable host exists; it does not guarantee every route uses that host. See Models.
Choosing a mode
Use standard for history, reports, and cross-run memory. Use metadata_only to minimize stored run content. For sensitive data, review both the retained configuration above and your model-provider route.
Export everything the account holds
client.account.export() returns the account's stored data as one JSON document. Use it to answer a right-of-access request, or to snapshot state before deleting.
data = client.account.export()
print(data.keys())
# dict_keys(['account', 'teammates', 'tasks', 'runs', 'documents', 'memories', 'integrations'])Two things are deliberately left out. Secrets are never exported: password and API-key hashes, encrypted integration tokens and the API keys inside integration metadata, and MFA secrets. Run transcripts are not exported either, because a message can contain a credential the agent read at runtime. The runs section carries status, trigger source, channel, and timing only.
Fields in each section
The export is account-wide. It is not scoped by user_id, so it includes every end-user's records.
Delete the account
client.account.delete() requests erasure. It returns 202 and the grace window:
client.account.delete()
# {'status': 'deletion_requested', 'grace_period_days': 30}curl -X DELETE https://api.m8tes.ai/api/v2/account \
-H "Authorization: Bearer m8_your_key_here"Export first. Deletion immediately revokes sessions, API keys, and webhook credentials and prevents login.
Exactly what is erased and what is retained
Erased at the end of the grace window: agents, tasks, schedules, runs and their conversation messages, documents, memories, integrations and their OAuth tokens, webhook endpoints, custom MCP servers, Slack installs, Apple Messages bridges, inbound event receipts, end-user records, tool permission policies, MFA secrets and recovery codes, and refresh tokens. An organization where you were the only member is deleted with it; one with other members survives, with its name replaced by "Workspace".
Retained, anonymized: the account row is scrubbed in place rather than deleted, because retained financial and audit records point at it. email becomes deleted+<id>@deleted.invalid, and name, phone, company, job title, country, and password are cleared. Audit logs keep the aggregate access trail with the identifiers nulled (IP address, API-key prefix, request id, end_user_id, and resource_id). Stripe customer and subscription ids are kept so retained invoices can be reconciled; Stripe holds its own copy of the billing record.
Next: Going Live · Users · Limits