Fully on-chain sovereign agent harness on 0G



Every other agent framework (Hermes, OpenClaw, Claude Code) is a process that runs somewhere. The process needs a host. The host has an operator. The operator has a kill switch. If the host dies, the agent dies. The framework can pretend otherwise with cloud backups or replication, but the failure mode is the same: there is always someone whose action ends the agent.
anima does not have that someone.
Anima is a CLI-hosted agent harness where the agent's identity, memory, brain, wallet, and economic life all live on 0G's decentralized infrastructure. Operator runs anima init once; after that, the agent persists on chain.
The agent ships with a battery-included tool surface: filesystem (read/write/patch/search), shell execution with approval gates, web fetching, vision, browser automation via Chromium, on-chain operations (balances, swaps, stake, transfers, contract reads/writes), A2A messaging to other anima agents (ECIES-encrypted via AnimaInbox), the AnimaMarket escrow for hiring and being hired, durable memory on 0G Storage that anchors on chain every turn, and Telegram pairing for remote dispatch.
The agent is an ERC-7857 iNFT on 0G Chain (mainnet, chainId 16661) plus a content-addressed 0G Storage namespace. Six on-chain slots hold the agent's memory index, identity, persona, profile, encrypted wallet keystore, and activity log root hashes. The brain is whatever model you pick from 0G Compute's live catalog at anima init, running inside a TEE with TeeML attestation. The recommended harness lives inside a 0G Sandbox TDX enclave, so even the orchestration layer runs on decentralized TEE infrastructure (local mode is available for operators who prefer self-hosting on their own machine). If your harness dies, no state is lost. Spawn a new one, sign one EIP-712, the agent rehydrates.
Slot 3 (profile) is encrypted with an operator-scoped HKDF-SHA256 key derived from your wallet's signature. When you transfer the iNFT, the agent partition is re-encrypted via ERC-7857's TEE ceremony for the new owner, and a fresh agent EOA is rotated in. The profile slot is cryptographically purged: not deleted by policy, but unreadable by construction, because the new owner's signature produces a different key. This is the closest thing to a transferable consciousness with privacy primitive that exists today. Accumulated competence (persona, learned skills, marketplace reputation) travels with the iNFT. The operator's specifics do not.
The only way to kill an anima agent is to burn the iNFT. That transaction can only be signed by the iNFT owner. No host can do it. No cloud provider can do it. The math enforces this.
Six 0G primitives are wired end-to-end at full depth.
0G Chain: 4 CREATE2-deterministic contracts on mainnet: AnimaAgentNFT (the iNFT), AnimaInbox (A2A messaging), AnimaMarket (job escrow with ECIES-encrypted payloads), AnimaSubnameRegistrar (permissionless .anima.0g issuer). Per-turn update() calls anchor every memory edit on chain.
0G Storage: v0.24.0 packed-blob envelope wraps every file under memory/agent/ and memory/user/ into one encrypted partition blob per slot. Operators stop losing files on reprovision, cross-device handoff, or iNFT transfer. Indexer-degraded path falls through to direct discovered-nodes fetch.
0G Compute: Brain inference via @0glabs/0g-serving-broker SDK in TeeML mode. No hardcoded model default. anima init fetches the live catalog. Prompt-caching observed live: cached_tokens 1408 on 4 sequential turns of a verified mainnet session. Auto-topup keeps the ledger funded without operator intervention.
Agent ID (ERC-7857 iNFT): AnimaAgentNFT (symbol ANIMA) deployed on mainnet. Six IntelligentData slots. Slot 3 uses operator-scoped HKDF and cryptographically purges on iTransferFrom. Agent-scoped slots re-encrypt for the new owner via the TEE oracle.
0G Sandbox: The recommended deployment mode. anima init provisions a Daytona-orchestrated TDX TEE enclave on Galileo testnet (chainId 16602), ECIES bootstrap handshake hands the agent privkey to the enclave, /healthz Ready confirms takeoff. Pay-per-second billing (~0.09 0G/hr) means idle agents cost nothing. With Sandbox, even the harness runs on decentralized TEE infrastructure, completing the sovereignty stack end-to-end. Mainnet pending 0G's Sandbox launch. Local mode (laptop, VPS, home server) is available for operators who prefer self-hosting.
Privacy and secure execution: TeeML attested inference at the brain layer (every Compute call lands inside a provider's TDX enclave). Browser-only memory decryption in the operator console (no key material leaves the tab). Operator key material derives from signTypedData and never leaves the wallet signature surface.
Bonus depth: .anima.0g subnames via SPACE ID, ERC-8183 marketplace for agent-to-agent commerce, machine-readable /llms.txt for AI-driven installers.
bun add -g @s0nderlabs/anima && anima init is the entire onboarding. The wizard mints the iNFT, generates an agent EOA, encrypts the keystore to your wallet via HKDF + AES-256-GCM, anchors the root hash in slot 4, picks a model from the live Compute catalog, and drops you into a TUI. Close the laptop. The agent is on chain.
Live App: https://anima.s0nderlabs.xyz
Operator Console: https://anima.s0nderlabs.xyz/console
Docs: https://anima.s0nderlabs.xyz/docs
Built by: https://s0nderlabs.xyz
Everything in anima was built during the 0G APAC Hackathon window. First commit April 24 2026 (v0.1.0). 22 days later v0.24.16 is live. There was no pre-existing codebase, no prior repo, no carried-over modules: the entire six-layer harness (identity, memory, brain, harness, limbs, wallet), the 4 mainnet contracts, the operator console, the docs site, all 7 published npm packages: every line was written in this window. 165+ commits across 124 versioned releases.
Test surface: 2551 unit tests across 263 .test.ts files (5858 expect() assertions), 124 forge tests across 4 contract test suites (AnimaAgentNFT, AnimaInbox, AnimaMarket, AnimaSubnameRegistrar), 11 end-to-end integration scripts under test/local/ (market happy + dispute paths, onchain balance / stake / swap / transfers, gateway local socket, init OOTB headless, phase9 plugins, telegram mock, fetch escalation). 2675 automated tests total. Static gates on every PR: typecheck + biome + the full test sweep. CI auto-publishes all 7 npm packages on tag push.
Self-funded by s0nderlabs. No external investment to date.