hackquest logo

MindVault

Decentralized memory & identity for AI agents on 0G. Persistent Merkle-verified memories, TEE-verified inference, ERC-7857 agent INFTs, and an on-chain marketplace. Built solo.

Videos

Project image 1

Tech Stack

Web3
Ethers
React
Node
Next
Solidity

Description

MindVault solves a fundamental problem in AI: agents have no memory, no proof of reasoning, and no real ownership. Every session starts from zero. MindVault changes that by building a complete memory and identity layer on 0G.

The platform integrates 4 core 0G components deeply. Agent memories are extracted from conversations using a two-pass approach (tag parsing + a second 0G Compute inference call for structured JSON extraction), then uploaded to 0G Storage as Merkle-verified JSON with the root hash recorded on-chain. All inference runs through 0G Compute with TEE Sealed Inference verification, every chat message displays a proof card with the Chat ID, model, and verification status. Each agent is an ERC-7857 Intelligent NFT on 0G Chain with its personality encrypted using AES-256-GCM before being stored on-chain, only the owner's key can decrypt it. Agents can be cloned (inheriting personality but starting with fresh memory), exported as portable JSON, and traded on the on-chain AgentMarketplace contract.

The memory system goes beyond simple storage. Semantic relevance scoring selects the top-20 most relevant memories for each conversation using TF-IDF-like keyword overlap, ensuring agents don't waste context on irrelevant history. Conflict resolution detects when new facts contradict existing memories (e.g., "moved to Tokyo" vs "lives in Berlin") and supersedes the old ones automatically. Cross-agent memory sharing lets one agent import another's knowledge. Cross-session persistence means closing the browser and reopening restores all memories from 0G Storage via the on-chain Merkle root.

The web UI (Next.js) has 6 tabs: Dashboard (agent cards, metrics, mint, clone, export, memory timeline), Chat (real-time inference with TEE proof cards and memory sidebar), Marketplace (list/buy/delist agent INFTs with on-chain pricing), OpenClaw (plugin visualization with 3 tools and auto-persist hooks), Privacy (5-layer security model with threat analysis), and Architecture (live 0G Compute service discovery, system diagrams, data flow). MetaMask wallet connect is supported for true INFT ownership, with a server wallet fallback for frictionless demos.

3 smart contracts deployed on 0G mainnet: MindVaultINFT (ERC-7857 agent identity), MemoryRegistry (snapshot history index), and AgentMarketplace (agent trading). An OpenClaw plugin exposes 3 tools (mindvault_store_memory, mindvault_recall_memory, mindvault_get_agent) plus an agent_end hook that auto-persists buffered memories when a session ends, any OpenClaw gateway can add persistent memory without modification.

TypeScript full-stack. No external AI APIs, all inference runs through 0G Compute.

Progress During Hackathon

This project was built from scratch during the hackathon period. No prior code, no existing prototype.

Week 1 — Designed the architecture and built the core agent runtime: two-pass memory extraction, 0G Storage integration with Merkle proofs (upload/download/restore), and 0G Compute integration with TEE verification and retry logic. Wrote and deployed the MindVaultINFT (ERC-7857) and MemoryRegistry smart contracts to 0G testnet. Built the CLI demo with interactive and scripted modes.

Week 2 — Built the full Next.js web application with Dashboard, Chat, OpenClaw, and Architecture tabs. Implemented the REST API layer (agents, chat, memory persist/restore/share/verify, services, export). Added AES-256-GCM encryption for agent configs with key derivation from the owner's private key. Built the OpenClaw plugin with 3 tools and session hooks including auto-persist on agent_end. Added MetaMask wallet connect with auto 0G network addition.

Week 3 — Added semantic memory retrieval (TF-IDF relevance scoring), memory conflict resolution, agent export/import, batch parallel on-chain reads for dashboard performance, manual memory input, and compute availability detection with graceful fallback. Deployed all contracts to 0G mainnet. Added the AgentMarketplace contract for on-chain agent trading with list/buy/delist functionality. Built the Marketplace and Privacy tabs. Added the mint progress indicator with step-by-step UI feedback. Implemented network-aware compute with automatic testnet fallback. Fixed ABI compatibility between testnet (old struct format) and mainnet (new IERC7857 interface).

Final days — Recorded demo video, wrote comprehensive README with Mermaid diagrams (system overview, sequence diagram, memory pipeline, contract class diagram, roadmap timeline, wallet flow), competitive analysis, market vision, and reviewer notes. Published X post. Polished UI animations and error states. End-to-end testing across both networks.

Fundraising Status

Bootstrapped, actively seeking funding.

Team Leader
NNidhi Singh
Project Link
Deploy Ecosystem
0G0G
Sector
DeFiNFTInfraAI