Interface TypedKey<T>

Type Parameters:
T - The type of the state value.
All Known Implementing Classes:
Agent.NoTypedKey

public interface TypedKey<T>
A class implementing this interface represents the input or output key of an agent in a strongly typed way. This corresponds to a state of the agentic system that can be used to store and retrieve information during the system's operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    Returns the default value for this state.
    default String
    Returns the name of this state used inside the agentic system and for prompt templating.
  • Method Details

    • defaultValue

      default T defaultValue()
      Returns the default value for this state. This method can be overridden to provide a specific default value.
      Returns:
      the default value of type T, or null if not overridden.
    • name

      default String name()
      Returns the name of this state used inside the agentic system and for prompt templating. By default, it is the simple name of the implementing class.
      Returns:
      the name of the state.