Add audit logging for foundational agent status changes

What does this MR do and why?

Add audit logging for foundational agent status changes

  • Emit foundational_agent_status_updated audit events when per-agent enable/disable status is changed on a namespace (group) or the default organization (instance). Introduces FoundationalAgentStatusAuditor to compare before/after status maps and emit one event per changed agent.

References

https://gitlab.com/gitlab-org/gitlab/-/work_items/593030+s

Screenshots or screen recordings

Before After
not a thing Screenshot_2026-05-21_at_16.57.22

How to set up and validate locally

  1. Go to the GitLab Duo (AI) settings on a group with AI licensed
  2. Find a flow to enable
  3. Enabled/disable that flow
  4. Go to the audit events
  5. See the new audit event for the flow you enabled

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by SAM FIGUEROA

Merge request reports

Loading