Class ComposedAgent.Builder
java.lang.Object
com.inductiveautomation.ignition.common.ai.ComposedAgent.Builder
- Enclosing class:
ComposedAgent
Builder for
ComposedAgent. Obtain via the ComposedAgent.builder(...) factories.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Materializes the agent by evaluating every slot once.Appends an additional-context part.contextSection(String heading, Supplier<@Nullable String> body) description(String description) Overrides the description.framing(SystemPromptPart framing) Sets the system-prompt framing — typically a description of the specific editing situation the agent is helping with.Convenience overload that wrapsframinginto aSystemPromptPart.maxTurnsPerInvocation(int maxTurnsPerInvocation) Overrides the turn limit.Overrides the human-readable name.preamble(SystemPromptPart preamble) Sets the system-prompt preamble — typically a language- or domain-level primer shared across several agent configurations.Convenience overload that wrapspreambleinto aSystemPromptPart.tools(ToolBundle... bundles) Appends tool bundles to the agent's tool list.Overrides the type identifier.
-
Method Details
-
typeId
Overrides the type identifier. When extending a base agent, defaults to the base's typeId. -
name
Overrides the human-readable name. When extending a base agent, defaults to the base's name. -
description
Overrides the description. When extending a base agent, defaults to the base's description; required when not extending a base. -
maxTurnsPerInvocation
Overrides the turn limit. When extending a base agent, defaults to the base's limit, so a decorator that only splices in tools keeps the base's configured value rather than falling back toAgent.getMaxTurnsPerInvocation()'s default. -
preamble
Sets the system-prompt preamble — typically a language- or domain-level primer shared across several agent configurations. When extending a base agent, the base's system prompt is rendered first, then the preamble, then the framing. Replaces any previously-set preamble. -
preamble
Convenience overload that wrapspreambleinto aSystemPromptPart. Seepreamble(SystemPromptPart)for ordering semantics. -
framing
Sets the system-prompt framing — typically a description of the specific editing situation the agent is helping with. Rendered after the preamble (and after a base agent's system prompt, if extending one). Replaces any previously-set framing. -
framing
Convenience overload that wrapsframinginto aSystemPromptPart. Seeframing(SystemPromptPart)for ordering semantics. -
tools
Appends tool bundles to the agent's tool list. May be called repeatedly; bundles are concatenated in the order they were added. When extending a base agent, the base's tools are placed first; bundles supplied here follow. -
contextSection
Appends an additional-context part. Sections are rendered in the order they were added. When extending a base agent, the base's additional context is rendered first; sections supplied here follow. -
contextSection
Convenience overload that wrapsbodyinto aContextSectionunderheading. The supplier is invoked once duringbuild(); if it returns null or a blank string the section is omitted, otherwise its result is trimmed before rendering. -
build
Materializes the agent by evaluating every slot once.- Throws:
NullPointerException- if no description has been set and no base agent was supplied.
-