Class AiAgent


@Entity public class AiAgent extends AuditableModel
  • Constructor Details

    • AiAgent

      public AiAgent()
    • AiAgent

      public AiAgent(String code, String name)
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in class Model
    • setId

      public void setId(Long id)
      Specified by:
      setId in class Model
    • getCode

      public String getCode()
    • setCode

      public void setCode(String code)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getSortOrder

      public Integer getSortOrder()
    • setSortOrder

      public void setSortOrder(Integer sortOrder)
    • getSystemPrompt

      public String getSystemPrompt()
    • setSystemPrompt

      public void setSystemPrompt(String systemPrompt)
    • getAudience

      public AiAgentAudience getAudience()
      Business: speak in display titles, hide model and field names and tool mechanics. Technical: allow internal names.
      Returns:
      the property value
    • setAudience

      public void setAudience(AiAgentAudience audience)
    • getTemperature

      public BigDecimal getTemperature()
    • setTemperature

      public void setTemperature(BigDecimal temperature)
    • getMaxOutputTokens

      public Integer getMaxOutputTokens()
    • setMaxOutputTokens

      public void setMaxOutputTokens(Integer maxOutputTokens)
    • getReasoningEffort

      public String getReasoningEffort()
    • setReasoningEffort

      public void setReasoningEffort(String reasoningEffort)
    • getMaxSteps

      public Integer getMaxSteps()
      Maximum number of agentic loop iterations per request. Default: 10.
      Returns:
      the property value
    • setMaxSteps

      public void setMaxSteps(Integer maxSteps)
    • getIsEnabled

      public Boolean getIsEnabled()
    • setIsEnabled

      public void setIsEnabled(Boolean isEnabled)
    • getIsDefault

      public Boolean getIsDefault()
    • setIsDefault

      public void setIsDefault(Boolean isDefault)
    • getIsInternal

      public Boolean getIsInternal()
    • setIsInternal

      public void setIsInternal(Boolean isInternal)
    • getModel

      public AiModel getModel()
      Optional. If not set, uses the user's selected model or the global default.
      Returns:
      the property value
    • setModel

      public void setModel(AiModel model)
    • getUtilityModel

      public AiModel getUtilityModel()
      Cheaper/faster model for background tasks: title generation, session notes, context summarization. Falls back to the primary model if not set.
      Returns:
      the property value
    • setUtilityModel

      public void setUtilityModel(AiModel utilityModel)
    • getTools

      public Set<AiTool> getTools()
    • setTools

      public void setTools(Set<AiTool> tools)
    • addTool

      public void addTool(AiTool item)
      Add the given AiTool item to the tools collection.
      Parameters:
      item - the item to add
    • removeTool

      public void removeTool(AiTool item)
      Remove the given AiTool item from the tools collection.
      Parameters:
      item - the item to remove
    • clearTools

      public void clearTools()
      Clear the tools collection.
    • getKnowledgeBases

      public Set<AiKnowledgeBase> getKnowledgeBases()
    • setKnowledgeBases

      public void setKnowledgeBases(Set<AiKnowledgeBase> knowledgeBases)
    • addKnowledgeBasis

      public void addKnowledgeBasis(AiKnowledgeBase item)
      Add the given AiKnowledgeBase item to the knowledgeBases collection.
      Parameters:
      item - the item to add
    • removeKnowledgeBasis

      public void removeKnowledgeBasis(AiKnowledgeBase item)
      Remove the given AiKnowledgeBase item from the knowledgeBases collection.
      Parameters:
      item - the item to remove
    • clearKnowledgeBases

      public void clearKnowledgeBases()
      Clear the knowledgeBases collection.
    • getSkills

      public Set<AiSkill> getSkills()
    • setSkills

      public void setSkills(Set<AiSkill> skills)
    • addSkill

      public void addSkill(AiSkill item)
      Add the given AiSkill item to the skills collection.
      Parameters:
      item - the item to add
    • removeSkill

      public void removeSkill(AiSkill item)
      Remove the given AiSkill item from the skills collection.
      Parameters:
      item - the item to remove
    • clearSkills

      public void clearSkills()
      Clear the skills collection.
    • getSubAgents

      public Set<AiAgent> getSubAgents()
      Agents this agent can consult as sub-agents
      Returns:
      the property value
    • setSubAgents

      public void setSubAgents(Set<AiAgent> subAgents)
    • addSubAgent

      public void addSubAgent(AiAgent item)
      Add the given AiAgent item to the subAgents collection.
      Parameters:
      item - the item to add
    • removeSubAgent

      public void removeSubAgent(AiAgent item)
      Remove the given AiAgent item from the subAgents collection.
      Parameters:
      item - the item to remove
    • clearSubAgents

      public void clearSubAgents()
      Clear the subAgents collection.
    • getRoles

      public Set<Role> getRoles()
      Roles allowed to use this agent.
      Returns:
      the property value
    • setRoles

      public void setRoles(Set<Role> roles)
    • addRole

      public void addRole(Role item)
      Add the given Role item to the roles collection.
      Parameters:
      item - the item to add
    • removeRole

      public void removeRole(Role item)
      Remove the given Role item from the roles collection.
      Parameters:
      item - the item to remove
    • clearRoles

      public void clearRoles()
      Clear the roles collection.
    • getGroups

      public Set<Group> getGroups()
      Groups allowed to use this agent.
      Returns:
      the property value
    • setGroups

      public void setGroups(Set<Group> groups)
    • addGroup

      public void addGroup(Group item)
      Add the given Group item to the groups collection.
      Parameters:
      item - the item to add
    • removeGroup

      public void removeGroup(Group item)
      Remove the given Group item from the groups collection.
      Parameters:
      item - the item to remove
    • clearGroups

      public void clearGroups()
      Clear the groups collection.
    • getUsers

      public Set<User> getUsers()
      Specific users allowed to use this agent.
      Returns:
      the property value
    • setUsers

      public void setUsers(Set<User> users)
    • addUser

      public void addUser(User item)
      Add the given User item to the users collection.
      Parameters:
      item - the item to add
    • removeUser

      public void removeUser(User item)
      Remove the given User item from the users collection.
      Parameters:
      item - the item to remove
    • clearUsers

      public void clearUsers()
      Clear the users collection.
    • getChats

      public List<AiChat> getChats()
    • setChats

      public void setChats(List<AiChat> chats)
    • addChat

      public void addChat(AiChat item)
      Add the given AiChat item to the chats collection.

      It sets item.agent = this to ensure the proper relationship.

      Parameters:
      item - the item to add
    • removeChat

      public void removeChat(AiChat item)
      Remove the given AiChat item from the chats collection.
      Parameters:
      item - the item to remove
    • clearChats

      public void clearChats()
      Clear the chats collection.
    • getPermissions

      public List<AiAgentPermission> getPermissions()
      What this agent's job needs, within the user's own permissions. None: it reaches nothing.
      Returns:
      the property value
    • setPermissions

      public void setPermissions(List<AiAgentPermission> permissions)
    • addPermission

      public void addPermission(AiAgentPermission item)
      Add the given AiAgentPermission item to the permissions collection.

      It sets item.agent = this to ensure the proper relationship.

      Parameters:
      item - the item to add
    • removePermission

      public void removePermission(AiAgentPermission item)
      Remove the given AiAgentPermission item from the permissions collection.
      Parameters:
      item - the item to remove
    • clearPermissions

      public void clearPermissions()
      Clear the permissions collection.
    • getAttrs

      public String getAttrs()
    • setAttrs

      public void setAttrs(String attrs)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object