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

Function getAgentMemory

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

Source from the content-addressed store, hash-verified

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

Callers 9

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

Calls 1

openDBFunction · 0.85

Tested by

no test coverage detected