Add a Connected agents tab to the AI Governance page

What does this MR do and why?

Adds a Connected agents tab to the AI Governance page, at group and project level. It lists each external agent connection, one row per agent identity, using the aiAgentIdentities GraphQL field added in !263130 (merged).

  • Columns: agent, connected by, project (group level only), first connected, last active, sessions and status (active, inactive or revoked). The session count shows 1,000+ above the field's limit.
  • Filters for agent, user and status, and keyset pagination. The list is ordered by last active, most recent first.
  • Behind the new ai_governance_connected_agents_tab wip flag. The tab is also hidden while ai_governance_sessions_api is disabled, because aiAgentIdentities returns nothing then.
  • Ai::Governance::PageAvailability gains the connected-agents tab, gated on read_agent_artifacts like the Dashboard and Audit events tabs.
  • Tab clicks are tracked with the connected_agents label, with two metrics like the other tabs.

Actions on a connection, such as revoking it, are a follow-up.

Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/633495

How to set up and validate locally

  1. Enable the flags: Feature.enable(:ai_governance_connected_agents_tab) (and ai_governance_sessions_api if it is disabled).
  2. Connect an agent to a project in a top-level group, for example with glab govern setup and a Claude Code session.
  3. As a group Owner, open Automate > AI Governance on the group or project and select the Connected agents tab.
  4. Check the row for the connection, and try the agent, user and status filters.

Merge request reports

Loading
Loading