Class AgentCondition

java.lang.Object
dev.langchain4j.agentic.planner.AgentCondition

public final class AgentCondition extends Object
A described predicate on the AgenticScope deciding whether an agent runs. It can be evaluated more than once for a single invocation of the agent, so it must be cheap and free of side effects.
See Also:
  • Constructor Details

    • AgentCondition

      public AgentCondition(String description, Predicate<AgenticScope> predicate)
      Parameters:
      description - a human-readable description of the condition, shown in logs, listeners and reports, and sent to the model of a supervisor when it skips the agent
      predicate - the predicate evaluated on the AgenticScope
  • Method Details