Interface StateAwareToolCallback

All Superinterfaces:
org.springframework.ai.tool.ToolCallback
All Known Subinterfaces:
AsyncToolCallback, CancellableAsyncToolCallback
All Known Implementing Classes:
AsyncToolCallbackAdapter

public interface StateAwareToolCallback extends org.springframework.ai.tool.ToolCallback
Marker interface for tool callbacks that need state injection. AgentToolNode will inject state/config/updateMap for tools implementing this interface.

Tools implementing this interface will receive the following keys in their ToolContext:

  • AGENT_STATE_CONTEXT_KEY - The current OverAllState
  • AGENT_CONFIG_CONTEXT_KEY - The RunnableConfig
  • AGENT_STATE_FOR_UPDATE_CONTEXT_KEY - A Map for state updates
Since:
1.0.0
Author:
disaster
See Also:
  • Field Summary

    Fields inherited from interface org.springframework.ai.tool.ToolCallback

    logger
  • Method Summary

    Methods inherited from interface org.springframework.ai.tool.ToolCallback

    call, call, getToolDefinition, getToolMetadata