Package com.axelor.ai.db
Class AiAgent
java.lang.Object
com.axelor.db.Model
com.axelor.auth.db.AuditableModel
com.axelor.ai.db.AiAgent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the givenAiChatitem to thechatscollection.voidAdd the givenGroupitem to thegroupscollection.voidAdd the givenAiKnowledgeBaseitem to theknowledgeBasescollection.voidAdd the givenAiAgentPermissionitem to thepermissionscollection.voidAdd the givenRoleitem to therolescollection.voidAdd the givenAiSkillitem to theskillscollection.voidaddSubAgent(AiAgent item) Add the givenAiAgentitem to thesubAgentscollection.voidAdd the givenAiToolitem to thetoolscollection.voidAdd the givenUseritem to theuserscollection.voidClear thechatscollection.voidClear thegroupscollection.voidClear theknowledgeBasescollection.voidClear thepermissionscollection.voidClear therolescollection.voidClear theskillscollection.voidClear thesubAgentscollection.voidClear thetoolscollection.voidClear theuserscollection.booleangetAttrs()Business: speak in display titles, hide model and field names and tool mechanics.getChats()getCode()Groups allowed to use this agent.getId()Maximum number of agentic loop iterations per request.getModel()Optional.getName()What this agent's job needs, within the user's own permissions.getRoles()Roles allowed to use this agent.Agents this agent can consult as sub-agentsgetTools()getUsers()Specific users allowed to use this agent.Cheaper/faster model for background tasks: title generation, session notes, context summarization.inthashCode()voidremoveChat(AiChat item) Remove the givenAiChatitem from thechatscollection.voidremoveGroup(Group item) Remove the givenGroupitem from thegroupscollection.voidRemove the givenAiKnowledgeBaseitem from theknowledgeBasescollection.voidRemove the givenAiAgentPermissionitem from thepermissionscollection.voidremoveRole(Role item) Remove the givenRoleitem from therolescollection.voidremoveSkill(AiSkill item) Remove the givenAiSkillitem from theskillscollection.voidremoveSubAgent(AiAgent item) Remove the givenAiAgentitem from thesubAgentscollection.voidremoveTool(AiTool item) Remove the givenAiToolitem from thetoolscollection.voidremoveUser(User item) Remove the givenUseritem from theuserscollection.voidvoidsetAudience(AiAgentAudience audience) voidvoidvoidvoidvoidsetIsDefault(Boolean isDefault) voidsetIsEnabled(Boolean isEnabled) voidsetIsInternal(Boolean isInternal) voidsetKnowledgeBases(Set<AiKnowledgeBase> knowledgeBases) voidsetMaxOutputTokens(Integer maxOutputTokens) voidsetMaxSteps(Integer maxSteps) voidvoidvoidsetPermissions(List<AiAgentPermission> permissions) voidsetReasoningEffort(String reasoningEffort) voidvoidvoidsetSortOrder(Integer sortOrder) voidsetSubAgents(Set<AiAgent> subAgents) voidsetSystemPrompt(String systemPrompt) voidsetTemperature(BigDecimal temperature) voidvoidvoidsetUtilityModel(AiModel utilityModel) toString()Methods inherited from class com.axelor.auth.db.AuditableModel
getCreatedBy, getCreatedOn, getUpdatedBy, getUpdatedOnMethods inherited from class com.axelor.db.Model
getArchived, getCid, getImportId, getVersion, isSelected, setArchived, setCid, setImportId, setSelected, setVersion
-
Constructor Details
-
AiAgent
public AiAgent() -
AiAgent
-
-
Method Details
-
getId
-
setId
-
getCode
-
setCode
-
getName
-
setName
-
getSortOrder
-
setSortOrder
-
getSystemPrompt
-
setSystemPrompt
-
getAudience
Business: speak in display titles, hide model and field names and tool mechanics. Technical: allow internal names.- Returns:
- the property value
-
setAudience
-
getTemperature
-
setTemperature
-
getMaxOutputTokens
-
setMaxOutputTokens
-
getReasoningEffort
-
setReasoningEffort
-
getMaxSteps
Maximum number of agentic loop iterations per request. Default: 10.- Returns:
- the property value
-
setMaxSteps
-
getIsEnabled
-
setIsEnabled
-
getIsDefault
-
setIsDefault
-
getIsInternal
-
setIsInternal
-
getModel
Optional. If not set, uses the user's selected model or the global default.- Returns:
- the property value
-
setModel
-
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
-
getTools
-
setTools
-
addTool
Add the givenAiToolitem to thetoolscollection.- Parameters:
item- the item to add
-
removeTool
Remove the givenAiToolitem from thetoolscollection.- Parameters:
item- the item to remove
-
clearTools
public void clearTools()Clear thetoolscollection. -
getKnowledgeBases
-
setKnowledgeBases
-
addKnowledgeBasis
Add the givenAiKnowledgeBaseitem to theknowledgeBasescollection.- Parameters:
item- the item to add
-
removeKnowledgeBasis
Remove the givenAiKnowledgeBaseitem from theknowledgeBasescollection.- Parameters:
item- the item to remove
-
clearKnowledgeBases
public void clearKnowledgeBases()Clear theknowledgeBasescollection. -
getSkills
-
setSkills
-
addSkill
Add the givenAiSkillitem to theskillscollection.- Parameters:
item- the item to add
-
removeSkill
Remove the givenAiSkillitem from theskillscollection.- Parameters:
item- the item to remove
-
clearSkills
public void clearSkills()Clear theskillscollection. -
getSubAgents
Agents this agent can consult as sub-agents- Returns:
- the property value
-
setSubAgents
-
addSubAgent
Add the givenAiAgentitem to thesubAgentscollection.- Parameters:
item- the item to add
-
removeSubAgent
Remove the givenAiAgentitem from thesubAgentscollection.- Parameters:
item- the item to remove
-
clearSubAgents
public void clearSubAgents()Clear thesubAgentscollection. -
getRoles
Roles allowed to use this agent.- Returns:
- the property value
-
setRoles
-
addRole
Add the givenRoleitem to therolescollection.- Parameters:
item- the item to add
-
removeRole
Remove the givenRoleitem from therolescollection.- Parameters:
item- the item to remove
-
clearRoles
public void clearRoles()Clear therolescollection. -
getGroups
Groups allowed to use this agent.- Returns:
- the property value
-
setGroups
-
addGroup
Add the givenGroupitem to thegroupscollection.- Parameters:
item- the item to add
-
removeGroup
Remove the givenGroupitem from thegroupscollection.- Parameters:
item- the item to remove
-
clearGroups
public void clearGroups()Clear thegroupscollection. -
getUsers
Specific users allowed to use this agent.- Returns:
- the property value
-
setUsers
-
addUser
Add the givenUseritem to theuserscollection.- Parameters:
item- the item to add
-
removeUser
Remove the givenUseritem from theuserscollection.- Parameters:
item- the item to remove
-
clearUsers
public void clearUsers()Clear theuserscollection. -
getChats
-
setChats
-
addChat
Add the givenAiChatitem to thechatscollection.It sets
item.agent = thisto ensure the proper relationship.- Parameters:
item- the item to add
-
removeChat
Remove the givenAiChatitem from thechatscollection.- Parameters:
item- the item to remove
-
clearChats
public void clearChats()Clear thechatscollection. -
getPermissions
What this agent's job needs, within the user's own permissions. None: it reaches nothing.- Returns:
- the property value
-
setPermissions
-
addPermission
Add the givenAiAgentPermissionitem to thepermissionscollection.It sets
item.agent = thisto ensure the proper relationship.- Parameters:
item- the item to add
-
removePermission
Remove the givenAiAgentPermissionitem from thepermissionscollection.- Parameters:
item- the item to remove
-
clearPermissions
public void clearPermissions()Clear thepermissionscollection. -
getAttrs
-
setAttrs
-
equals
-
hashCode
public int hashCode() -
toString
-