GeezerVison is showing adk.dev — VertexAiMemoryBankService | ADK for TypeScript: API Reference - v2.5.0
- VertexAiMemoryBankService
Class VertexAiMemoryBankService
Implementation of the BaseMemoryService using Vertex AI Memory Bank.
Constructors
constructor
-
Returns VertexAiMemoryBankService
Methods
addEventsToMemory
-
addEventsToMemory( request: { appName: string; customMetadata?: Record<string, unknown>; events: Event[]; sessionId?: string; userId: string; },): Promise<void>
Adds events to Vertex AI Memory Bank via memories.generate.
Parameters
- request: {
appName: string;
customMetadata?: Record<string, unknown>;
events: Event[];
sessionId?: string;
userId: string;
}
Returns Promise<void>
addMemory
-
addMemory( request: { appName: string; customMetadata?: Record<string, unknown>; memories: MemoryEntry[]; userId: string; },): Promise<void>
Adds explicit memory items using Vertex Memory Bank.
When a MemoryEntry.id is set, it is forwarded as the memoryId of the
created memory, so the caller picks the last component of the memory
resource name instead of letting the service generate one. An explicit
customMetadata['memoryId'] takes precedence over MemoryEntry.id.
The id is forwarded unvalidated, so an id the API rejects fails the create
call. Vertex accepts up to 63 characters from [a-z0-9-], starting with a
letter and ending with a letter or number.
Parameters
- request: {
appName: string;
customMetadata?: Record<string, unknown>;
memories: MemoryEntry[];
userId: string;
}
Returns Promise<void>
addSessionToMemory
-
addSessionToMemory(session: Session): Promise<void>
Adds a session to the memory.
Parameters
- session: Session
The session to add to the memory.
Returns Promise<void>
A promise that resolves when the session is added to the memory.
searchMemory
-
Searches for sessions that match the query.
A promise that resolves to SearchMemoryResponse containing the
matching memories.