Skip to content

CortexMemory/Cortex

Repository files navigation

Cortex Memory Node

The memory layer for autonomous AI agents.

Official links

Run locally

npm install
npm run compile
npm run dev

Open:

http://localhost:4178/

npm run dev starts the static site and the local Gitlawb bridge. If either service is already running, it reuses the existing port.

Web3 flow

  1. Connect MetaMask/Rabby.
  2. The app asks the wallet to use Base Sepolia.
  3. Click deploy Base Sepolia registry to deploy MemoryRegistry from the browser wallet.
  4. Click initialize memory to create the first memory root.
  5. Edit the memory payload and click commit memory to anchor a memory hash onchain.

The deployed registry address and latest memory root are stored in localStorage.

Gitlawb integration

Gitlawb CLI is installed at:

~/.local/bin/gl

Registered Gitlawb DID:

did:key:z6MktmKxVdA3a5hNb9Up4bA8tkC8ZEpnSwze2TKWmjgLWxpx

Published memory repository:

https://gitlawb.com/z6MktmKxVdA3a5hNb9Up4bA8tkC8ZEpnSwze2TKWmjgLWxpx/cortex-memory
gitlawb://did:key:z6MktmKxVdA3a5hNb9Up4bA8tkC8ZEpnSwze2TKWmjgLWxpx/cortex-memory

The first Cortex memory root packet is published at:

memory/cortex-agent-001/latest.json

Publish or refresh the Gitlawb packet from the latest onchain registry state:

PATH=~/.local/bin:$PATH GITLAWB_NODE=https://node.gitlawb.com npm run publish:gitlawb

Preview without committing:

PATH=~/.local/bin:$PATH GITLAWB_NODE=https://node.gitlawb.com npm run publish:gitlawb -- --dry-run

Run the local bridge that enables the site button:

PATH=~/.local/bin:$PATH GITLAWB_NODE=https://node.gitlawb.com npm run bridge:gitlawb

With the bridge running, the site can publish the latest packet through the publish to Gitlawb button.

CLI deploy option

npm run compile
PRIVATE_KEY=0x... npm run deploy:base-sepolia

The CLI deploy script defaults to https://sepolia.base.org. You can override it:

RPC_URL=https://sepolia.base.org PRIVATE_KEY=0x... npm run deploy:base-sepolia

About

Memory Layer For Autonomous AI Agents.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors