Class ToolCallLimitHook
java.lang.Object
com.alibaba.cloud.ai.graph.agent.hook.ModelHook
com.alibaba.cloud.ai.graph.agent.hook.toolcalllimit.ToolCallLimitHook
- All Implemented Interfaces:
Hook
Hook that tracks and limits tool call counts.
This hook monitors the number of tool calls made during agent execution
and can terminate the agent when specified limits are reached.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Method Summary
Modifier and TypeMethodDescriptionafterModel(OverAllState state, RunnableConfig config) beforeModel(OverAllState state, RunnableConfig config) static ToolCallLimitHook.Builderbuilder()getName()Methods inherited from class com.alibaba.cloud.ai.graph.agent.hook.ModelHook
getAgent, getAgentName, setAgent, setAgentNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.alibaba.cloud.ai.graph.agent.hook.Hook
getHookPositions, getKeyStrategys
-
Method Details
-
builder
-
beforeModel
- Overrides:
beforeModelin classModelHook
-
afterModel
- Overrides:
afterModelin classModelHook
-
getName
-
canJumpTo
-