RepoMemory v2 offers a revolutionary memory system for AI agents, inspired by Git. It enables persistent, tracked changes through an immutable commit chain, ensuring integrity and transparency. With features like content-addressable storage and cross-agent profiles, this library and CLI tool enhances the way agents manage and recall knowledge.
RepoMemory v2 is an innovative, Git-inspired agentic memory system designed to provide persistent and versioned memory for AI agents without any runtime dependencies. It operates through a straightforward library and command-line interface (CLI), offering an intuitive way to manage various types of entities seamlessly.
SHARED_AGENT_ID (_shared), enables cross-agent collaboration on skills and knowledge.conversationId, enhancing context retention through grouped conversations.recall() function call retrieves relevant context from all collections, streamlining the information retrieval process.saveMany(), deleteMany(), and incrementMany() commands to enhance performance.node:fs, node:path, node:crypto, and fetch).As a Library:
import { RepoMemory } from 'repomemory';
const mem = new RepoMemory({ dir: '.repomemory' });
// Saving a memory
const [saved] = mem.memories.save('agent-1', 'user-1', {
content: 'User prefers TypeScript strict mode',
tags: ['preferences', 'typescript'],
category: 'fact',
});
// Searching for memories
const results = mem.memories.search('agent-1', 'user-1', 'typescript', 5);
// Viewing history of an entry
const history = mem.memories.history(saved.id);
// Updating a memory
mem.memories.update(saved.id, { content: 'User requires TypeScript strict mode' });
// Deleting a memory
mem.memories.delete(saved.id);
As a CLI:
repomemory init
repomemory save memory --agent my-agent --user user-1 --content "Prefers dark mode" --tags ui,preferences
repomemory search "dark mode" --agent my-agent --user user-1
repomemory history <entityId>
repomemory stats
repomemory verify
RepoMemory v2 is designed to enhance AI agents' memory capabilities, providing robust management of knowledge and interaction through an accessible interface, enabling greater functionality and efficiency without necessitating extensive dependencies.
No comments yet.
Sign in to be the first to comment.