Record Class ToolAdvisor.Invocation

java.lang.Object
java.lang.Record
ai.mindconnect.agent.tool.ToolAdvisor.Invocation
Record Components:
toolName - the tool's registered name (e.g. "bash")
arguments - JSON-shaped argument map the LLM produced
namespace - tenant scope
userId - end-user identifier (may be "anonymous")
sessionId - the chat session this call belongs to
agentDefinitionId - which agent issued the call
toolCallId - LLM-supplied id for round-tripping tool results
Enclosing interface:
ToolAdvisor

public static record ToolAdvisor.Invocation(String toolName, Map<String,Object> arguments, Namespace namespace, String userId, UUID sessionId, UUID agentDefinitionId, String toolCallId) extends Record
Everything the runtime knows about one tool call. Immutable — advisors create modified copies via the with* helpers.
  • Constructor Details

    • Invocation

      public Invocation(String toolName, Map<String,Object> arguments, Namespace namespace, String userId, UUID sessionId, UUID agentDefinitionId, String toolCallId)
      Creates an instance of a Invocation record class.
      Parameters:
      toolName - the value for the toolName record component
      arguments - the value for the arguments record component
      namespace - the value for the namespace record component
      userId - the value for the userId record component
      sessionId - the value for the sessionId record component
      agentDefinitionId - the value for the agentDefinitionId record component
      toolCallId - the value for the toolCallId record component
  • Method Details

    • withArguments

      public ToolAdvisor.Invocation withArguments(Map<String,Object> next)
      Returns a copy with the supplied argument map.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • toolName

      public String toolName()
      Returns the value of the toolName record component.
      Returns:
      the value of the toolName record component
    • arguments

      public Map<String,Object> arguments()
      Returns the value of the arguments record component.
      Returns:
      the value of the arguments record component
    • namespace

      public Namespace namespace()
      Returns the value of the namespace record component.
      Returns:
      the value of the namespace record component
    • userId

      public String userId()
      Returns the value of the userId record component.
      Returns:
      the value of the userId record component
    • sessionId

      public UUID sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • agentDefinitionId

      public UUID agentDefinitionId()
      Returns the value of the agentDefinitionId record component.
      Returns:
      the value of the agentDefinitionId record component
    • toolCallId

      public String toolCallId()
      Returns the value of the toolCallId record component.
      Returns:
      the value of the toolCallId record component