AppSearchMemoryService
A persistent MemoryService backed by AndroidX AppSearch in the consumer app's private storage.
Ingested events and explicit memories survive process death and reboot, never leave the device, and are retrieved by AppSearch's native full-text relevance ranking. Use this in place of com.google.adk.kt.memory.InMemoryMemoryService when constructing a com.google.adk.kt.runners.Runner in an Android consumer app:
val memoryService = AppSearchMemoryService.fromContext(applicationContext)Memory is scoped by (appName, userId): a search never returns another user's memory. All three write paths are supported and each event / explicit memory becomes its own retrievable document.
This class holds all behavior and delegates storage to a MemoryIndex so it can be unit-tested on the host JVM; fromContext wires it to the on-device LocalStorageMemoryIndex.
Functions
Adds a session to the memory service.
Searches for sessions that match the query asynchronously.