Package com.tnsai.identity
Record Class AgentDescriptor
java.lang.Object
java.lang.Record
com.tnsai.identity.AgentDescriptor
- Record Components:
agentClass- fully-qualified class name of the agent role (the@Capability-annotated entry point); part of the fingerprint inputsystemPrompt- the agent's system prompt body — when this changes, behaviour changes; auditors caretoolNames- stable list of tool names the agent has access to; ordering doesn't matter, but the set membership doesmodel- provider-qualified model id ("openai:gpt-5")buildHash- hash of the deployed JAR / build artefact; lets fingerprint differentiate "same config, different binary" casesmetadata- free-form annotations the operator wants to carry forward; not part of the version / fingerprint inputs
public record AgentDescriptor(String agentClass, String systemPrompt, List<String> toolNames, String model, Optional<String> buildHash, Map<String,String> metadata)
extends Record
Declarative description of an agent that an
AgentPrincipalProvider uses to mint an AgentPrincipal
(TNS-298). Captures the inputs an attestation system needs to bind
an identity to a specific behavioural configuration.
The provider hashes these fields into the resulting identity's
AgentPrincipal.runtimeFingerprint() and AgentPrincipal.version()
so behavioural changes (systemPrompt edited, a tool added,
the model swapped) automatically produce a new identity version.
- Since:
- 0.10.0 (TNS-298)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theagentClassrecord component.static AgentDescriptor.Builderbuilder()Returns the value of thebuildHashrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.model()Returns the value of themodelrecord component.Returns the value of thesystemPromptrecord component.Returns the value of thetoolNamesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AgentDescriptor
public AgentDescriptor(String agentClass, String systemPrompt, List<String> toolNames, String model, Optional<String> buildHash, Map<String, String> metadata) Creates an instance of aAgentDescriptorrecord class.- Parameters:
agentClass- the value for theagentClassrecord componentsystemPrompt- the value for thesystemPromptrecord componenttoolNames- the value for thetoolNamesrecord componentmodel- the value for themodelrecord componentbuildHash- the value for thebuildHashrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
builder
-
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). -
agentClass
Returns the value of theagentClassrecord component.- Returns:
- the value of the
agentClassrecord component
-
systemPrompt
Returns the value of thesystemPromptrecord component.- Returns:
- the value of the
systemPromptrecord component
-
toolNames
Returns the value of thetoolNamesrecord component.- Returns:
- the value of the
toolNamesrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
buildHash
Returns the value of thebuildHashrecord component.- Returns:
- the value of the
buildHashrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-