AI Wallet Guardians, owned as ERC-7857 iNFTs on 0G Chain, with persistent memory.
GuardianKit lets any user mint a personal AI security agent (a "Sentinel") that analyzes blockchain transactions before they are signed. Each Sentinel is an ERC-7857 intelligent NFT deployed on 0G Chain, with its system prompt, knowledge base, and full analysis history stored as encrypted memory on 0G Storage.
The agent classifies transactions as SAFE, WARNING, or DANGER, with structured reasoning and a confidence score. Four transaction types are supported: native transfers, token transfers, token approvals, and contract interactions. Every analysis is appended to the Sentinel's persistent memory, building a verifiable on-chain track record that grows with use.
Most AI agents today are SaaS products. You don't own them, you rent them. ERC-7857 changes that: the intelligence and memory are sealed on 0G Storage, the ownership is enforced on 0G Chain, and the whole package is transferable like any NFT. Your Sentinel travels with your wallet, not with a vendor.
Built as a defensive guardian for the average crypto user, who loses billions every year not to hacks but to malicious approvals signed without understanding what they grant.
GuardianKit is a monorepo with three layers.
Smart contract: a Solidity ERC-7857 implementation deployed on 0G Galileo testnet (chainId 16602). The GuardianINFT contract handles minting, ownership, and stores a memoryHash pointing to the agent's encrypted blob on 0G Storage. A MockOracle contract simulates the sealed-key authorization flow defined by the ERC-7857 standard.
Backend: a NestJS application with modular architecture. Key modules include og-storage (handles upload/download of agent memory blobs), inft (mint, read, analyze endpoints), llm (router with OpenAI gpt-4o-mini as primary provider and a 0G Compute stub ready for integration), and transaction-enricher (uses Etherscan API to fetch contract metadata and verify spender contracts on Ethereum mainnet during analysis).
Frontend: Vue 3 with Vite, Metamask integration via ethers.js. The UI exposes two main views: My Sentinels (list of owned and tracked iNFTs with live stats) and Analyze (transaction analysis form with three pre-built example scenarios for testing).
Persistent memory flow: when a Sentinel is minted, its initial state (system prompt, knowledge base of safe contracts and known scams, empty history) is uploaded to 0G Storage. The returned root hash is stored on-chain as the iNFT's memoryHash. Every subsequent analysis triggers a download of the current memory, an LLM inference call with that context, and a re-upload of the updated memory with the new analysis appended. The memoryHash is updated on-chain.
The structured prompt was specifically engineered to prevent hallucination: the agent is constrained to only reason from fields explicitly provided in the input, with strict rules against inventing information about spender age, reputation, or history that isn't in the knowledge base.

