Class AgentImportService

java.lang.Object
com.axelor.ai.agent.AgentImportService

public class AgentImportService extends Object
Seeds AiAgent records from ai/agents/<code>.md files.
  • Method Details

    • seed

      public SeedResult seed(AiSource source, SeedMode mode)
      Seeds agents from an AiSource. The tools/skills/knowledge-bases/sub-agents fields accept either a list of codes (inline [a, b] or dashed) or the single wildcard "*" = every record of that type; model/utilityModel/delegateTo stay literal. Unresolved codes are logged and skipped rather than failing the load.
    • attachSkillsToAgents

      public void attachSkillsToAgents(AiSource skillsSource)
      Additively attaches skills to agents from each skill's agents: frontmatter list — the skill→agent counterpart of an agent's delegateTo. Each named agent gains the skill in its skills M2M without losing its existing skills, and the agent's own file is never touched. Unknown agent codes are logged and skipped rather than failing the load. Call this after both skills and agents have been seeded so the target agents exist.