remove

suspend fun <T : Any> remove(key: AIAgentStorageKey<T>): T?(source)

Removes the value associated with the given key from the storage.

Return

The value associated with the key, cast to type T, or null if the key does not exist.

Parameters

key

The key of type AIAgentStorageKey used to identify the value in the storage.