Package org.netxms.client.ai
Class AiOperator
java.lang.Object
org.netxms.client.ai.AiOperator
AI operator instance - perpetual adaptive monitoring loop. Configuration fields have setters
and can be changed by the client; adaptive state fields (current focus, watch list, memento)
are managed by the operator itself and are read-only. Standing instructions are written by the
operator itself but can be edited or locked by an administrator.
-
Constructor Summary
ConstructorsConstructorDescriptionAiOperator(String name) Create new AI operator instance definition with default settings (for subsequent creation on server).AiOperator(NXCPMessage msg, long baseId) Create AI operator instance object from NXCP message. -
Method Summary
Modifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg) Fill NXCP message with configuration data for create/modify request.intintgetCycle()intintgetId()intintgetName()intintintlongbooleanbooleanbooleanvoidsetDailyTokenBudget(int dailyTokenBudget) voidsetDescription(String description) voidsetEnabled(boolean enabled) voidsetInstructions(String instructions) voidsetInstructionsLocked(boolean instructionsLocked) voidsetMaxInterval(int maxInterval) voidsetMinInterval(int minInterval) voidsetModelSlot(String modelSlot) voidvoidsetObservationMaxRecords(int observationMaxRecords) voidsetObservationRetentionDays(int observationRetentionDays) voidsetOwnerUserId(int ownerUserId) Set owner user account the instance executes as.voidsetPersonaPrompt(String personaPrompt) voidsetScopeFilter(String scopeFilter)
-
Constructor Details
-
AiOperator
Create new AI operator instance definition with default settings (for subsequent creation on server).- Parameters:
name- instance name
-
AiOperator
Create AI operator instance object from NXCP message.- Parameters:
msg- NXCP messagebaseId- base ID for fields
-
-
Method Details
-
fillMessage
Fill NXCP message with configuration data for create/modify request. Standing instructions are written by the operator itself between client refreshes, so they are sent only if explicitly changed via setInstructions() - server keeps current text when the field is absent.- Parameters:
msg- NXCP message
-
getId
public int getId()- Returns:
- the id
-
getName
- Returns:
- the name
-
setName
- Parameters:
name- the name to set
-
getDescription
- Returns:
- the description
-
setDescription
- Parameters:
description- the description to set
-
getOwnerUserId
public int getOwnerUserId()- Returns:
- ID of the owner user account the instance executes as
-
setOwnerUserId
public void setOwnerUserId(int ownerUserId) Set owner user account the instance executes as. Value 0 is not sent to the server: on create the server assigns the default AI operator account, on modify the current owner is kept.- Parameters:
ownerUserId- owner user ID
-
isEnabled
public boolean isEnabled()- Returns:
- true if the instance is enabled
-
setEnabled
public void setEnabled(boolean enabled) - Parameters:
enabled- true to enable the instance
-
isExecuting
public boolean isExecuting()- Returns:
- true if a cycle is currently running
-
getScopeFilter
- Returns:
- the scopeFilter
-
setScopeFilter
- Parameters:
scopeFilter- the scopeFilter to set
-
getModelSlot
- Returns:
- the modelSlot
-
setModelSlot
- Parameters:
modelSlot- the modelSlot to set
-
getMinInterval
public int getMinInterval()- Returns:
- the minInterval
-
setMinInterval
public void setMinInterval(int minInterval) - Parameters:
minInterval- the minInterval to set
-
getMaxInterval
public int getMaxInterval()- Returns:
- the maxInterval
-
setMaxInterval
public void setMaxInterval(int maxInterval) - Parameters:
maxInterval- the maxInterval to set
-
getDailyTokenBudget
public int getDailyTokenBudget()- Returns:
- the dailyTokenBudget
-
setDailyTokenBudget
public void setDailyTokenBudget(int dailyTokenBudget) - Parameters:
dailyTokenBudget- the dailyTokenBudget to set
-
getTokensUsedToday
public long getTokensUsedToday()- Returns:
- LLM tokens used within the current usage day (UTC)
-
getPersonaPrompt
- Returns:
- the personaPrompt
-
setPersonaPrompt
- Parameters:
personaPrompt- the personaPrompt to set
-
getCurrentFocus
- Returns:
- current focus set by the operator itself
-
getWatchList
- Returns:
- watch list maintained by the operator itself
-
getMemento
- Returns:
- state carried between cycles by the operator itself
-
getObservationRetentionDays
public int getObservationRetentionDays()- Returns:
- the observationRetentionDays
-
setObservationRetentionDays
public void setObservationRetentionDays(int observationRetentionDays) - Parameters:
observationRetentionDays- the observationRetentionDays to set
-
getObservationMaxRecords
public int getObservationMaxRecords()- Returns:
- the observationMaxRecords
-
setObservationMaxRecords
public void setObservationMaxRecords(int observationMaxRecords) - Parameters:
observationMaxRecords- the observationMaxRecords to set
-
getLastExecutionTime
- Returns:
- the lastExecutionTime
-
getNextExecutionTime
- Returns:
- the nextExecutionTime
-
getCycle
public int getCycle()- Returns:
- number of completed cycles
-
getConsecutiveFailures
public int getConsecutiveFailures()- Returns:
- number of consecutive failed executions
-
getLastExplanation
- Returns:
- explanation returned by the last execution
-
getCreationTime
- Returns:
- the creationTime
-
getModificationTime
- Returns:
- the modificationTime
-
getInstructions
- Returns:
- standing instructions authored by the operator itself
-
setInstructions
- Parameters:
instructions- standing instructions to set (empty string clears); marks instructions as changed so that they will be sent to the server on next modify request
-
isInstructionsLocked
public boolean isInstructionsLocked()- Returns:
- true if standing instructions are locked against updates by the operator
-
setInstructionsLocked
public void setInstructionsLocked(boolean instructionsLocked) - Parameters:
instructionsLocked- true to lock standing instructions against updates by the operator
-