Check if a state key exists
This is a method of the Agents class in the agents module.
def has_state(key: str) -> bool