Memory: the mechanism MemoryService implements.
API
@Interface()
export abstract class Memory {
abstract overview(projectId: string, agentId: string): Promise<MemoryOverviewResponse>;
abstract insertTemplatePlaceholder(
projectId: string,
agentId: string,
): Promise<MemoryOverviewResponse>;
abstract listScopes(projectId: string, agentId: string): Promise<MemoryScopeInfo[]>;
abstract listFiles(
projectId: string,
agentId: string,
scopeKey: string,
): Promise<MemoryFilesResponse>;
abstract readFile(
projectId: string,
agentId: string,
scopeKey: string,
filePath: string,
): Promise<MemoryFileResponse>;
abstract exportScope(projectId: string, agentId: string, scopeKey: string): Promise<Uint8Array>;
abstract importScope(
projectId: string,
agentId: string,
scopeKey: string,
request: { mode: MemoryImportMode; confirm: boolean; payload?: unknown; dataBase64?: string },
): Promise<MemoryImportResponse>;
abstract deleteFile(
projectId: string,
agentId: string,
scopeKey: string,
filePath: string,
): Promise<void>;
}Contract Topology
Static AST wiring across @Module / @Provide / @UseMembers (8)
overview
overview(projectId: string, agentId: string): Promise<MemoryOverviewResponse>@paramprojectId
string@paramagentId
string@returns
Promise<MemoryOverviewResponse>insertTemplatePlaceholder
insertTemplatePlaceholder(projectId: string, agentId: string): Promise<MemoryOverviewResponse>@paramprojectId
string@paramagentId
string@returns
Promise<MemoryOverviewResponse>listScopes
listScopes(projectId: string, agentId: string): Promise<MemoryScopeInfo[]>@paramprojectId
string@paramagentId
string@returns
Promise<MemoryScopeInfo[]>listFiles
listFiles(projectId: string, agentId: string, scopeKey: string): Promise<MemoryFilesResponse>@paramprojectId
string@paramagentId
string@paramscopeKey
string@returns
Promise<MemoryFilesResponse>readFile
readFile(projectId: string, agentId: string, scopeKey: string, filePath: string): Promise<MemoryFileResponse>filePath is the file's place in the scope: a topic's name, or <folder>/<path> for a file it keeps.
@paramprojectId
string@paramagentId
string@paramscopeKey
string@paramfilePath
string@returns
Promise<MemoryFileResponse>exportScope
exportScope(projectId: string, agentId: string, scopeKey: string): Promise<Uint8Array>The scope folder as a zip.
@paramprojectId
string@paramagentId
string@paramscopeKey
string@returns
Promise<Uint8Array>importScope
importScope(projectId: string, agentId: string, scopeKey: string, request: { mode: MemoryImportMode; confirm: boolean; payload?: unknown; dataBase64?: string }): Promise<MemoryImportResponse>@paramprojectId
string@paramagentId
string@paramscopeKey
string@paramrequest
{ mode: MemoryImportMode; confirm: boolean; payload?: unknown; dataBase64?: string }@returns
Promise<MemoryImportResponse>deleteFile
deleteFile(projectId: string, agentId: string, scopeKey: string, filePath: string): Promise<void>filePath as in readFile; a topic goes together with the folder of files it keeps.
@paramprojectId
string@paramagentId
string@paramscopeKey
string@paramfilePath
string@returns
Promise<void>