OptionalcallbacksOptional partial set of lifecycle callbacks for the state, allowing customization of state events.
OptionaldocOptional description for documentation purposes, aiding in state usage understanding.
Function to retrieve or compute the default state value.
OptionalgetOptional function to retrieve the current state, with a fallback to the default state. Overrides default state retrieval behavior if provided.
OptionalmiddlewaresOptional array of middleware functions to process the state during lifecycle operations.
OptionalpersistOptional flag to enable serialization of state values to persistent storage (e.g., hard drive).
OptionalsetOptional function to set or update the state. Overrides default state setting behavior if provided.
OptionalsharedOptional flag indicating whether the state can be shared across multiple agents.
The unique name of the state within the swarm.
Interface representing the schema for state management. Defines the configuration and behavior of a state within the swarm.