Sovereign-memory, multi-agent, iNFT-native agent framework for 0G. Encrypted memory on 0G Storage, TEE-attested inference on 0G Compute, ERC-7857 iNFT lifecycle with 1.5s cryptographic revocation.




ZeroForge is the visual side of the SovereignClaw stack — an open-source, sovereign-memory, multi-agent, iNFT-native agent framework for 0G. It gives developers four things that today's agent frameworks treat as afterthoughts: encrypted memory you own, TEE-attested inference, an ERC-7857 iNFT lifecycle with a real kill switch, and a drag-and-drop builder that compiles to the exact same TypeScript an engineer would write by hand.
Almost every agent framework today treats memory as state in someone else's database. You don't own it, you can't prove what was there, and there's no lifecycle — no transfer story, no revocation, no audit trail. Agents are stateful programs without a sovereignty story.
ZeroForge fixes this at the framework layer, on 0G's primitives, end-to-end.
Package | What it does |
|---|---|
| Agent runtime with the |
| Encrypted KV / Log providers backed by 0G Storage. AES-256-GCM with HKDF-SHA-256, KEK derived from wallet signature |
| ERC-7857 helpers: |
| Multi-agent orchestration over a 0G Log bus. Planner / Executor / Critic loop with typed events ( |
| Self-critique with four built-in rubrics plus custom rubrics; learnings persisted under |
16602)Contract | Address |
|---|---|
|
|
|
|
ZeroForge Studio — Next.js drag-and-drop builder + landing demo → https://sclaw-studio-82lp.vercel.app/
Docs site → https://sclaw-backend.vercel.app/
Dev oracle + studio deploy backend — Railway, EIP-712 signed proofs, bearer-token auth
Layer | Integration |
|---|---|
0G Compute Router |
|
0G Storage Log | Encrypted sovereign memory ( |
0G EVM Chain |
|
ERC-7857 iNFT |
|
Sovereignty without revocation is theater.
revokeMemory() zeroes the on-chain wrapped DEK, marks the MemoryRevocation registry, and the oracle refuses any future re-encryption — measured end-to-end at 1.5 seconds, well under our 5-second target. Chainscan-verifiable.
Honest about what it can't do: immutable ciphertext stays on 0G Storage forever; an already-decrypted session can't be recalled. Fully documented in
docs/security.md's L1–L12 production-gap ledger.
git clone https://github.com/irajgill/sclaw.git
cd sclaw && cp .env.example .env # fill PRIVATE_KEY + COMPUTE_ROUTER_API_KEY
pnpm install
cd examples/research-claw && pnpm dev
Output includes:
A TEE-verified inference result
A self-critique with a learning pointer
Four encrypted 0G Storage writes
A chainscan URL for your freshly-minted ResearchClaw iNFT
Prefer no CLI? Drag-build a 3-agent swarm at sovereignclaw-studio.vercel.app and click Deploy — three real iNFTs land on chainscan-galileo in ~60 seconds.
ZeroForge was built in 10 sequenced phases, each ending in a verifiable Definition-of-Done artifact.
pnpm monorepo + Turbo + Foundry. CI green from day one.
@sovereignclaw/memory + @sovereignclaw/core. AES-256-GCM with HKDF-SHA-256 KEK derivation from wallet signatures. OG_Log provider backed by 0G Storage Log; InMemory for tests.
AgentNFT.sol (ERC-7857) + MemoryRevocation.sol. 77 Foundry tests across 7 suites including invariants × 128k handler calls per property. Deployed to 0G Galileo at 0xc3f99...0601 and 0x73508...b6AC. Gas snapshot committed.
@sovereignclaw/inft with mint / transferWithReencryption / revoke / recordUsage. EIP-712 byte-equality between on-chain _verifyOracleProof and off-chain digestForOracleProof enforced by a Foundry-emitted fixture both sides re-derive. Dev oracle (apps/backend, Hono) deployed to Railway with bearer-token auth. Full mint → transfer → revoke example shipped.
~120 LoC. Reproducible clone-to-iNFT path under 10 minutes. pnpm benchmark:cold-start measures wall time end-to-end (current: ~85s).
@sovereignclaw/mesh over the 0G Log bus. planExecuteCritique pattern with typed events. 3-agent research-mesh example: 6 encrypted bus events on-log, all with chainscan-verifiable storage roots.
@sovereignclaw/reflection. reflectOnOutput() with 4 built-in rubrics + custom rubric support. Learnings persisted as learning:<runId>, queryable via listRecentLearnings. ResearchForge wired with reflect on every run.
packages/studio — Next.js drag-and-drop builder with 6 node types, pure-function codegen, Monaco live preview. /studio/deploy and /studio/status/:id added to backend: esbuild-validates generated code, writes manifest to 0G Storage, mints one iNFT per agent. pnpm smoke:studio deploys the seed 3-agent swarm in ~60s.
Per-package READMEs (install + 10-line quickstart + API table + errors table). docs/architecture.md with layered diagram and data flows. docs/benchmarks.md with five reproducible scripts (LoC, inference RTT, revoke latency, mesh throughput, cold start). Raw JSON committed under scripts/.benchmarks/.
revokeMemory phase instrumentation (onPhase hook + timings result): oracle-side refuse now measured at 1.5s, beating the 5s target. Studio wallet-connect with EIP-712 deploy auth. Server-side codegen echo diff rejects tampered client source before gas. Custom reflection rubrics in the inspector. docs/security.md upgraded to audit-grade (attacker-capability threat model + L1–L12 production-gap ledger). CI LoC gate added.
Five @sovereignclaw/* packages published to npm. Production oracle + studio backend live on Railway. Light + playful UI re-skin across studio builder, landing demo, and docs site. Five Mermaid architecture diagrams added to the root README. All in-app references repointed to github.com/irajgill/sclaw.
Artifact | Count |
|---|---|
npm packages | 5 |
Contracts on-chain | 2 |
Production services | 2 |
Working examples | 4 |
Foundry tests | 77 |
Vitest unit tests | 123 |
Reproducible benchmarks | 5 |
Not currently raising. ZeroForge is open-source under Apache 2.0 — the framework and all examples are free for any 0G developer to use, fork, or build on top of.
We are open to:
0G Foundation ecosystem grants — to fund an external audit of AgentNFT.sol + MemoryRevocation.sol (Foundry tests already cover happy path, fuzz, and invariants; an independent review would unblock mainnet deployment)
Infrastructure-focused funds and angels who back open-source agent / on-chain AI tooling
No SAFE. No token. No presale. The framework is the product; the iNFTs minted by users are theirs, not ours.
Contact: github.com/irajgill/sclaw — issues, PRs, or the responsible-disclosure path in docs/security.md