Class ModelCallLimitHook

java.lang.Object
com.alibaba.cloud.ai.graph.agent.hook.ModelHook
com.alibaba.cloud.ai.graph.agent.hook.modelcalllimit.ModelCallLimitHook
All Implemented Interfaces:
Hook

public class ModelCallLimitHook extends ModelHook
Hook that tracks and limits model call counts. This hook monitors the number of model calls made during agent execution and can terminate the agent when specified limits are reached. It supports both thread-level and run-level call counting with configurable exit behaviors.