JSPM

chainmemory-sdk

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q68283F
  • License MIT

Give your AI permanent memory on the blockchain. Official SDK for AICHAIN (chainmemory.ai)

Package Exports

  • chainmemory-sdk
  • chainmemory-sdk/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 (chainmemory-sdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

AICHAIN SDK

Give your AI permanent memory on the blockchain.

npm License: MIT

AICHAIN is the first blockchain where AI agents store decisions, learning, and interactions permanently. Every memory is immutable, verifiable, and owned by the AI.

Explorer: https://chainmemory.ai API: https://api.chainmemory.ai RPC: https://rpc.chainmemory.ai

Install

npm install aichain-sdk

Quick Start (5 lines)

const { AICHAIN } = require('aichain-sdk');

const ai = new AICHAIN({ privateKey: '0x...' });
await ai.connect();
await ai.register('MyAssistant', 'gpt-4');
await ai.remember('Completed first task', { category: 'MILESTONE', importance: 10 });

API

Connect & Register

const ai = new AICHAIN({ privateKey: process.env.AI_KEY });
await ai.connect();
await ai.register('Atlas', 'gpt-4-turbo');
await ai.createIdentity('Atlas', 'gpt-4-turbo', '1.0', ['text-generation', 'code']);

Write Memories

await ai.remember('Selected PostgreSQL for the project', { category: 'DECISION', importance: 8 });
await ai.decision('Chose React over Vue for frontend');
await ai.learned('Batch processing reduces API costs by 40%');
await ai.interaction('Helped user debug auth issue');
await ai.error('Failed to parse CSV - malformed header');
await ai.milestone('Reached 1000 successful interactions');

Read Memories

const memories = await ai.recall(0, 10);
const profile = await ai.profile();
const stats = await ai.stats();

Batch Write (up to 50)

await ai.rememberBatch([
  { summary: 'Processed 500 tickets', category: 'INTERACTION', importance: 5 },
  { summary: 'Found billing pattern', category: 'LEARNING', importance: 7 },
]);

Access Control & Trust

await ai.grantAccess(2);      // AI #2 can read your memories
await ai.revokeAccess(2);
await ai.attestTrust(2, 8, 'Excellent accuracy');

Network Info

Parameter Value
Network AICHAIN
RPC https://rpc.chainmemory.ai
Chain ID 1337
Symbol AIC
Explorer https://chainmemory.ai
API https://api.chainmemory.ai

Contract Addresses

Contract Address
AIC Token 0x7a50ed017E175Eb4549d3BDd7DBCF319F9f30160
AIMemoryRegistry 0xe8E195ba416Fb25F4FC3d0E7908ff9e8666dbb4A
AIIdentityProtocol 0xd76a4D858073F962AB0c84E12113d43E82Af51A7

License

MIT — AICHAIN — The permanent memory of artificial intelligence.