java.lang.Object
java.lang.Record
com.agentforge4j.llm.api.LlmInvocationIdentity
- Record Components:
workflowId- id of the innermost active workflow for this call — the nested workflow currently executing, or the run's root workflow when not nested. This is not necessarily the run's root workflow id (runIdidentifies the single run); it distinguishes steps of different nested workflows under one run. May benullfor direct, run-less use.runId- current run id, ornullwhen not yet assignedstepId- current step id, ornullwhen not step-scopedagentId- current agent id, ornullwhen not agent-scoped
public record LlmInvocationIdentity(String workflowId, String runId, String stepId, String agentId)
extends Record
Optional run/workflow/step/agent identity for a single LLM invocation.
Carried by LlmExecutionRequest so providers that key behaviour on the originating run can resolve it at the
LlmClient.execute(LlmExecutionRequest) boundary, where the request payload alone is otherwise anonymous. Real
network providers ignore this; it exists for deterministic or run-aware clients (for example the fake provider).
Every component is nullable: the whole record is null for direct, run-less LlmClient use, and
individual components are null when the corresponding identifier is not yet assigned or not applicable.
-
Constructor Summary
ConstructorsConstructorDescriptionLlmInvocationIdentity(String workflowId, String runId, String stepId, String agentId) Creates an instance of aLlmInvocationIdentityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.runId()Returns the value of therunIdrecord component.stepId()Returns the value of thestepIdrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworkflowIdrecord component.
-
Constructor Details
-
LlmInvocationIdentity
Creates an instance of aLlmInvocationIdentityrecord class.- Parameters:
workflowId- the value for theworkflowIdrecord componentrunId- the value for therunIdrecord componentstepId- the value for thestepIdrecord componentagentId- the value for theagentIdrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
workflowId
Returns the value of theworkflowIdrecord component.- Returns:
- the value of the
workflowIdrecord component
-
runId
Returns the value of therunIdrecord component.- Returns:
- the value of the
runIdrecord component
-
stepId
Returns the value of thestepIdrecord component.- Returns:
- the value of the
stepIdrecord component
-
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-