MCPcopy Create free account
hub / github.com/Roy3838/Observer / getAgentMemory

Function getAgentMemory

app/src/utils/agent_database.ts:277–291  ·  view source on GitHub ↗
(agentId: string)

Source from the content-addressed store, hash-verified

275
276// Get agent memory
277export async function getAgentMemory(agentId: string): Promise<string> {
278 const db = await openDB();
279
280 return new Promise((resolve, reject) => {
281 const tx = db.transaction(MEMORY_STORE, 'readonly');
282 const store = tx.objectStore(MEMORY_STORE);
283 const request = store.get(agentId);
284
285 request.onsuccess = () => {
286 const result = request.result;
287 resolve(result ? result.memory : '');
288 };
289 request.onerror = () => reject(request.error);
290 });
291}
292
293// Get all memory entries
294export async function getAllMemories(): Promise<Array<{ id: string; memory: string }>> {

Callers 12

loadMemoryFunction · 0.90
loadMemoryFunction · 0.90
handleMemoryUpdateFunction · 0.90
pre-processor.tsFile · 0.90
fetchAgentReferenceDataFunction · 0.90
agentReportFunction · 0.90
installE2EHooksFunction · 0.90
registry.tsFile · 0.90
saveAgentFunction · 0.85
exportAgentToFileFunction · 0.85
downloadAgentFunction · 0.85

Calls 1

openDBFunction · 0.85

Tested by

no test coverage detected