Record Class AgentSpec
java.lang.Object
java.lang.Record
com.alibaba.cloud.ai.graph.agent.tools.task.AgentSpec
public record AgentSpec(String name, String description, String systemPrompt, List<String> toolNames, String model)
extends Record
Specification for a sub-agent, parsed from Markdown files with YAML front matter.
Compatible with spring ai agent spec format. The markdown body becomes the system prompt; front matter defines name, description, and optional tool filtering.
- Author:
- Spring AI Alibaba
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.name()Returns the value of thenamerecord component.static AgentSpecCreate a minimal spec with required fields only.Returns the value of thesystemPromptrecord component.Returns the value of thetoolNamesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AgentSpec
public AgentSpec(String name, String description, String systemPrompt, List<String> toolNames, String model) Creates an instance of aAgentSpecrecord class.- Parameters:
name- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentsystemPrompt- the value for thesystemPromptrecord componenttoolNames- the value for thetoolNamesrecord componentmodel- the value for themodelrecord component
-
-
Method Details
-
of
Create a minimal spec with required fields only. -
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord 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
-