Loading
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_tabwip flag. The tab is also hidden whileai_governance_sessions_apiis disabled, becauseaiAgentIdentitiesreturns nothing then. Ai::Governance::PageAvailabilitygains theconnected-agentstab, gated onread_agent_artifactslike the Dashboard and Audit events tabs.- Tab clicks are tracked with the
connected_agentslabel, 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
- Enable the flags:
Feature.enable(:ai_governance_connected_agents_tab)(andai_governance_sessions_apiif it is disabled). - Connect an agent to a project in a top-level group, for example with
glab govern setupand a Claude Code session. - As a group Owner, open Automate > AI Governance on the group or project and select the Connected agents tab.
- Check the row for the connection, and try the agent, user and status filters.