adk-typescript
Version:
TypeScript port of Google's Agent Development Kit (ADK)
60 lines (59 loc) • 1.61 kB
TypeScript
import { FunctionTool } from './FunctionTool';
import { ToolContext } from './ToolContext';
/**
* Interface for memory result events
*/
export interface MemoryEvent {
/** Author of the event */
author: string;
/** Content of the event */
content?: {
parts?: {
text?: string;
}[];
};
/** Timestamp of the event */
timestamp?: number;
}
/**
* Interface for memory search results
*/
export interface MemoryResult {
/** Array of events in this memory */
events: MemoryEvent[];
/** Other properties */
[key: string]: any;
}
/**
* Function to load memory by executing a search query
*
* @param params Parameters for the function
* @param params.query The query to search memory for
* @param context The tool context
* @returns Array of memory results
*/
export declare function loadMemory(params: Record<string, any>, context: ToolContext): Promise<MemoryResult[]>;
/**
* Tool for loading memory based on a query
*/
export declare class LoadMemoryTool extends FunctionTool {
/**
* Creates a new load memory tool
*/
constructor();
/**
* Process the LLM request to inform the model about memory
*
* @param params Parameters for processing
* @param params.toolContext The tool context
* @param params.llmRequest The LLM request to process
*/
processLlmRequest({ toolContext, llmRequest }: {
toolContext: ToolContext;
llmRequest: any;
}): Promise<void>;
}
/**
* Singleton instance of the Load Memory tool
*/
export declare const loadMemoryTool: LoadMemoryTool;