JSPM

@memorymerge/core

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q48528F
  • License MIT

Pluggable decentralized memory layer for AI agent swarms. Powered by 0G Storage, 0G Compute, and 0G Chain.

Package Exports

  • @memorymerge/core
  • @memorymerge/core/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@memorymerge/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@memorymerge/core

Pluggable decentralized memory layer for AI agent swarms. Powered by 0G Storage, 0G Compute, and 0G Chain.

Part of the MemoryMerge framework.

Install

git clone https://github.com/Techkeyy/memorymerge.git
cd memorymerge && npm install

Quick Start

import { createMemoryManager } from '@memorymerge/core';

const memory = createMemoryManager('my-agent');
await memory.writeFact('key', 'value', 0.9);
const context = await memory.getSwarmContext();

Pluggable Adapters

import { 
  StorageAdapter, 
  ZeroGStorageAdapter,
  TurnCountTrigger 
} from '@memorymerge/core';

// Implement your own storage:
class MyStorage implements StorageAdapter {
  async write(key: string, value: object): Promise<string> {
    // your implementation
    return 'hash';
  }
  async read(key: string): Promise<object | null> {
    return null;
  }
  list(prefix: string): string[] { return []; }
  async archive(snapshot: object, label: string): Promise<string> {
    return 'hash';
  }
  async downloadByHash(hash: string): Promise<object | null> {
    return null;
  }
}

Merkle Verification

import { VerifiableSnapshot, verifyFact } from '@memorymerge/core';

const snapshot = VerifiableSnapshot.build(facts, epoch, swarmId);
const proof = VerifiableSnapshot.generateProof(fact, snapshot);
const result = verifyFact(fact, snapshot.rootHash, proof.proof);
console.log(result.verified); // true

Packages

Package Description
@memorymerge/core Core SDK — storage, memory, reflection, Merkle
@memorymerge/openclaw OpenClaw skill integration