Class ComponentPropsAgent

java.lang.Object
com.inductiveautomation.perspective.designer.workspace.propertyeditor.ai.ComponentPropsAgent
All Implemented Interfaces:
Agent

public final class ComponentPropsAgent extends Object implements Agent
Agent that proposes targeted edits to a single Perspective component's PROPS tree. The agent receives the component's identity and its PROPS JsonSchema once at session start via getAdditionalContext(), and the current PROPS JSON on every turn (wrapped in a <currentProps> block by ComponentPropsPromptComposer). Replies are produced as a ResponseEnvelope — STATEMENT for clarifying questions or explanations, SUGGESTION when proposing changes; the SUGGESTION value is a JSON-encoded PropTreeReply payload.
  • Field Details

  • Constructor Details

    • ComponentPropsAgent

      public ComponentPropsAgent(String componentType, String componentName, String componentPath, @Nullable String componentDescription, @Nullable JsonSchema propsSchema)
  • Method Details

    • getTypeId

      public String getTypeId()
      Description copied from interface: Agent
      Stable type identifier for this agent type. Useful for diagnostics and routing.
      Specified by:
      getTypeId in interface Agent
    • getName

      public String getName()
      Description copied from interface: Agent
      Human-readable name used in logs and routing.
      Specified by:
      getName in interface Agent
    • getDescription

      public String getDescription()
      Description copied from interface: Agent
      Human and Agent readable description used in logs and routing.
      Specified by:
      getDescription in interface Agent
    • getSystemPrompt

      public String getSystemPrompt()
      Description copied from interface: Agent
      System prompt that primes the model for this agent's role.
      Specified by:
      getSystemPrompt in interface Agent
    • getTools

      public List<CallableTool> getTools()
      Description copied from interface: Agent
      Callable tools exposed to the model. Typically built from Tool-annotated methods via Tools.fromAnnotated(Object...), but may include hand-rolled CallableTool implementations. Returns an empty list if the agent declares no tools.
      Specified by:
      getTools in interface Agent
    • getAdditionalContext

      public Optional<String> getAdditionalContext()
      Description copied from interface: Agent
      Supplemental context to be folded into the prompt (e.g. project state, schema, current selection), or empty if none is provided.
      Specified by:
      getAdditionalContext in interface Agent