Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now
Update default sort for AI Catalog
### Current user experience When users browse the AI Catalog (both agents and flows pages), discovery of agents is not easy. GitLab's foundational agents/flows are mixed in with user-created content, making it difficult to find trusted, production-ready options. Users must scroll through the entire list to discover what GitLab provides out-of-the-box. ### Problem to solve Users cannot easily discover GitLab's foundational agents and flows because they don't visually stand out or appear at the top of the catalog. This creates friction in adoption and makes the catalog feel cluttered and untrustworthy, especially when "junk" or test items are mixed with production-grade offerings. ### Proposal Implement a default sort order that prioritizes discoverability of trusted content: 1. GitLab foundational items (agents/flows built and maintained by GitLab) appear first 2. Items created by the user's company/organization appear second 3. All other public items appear last This sort order should apply automatically when users land on both the agents and flows catalog pages (Explore global pages and Automate group/project pages). This iteration **does not include** user-facing controls to change the sort order -> that will come in a future iteration. ### Acceptance criteria - [ ] When viewing the agents catalog pages, items display in order: (1) GitLab foundational agents, (2) organization-created agents, (3) other public agents - [ ] When viewing the flows catalog pages, items display in order: (1) GitLab foundational flows, (2) organization-created flows, (3) other public flows - [ ] Sort order is applied automatically on page load with no user action required - [ ] No user-facing sort controls are added in this iteration - [ ] Sort order persists when navigating between catalog pages **NOTE:** We have broken down the implementation into 2 parts: 1. Keeps foundational agents/flows pinned to the top of the list, so users see them first, followed by the remaining items. 2. Keeps foundational agents/flows at the top, then prioritizes items from the user's authorized projects, followed by the remaining public agents/flows. The first part is implemented in [this MR](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/220740). The second part is implemented in [this MR](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/222430), with a feature flag (`ai_catalog_items_priority_order`) added that is **enabled by default**. Since the second part is performance-critical, the feature flag gives us the ability to disable it quickly if any performance issues arise. Here is the rollout [issue](https://gitlab.com/gitlab-org/gitlab/-/issues/590309) for reference. Here is the [current state](https://gitlab.com/gitlab-org/gitlab/-/issues/590309#note_3089217540) of DB duration and request duration in production before these changes (second implementation)are applied. Once the MR is deployed, we will monitor for any significant performance impact and take further action if necessary.
issue