Add aiCatalogAgentsCreate mutation
What does this MR do and why?
We need a way to create items in the AI catalog
This MR introduces the first of those mechanisms with a service and mutation to create AI catalog agents
References
Screenshots or screen recordings
How to set up and validate locally
- Ensure
:global_ai_catalogfeature flag is enabled (and Duo Workflow is available- license configured etc) - Execute the GraphQL mutation along the lines:
mutation m { aiCatalogAgentsCreate(input: { name: "Pirate" description: "A pirate doing a sum" projectId: "gid://gitlab/Project/1000000" systemPrompt: "You are a pirate!" userPrompt: "What is 2 + 2?" }) { errors item { id } } } - Check the item and version was correctly created in the rails console:
Ai::Catalog::Item.last//Ai::Catalog::Item.last.versions.first
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.
Related to #551282 (closed)
Edited by Lee Tickett

