Interface PlatformAgentFactory
public interface PlatformAgentFactory
Hands out pre-loaded
ComposedAgent.Builders backed by Designer-side tool surfaces.
Obtained through DesignerAiContext.agents(); the factory captures the surrounding DesignerContext once and is reused for every caller that needs the same baseline agents.
Each accessor returns a fresh ComposedAgent.Builder on every call, pre-seeded with the
agent's baseline preamble, tools, and context. Callers layer host-specific framing, extra tools,
and context sections on the builder and call ComposedAgent.Builder.build() to produce the
final Agent.
-
Method Summary
Modifier and TypeMethodDescriptionexpressionAgent(FunctionFactory factory) Pre-loadedComposedAgent.Builderfor the Ignition expression-language assistant.extensionFunctionAgent(com.inductiveautomation.ignition.common.script.typing.ExtensionFunctionDescriptor descriptor) Pre-loadedComposedAgent.Builderfor an extension-function body editor — extends the scripting agent with extension function framing and a"Function signature"context section rendered fromdescriptor.Pre-loadedComposedAgent.Builderfor a Jython scripting agent — seeded with the Jython 2.7 preamble and the read-only tool bundles from the surroundingDesignerToolFactory.
-
Method Details
-
scriptingAgent
ComposedAgent.Builder scriptingAgent()Pre-loadedComposedAgent.Builderfor a Jython scripting agent — seeded with the Jython 2.7 preamble and the read-only tool bundles from the surroundingDesignerToolFactory.Callers typically add host-specific framing and a caller-context section before building:
Agent agent = factory.scriptingAgent() .typeId("com.example.scripting.repl") .framing("The user is in a REPL — emit complete script snippets...") .contextSection("Caller context", () -> callerContext) .build(); -
extensionFunctionAgent
ComposedAgent.Builder extensionFunctionAgent(com.inductiveautomation.ignition.common.script.typing.ExtensionFunctionDescriptor descriptor) Pre-loadedComposedAgent.Builderfor an extension-function body editor — extends the scripting agent with extension function framing and a"Function signature"context section rendered fromdescriptor.Callers typically add a caller-context section before building:
Agent agent = factory.extensionFunctionAgent(descriptor) .contextSection("Caller context", this::getAssistContext) .build();- Parameters:
descriptor- the extension function whose signature should be rendered into the "Function signature" context section.
-
expressionAgent
Pre-loadedComposedAgent.Builderfor the Ignition expression-language assistant. The base agent carries its own system prompt and tag-read tools and rendersfactoryas a Markdown function catalog. Callers typically add a caller-context section before building:Agent agent = factory.expressionAgent(functionFactory) .contextSection("Caller context", () -> myContext) .build();- Parameters:
factory- the expression-language function catalog the agent should advertise — typically the host editor'sFunctionFactory.
-