Skip to content

Draft: GraphQL Finders and Mutations for AI Agents

Darby Frey requested to merge ai-agents-graphql into master

What does this MR do and why?

This MR builds on top of Adds ML Agent and AgentVersion models (!141356 - merged) and adds GraphQL finders and mutations to be able to find and create AI Agents and AI Agent Versions.

Examples:

###Create AI Agent

mutation CreateAiAgent($projectPath: ID!, $name: String!) {
  aiAgentCreate(input: {projectPath: $projectPath, name: $name}) {
    agent {
      id
      name
      createdAt
    }
  }
}

Create AI Agent Version

mutation CreateAiAgentVersion($projectPath: ID!, $agentName: String!, $model: String! $prompt: String!) {
  aiAgentVersionCreate(input: {projectPath: $projectPath, agentName: $agentName, model: $model, prompt: $prompt}) {
    agentVersion {
      id
      model
      prompt
      createdAt
    }
  }
}

Get AI Agents

query getAgents($fullPath: ID!) {
  project(fullPath: $fullPath) {
    aiAgentVersions {
      nodes {
        id
        prompt
        model
      }
    }
  }
}

Get AI Agent Versions

query getAgentVersions($fullPath: ID!) {
  project(fullPath: $fullPath) {
    aiAgentVersions {
      nodes {
        id
        prompt
        model
      }
    }
  }
}

MR acceptance checklist

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

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Darby Frey

Merge request reports