adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
58 lines (57 loc) • 1.52 kB
TypeScript
/**
* Memory module - Provides memory systems for agents
*/
export { BaseMemoryService, MemoryResult, SearchMemoryResponse } from './BaseMemoryService';
export { InMemoryMemoryService } from './InMemoryMemoryService';
export { VertexAiRagMemoryService, VertexAiRagConfig } from './VertexAiRagMemoryService';
/**
* Base Memory interface that all memory implementations should implement
*/
export interface BaseMemory {
add(item: any): void;
get(query?: any): any;
clear(): void;
[key: string]: any;
}
/**
* Default memory implementation
*/
export declare class Memory implements BaseMemory {
private items;
/**
* Add an item to memory
* @param item The item to add to memory
*/
add(item: any): void;
/**
* Get items from memory, optionally filtered by a query
* @param query Optional query to filter memory items
* @returns Matching memory items
*/
get(query?: any): any;
/**
* Clear all items from memory
*/
clear(): void;
}
/**
* Conversation memory specialized for chat history
*/
export declare class ConversationMemory implements BaseMemory {
private messages;
/**
* Add a message to the conversation
* @param item Message to add
*/
add(item: any): void;
/**
* Get conversation history
* @param query Optional query to filter messages
* @returns Conversation messages
*/
get(query?: any): any;
/**
* Clear conversation history
*/
clear(): void;
}