Class DesignerEnvironmentFacts

java.lang.Object
com.inductiveautomation.ignition.designer.ai.context.DesignerEnvironmentFacts
All Implemented Interfaces:
Supplier<String>

public final class DesignerEnvironmentFacts extends Object implements Supplier<String>
Renders a markdown ## Environment block summarising durable session facts — Ignition version and edition, current date, logged-in user, current project, gateway address and timezone, and project-level defaults — for embedding in an AI agent's system prompt.

Each get() call reads live state from the bound DesignerContext and gateway connection, so values reflect the session at the moment the system prompt is built (typically once per harness construction or clearMemory() call).

Example:

DesignerEnvironmentFacts facts = new DesignerEnvironmentFacts(designerContext);

// In an Agent.getSystemPrompt() implementation:
return SYSTEM_PROMPT_TEMPLATE.formatted(facts.get());
  • Constructor Details

    • DesignerEnvironmentFacts

      public DesignerEnvironmentFacts(DesignerContext context)
      Creates a facts supplier bound to the given context.
      Parameters:
      context - the Designer context to read environment facts from on each call.
  • Method Details

    • get

      public String get()
      Returns the rendered ## Environment markdown block. Lines whose values are null or blank are omitted, so the block always renders the facts that are actually known at the moment of the call.
      Specified by:
      get in interface Supplier<String>
      Returns:
      the rendered environment block, never null.