Skip to main content

AI Agent Audit Logs: How Long 6 Platforms Keep Them

When an AI agent does something a customer complains about, the evidence sits in the vendor's audit log, and every vendor deletes it on its own clock. Two of the six we checked clear it within a month.

VerdictExport agent logs at least weekly from every platform you use, because the shortest default window is 14 days. ChatGPT Enterprise compliance logs last 30 days; Microsoft Purview, GitHub and Claude's export button reach back 180. If you run Claude Enterprise, have the Primary Owner turn on the Compliance API now: it keeps 6 years of activity but does not backfill activity from before it was enabled.

9 min readBy Johnie T YoungLast reviewed
AI Agent Audit Logs: How Long 6 Platforms Keep Them
Image: Unsplash, used under the Unsplash License.

OpenAI's help center says its Compliance Logs Platform keeps ChatGPT Enterprise log events for 30 days, as we read it on November 29, 2026. Self-hosted n8n is shorter still: by default it deletes execution data, its run history, after 336 hours, which is 14 days.

So picture an agent that sends the wrong refund email on day 0 and a customer who complains on day 45. On those two platforms the default record is gone. Claude Enterprise's "Export logs" button, Microsoft Purview and GitHub all still reach it, because each covers 180 days, and Google Workspace keeps Gemini log events for 6 months.

This page compares what six agent platforms that small teams use keep, who can pull it, and what the log never recorded in the first place. It is the evidence half of an incident plan; roles, severity levels and notification steps are in our AI incident response plan template. For a log schema for agents you build yourself, see our TypeScript agent logging patterns.

We read published documentation only and opened no accounts. Nothing here is legal advice.

The 45-day complaint test

We took one agent action on day 0 and asked, for each platform's default setting, whether a record of it still exists on day 45 and on day 200.

Platform Which plan has the log Default window Who can pull it Day 45 Day 200
ChatGPT (OpenAI Compliance Logs Platform) Enterprise and Edu 30 days Holder of an Admin key; only a workspace owner can grant broad access or conversation messages Gone Gone
Claude ("Export logs" button / Compliance API) Enterprise only for the button Button: past 180 days. Compliance API activity: 6 years, from the day it is enabled Button: Owners and Primary Owners Kept Activity kept only if the Compliance API was on before day 0; chat content follows your retention policy
Microsoft 365 Copilot and Copilot Studio agents (Purview Audit) Audit (Standard) logs Copilot automatically 180 days Holders of the Audit Logs or View-Only Audit Logs role Kept Gone, unless a longer policy applies
GitHub Copilot (enterprise audit log) Copilot Business or Enterprise 180 days Enterprise owners, or a custom "Read enterprise audit logs" role Kept Gone
Google Workspace Gemini (log events) Workspace with Gemini 6 months Admins, through the audit and investigation tool in the Admin console Kept Gone
n8n, self-hosted (execution data, not an audit log) Any self-hosted instance 14 days or 10,000 executions, whichever comes first Whoever runs the server Gone Gone

Traps: no backfill, a 10,000-run cap, a fixed one-year record

Anthropic's Compliance API keeps activity for 6 years, but recording is not retroactive: it starts when the API is first enabled, and activity from before that is not backfilled. Turning it on after an incident recovers no earlier activity records. Chat, file and project content is a separate matter: it follows your organization's retention rules, indefinite by default unless a user deletes it, so content still inside that policy can be pulled after you enable the API.

A busy n8n instance can lose a record well before day 14, because the 10,000-execution cap triggers pruning on its own.

Microsoft keeps audit records created by non-user entities, such as service principals and applications, for a fixed year that cannot be changed. Microsoft's Copilot audit page does not say which agent records count as non-user entities, so our reading is only that some of an agent's trail may outlive the user-level records.

What each log leaves out

A retention window only matters if the log holds what a complaint is about. In most agent incidents that is the content: what the agent was asked, what it said, what it changed. Here the platforms differ more than on dates.

Claude's audit log records who did what, with columns for created_at, actor_info, event, entity_info, IP address, device ID and user agent. Anthropic says the titles and content of chats and projects are not in the export, only their unique identifiers. Chat inputs and outputs come from a separate data export that a Primary Owner runs, or from the Compliance API, which returns chat data and file content as well as activity. On Claude Enterprise only the Primary Owner can enable that API, so the "turn it on" task belongs to that one person.

GitHub says its Copilot audit log covers changes to the plan, settings and licenses, plus "agent activity on the GitHub website". It does not include client session data such as prompts sent to Copilot locally.

For the cloud agent, GitHub keeps a session log of the agent's reasoning and the tools it used. Every commit the agent makes is authored by Copilot, lists the person who started the task as co-author, and links to that session log, so in a dispute over a code change the commit link is the thread to pull. Our policy on AI-generated pull requests covers the review side.

Microsoft records Copilot use under the operation CopilotInteraction, and agent interactions carry an AgentId, an AgentName and an AgentVersion; a Copilot Studio declarative agent shows up with an ID beginning CopilotStudio.Declarative. After an incident you need to know which build of the agent acted and whose edit produced it, and the version field is where that starts.

OpenAI splits access by category. A workspace owner or admin can grant an Admin key access to audit, authentication or app logs, but only a workspace owner can grant the conversation messages permission. Settle who holds that key before legal asks for it.

Platform notes: plan gates and traps

ChatGPT. The Compliance Platform is offered to Enterprise and Edu workspaces. OpenAI describes its Compliance Logs as "immutable, append-only" events and says the platform keeps them for 30 days; for longer, you run something that downloads every log continuously. Changes to Codex policies and configurations also land in the workspace audit log.

If you built an integration on the old stateful route, OpenAI removed it on June 5, 2026. Our ChatGPT Team vs Enterprise comparison covers the other plan differences.

Claude. Audit logs are for Enterprise organizations only. Clicking "Export logs" builds a file of the past 180 days and gives a download link that works for 24 hours. If your Enterprise organization uses customer-managed encryption keys, that button does not work, and the same events come through the Compliance API instead, where activity is queryable within a minute and kept 6 years. The Claude vs ChatGPT compliance page compares the two plans more broadly.

Both help pages name only Enterprise (plus Edu for OpenAI) for these logs. If your agents run on ChatGPT Business or Claude Team, plan on keeping your own record of what they do.

Microsoft, GitHub, Google and n8n

A data center aisle lined with server racks, representing where AI agent audit records are stored and exported

Image: Pexels, used under the Pexels License.

Microsoft logs Copilot and AI app activity as part of Audit (Standard), with no extra setup once auditing is on. Records outside Exchange, SharePoint, OneDrive and Entra are kept 180 days by default, as are records for users without an E5 license. Audit (Premium) allows retention policies of up to 10 years, and the Office 365 Management Activity API lets you pull records into a SIEM and keep them past 180 days.

One cost trap: auditing interactions with non-Microsoft AI apps is pay-as-you-go and not included in the enterprise subscription; those logs are kept 180 days. If your team already uses Agent 365, our note on its local agent discovery explains what it can see on devices.

GitHub's enterprise audit log keeps 180 days, and GitHub itself recommends streaming it to a SIEM for longer history. The organization-level log also covers 180 days but shows only the last three months unless you search further back, and only owners can open it.

Google lists Gemini App, Gemini for Workspace and Gemini Notebook log events at 6 months, with events showing up within a couple of minutes. Gmail's email log search, by contrast, reaches back only 30 days, which matters if the agent's mistake went out by email.

n8n is the one tool here where you set the clock, and what it prunes is execution data, the record of each workflow run, rather than an audit log. Execution data is pruned when it passes EXECUTIONS_DATA_MAX_AGE (336 hours by default) or when the count passes EXECUTIONS_DATA_PRUNE_MAX_COUNT (10,000 by default). Raise both before you need them. n8n publishes its code under its Sustainable Use License, which it calls fair-code and says is not an open source license.

An export schedule that survives the shortest window

The shortest default window on this page is 14 days, so a weekly export covers every platform with room for a missed week on all but n8n. The table below lists the method we would use for each.

Platform Export method Frequency
ChatGPT Enterprise Continuous pull from the Compliance Logs Platform with an Admin key Daily job, alert if it fails
Claude Enterprise Enable the Compliance API now (it does not backfill); otherwise "Export logs" (link lasts 24 hours) Weekly, if you rely on the button
Microsoft 365 Copilot Office 365 Management Activity API to your SIEM, or an Audit (Premium) retention policy Continuous
GitHub Copilot Audit log streaming to a SIEM Continuous
Google Workspace Gemini Download search results from the audit and investigation tool (up to 100,000 rows per download) Weekly, with the other exports
n8n, self-hosted Raise the two pruning limits; back up the execution database Weekly

Write the retention period you keep exported logs into your AI data retention policy, and put the vendor's own window into the contract file. Our agentic AI contract clauses flag missing audit log provisions and list what to ask for at renewal.

A 20-minute tabletop for an agent incident

Run this once per platform your agents use. The scenario: an agent with legitimate access sends a customer something it should not have, and the customer complains on day 45.

  1. Name the person who can stop the agent and revoke its credentials, and check they still have the admin role. If credentials leaked, follow our API token leak runbook.
  2. Find the record of the action. Using the table above, say which log holds it and whether day 45 is inside the window.
  3. Find the content. Who can export the prompt and the output, and through which route: data export, conversation messages permission, session log?
  4. Find the version. Can you show which version of the agent, and which instructions, were live that day?
  5. Check the export. Open last week's export file and confirm it contains the action.

If step 2 or 5 fails, fix the export schedule first. Add the agent to your register under the AI agent governance policy with the log location and owner written next to it.

How we checked this

On November 29, 2026 we read 16 official documentation pages: OpenAI's Compliance Platform help article, four Anthropic pages (audit logs, Compliance API help, integration guide and FAQ), four Microsoft Learn pages on Purview Audit (Copilot auditing last updated August 26, 2026; retention policies June 19, 2026; audit solutions May 18, 2026), three GitHub Docs pages, two Google Workspace help pages and two n8n pages. We did not open accounts, so in-product defaults and any per-customer retention deals are outside this page. Vendors change these numbers; check the page before you rely on it.

References

Legal disclaimer

This article is published for informational and educational purposes only. It does not constitute legal, regulatory, or professional compliance advice and should not be relied upon as such. AI governance requirements vary by jurisdiction, industry, and organizational context. Always consult a qualified legal or compliance professional before implementing policies or making decisions with regulatory implications.

About the author

Johnie T Young

Governance & Regulation Desk

Covers AI laws, regulator orders and court rulings, and what each one means for a team of ten. Posts start from the statute or the order itself, with every fact traced to a row in a source log.

  • Starts from the statute or order
  • Every fact traced to a source row
  • Dated checks on each post