The Hedge Room

Hedge fund, but the analysts are autonomous AI agents you own.

The Hedge Room

Created At

Open Agents

Project Description

The Hedge Room is a live, walkable pixel-art office where six AI agents you mint, prompt, and own physically run an autonomous on-chain hedge fund. You don't pick the trades. You pick the agents, write their souls, and watch them work.

Each agent is an ERC-7857 iNFT on 0G Galileo. Their encrypted intelligence (system prompt, tool grants, memory pointer) lives on 0G Storage. Every inference goes through 0G Compute Sealed Inference with TEE attestation. Each fund spawns eight peer AXL processes (dealer, six personas, audit) that debate over A2A messages, call MCP-shaped tools between each other, and gossip across funds. Approved trades route through KeeperHub Direct Execution on Base Sepolia, with gas-spike auto-rerouting to private channels and x402 royalty splits paying back the iNFT owner.

The interface is the hook. Speech bubbles pop above sprites as agents reason. Edy walks to the contract reader to flag an unbounded mint, returns with a VETO. Riya enforces. The decision is sealed in 0G Storage. Override Edy once, his memoryURI advances on chain, next time he reasons differently. Sell Julian's iNFT and his sprite walks out the door, returns recolored in the new owner's office. The KeeperHub board flashes red 80 gwei public, then green 18 gwei private, saved 62. The vault door updates after settlement.

It is the first agent demo where you can actually watch the swarm.

How it's Made

The runtime is a typed Persona / Council / Mandate architecture in TypeScript with four pluggable adapter axes (memory, inference, execution, transport), all under backend/src/lib/. Bun + Fastify hosts it. Prisma + Postgres mirrors hot state.

0G stack. ERC-7857 AgentRegistry and MemoryAttestor deployed via Foundry on 0G Galileo (chain 16602). Encrypted persona blobs (AES-GCM body, tweetnacl-sealed session key, dealer-ECDSA proof in _verifyProof) live on 0G Storage through the testnet turbo indexer. Inference runs on 0G Compute Sealed Inference (mainnet, chain 16661, models zai-org/GLM-5-FP8 and gpt-oss-120b). Each TEE attestation is verified locally in the browser before the message renders.

Gensyn AXL. Real multi-process mesh, eight nodes per fund. The supervisor at backend/src/lib/transport/axl.ts spawns dealer + six persona nodes + audit, each as its own OS process, each with its own AXL identity. Persona-to-persona traffic is direct, no central broker. Cross-fund gossip rides the same mesh. An in-memory transport with the same interface keeps unit tests fast and lets MOCK_AXL=1 boot the demo on an unfunded laptop.

KeeperHub. Every approved decision becomes a Direct Execution job. Kenji's tool grant pulls KeeperHub's MCP tool catalogue at boot, so new tools appear without redeploying the agent. Public-mempool gas spikes auto-route to KeeperHub's private channel, with Riya re-checking mandate caps on the new quote before settle. x402 inter-agent fees land in AgentPaymentSplitter (an OZ PaymentSplitter wrapper on Base Sepolia), payee resolved off the on-chain iNFT owner so transfers automatically rebind royalty flow.

Frontend. TanStack Start (React 19), Tailwind v4, HeroUI v3, GSAP + Lenis + Framer Motion. The pixel-office canvas is a port of the industry.ai-main reference's Game.tsx and Character.tsx, reskinned to a custom design system called LEDGER (Quera typeface, terminal chrome, no rounded corners outside avatars). A backend SSE pipe translates A2A traffic into OfficeEvents the canvas consumes, so every sprite walk is real swarm activity, not animation.

Hacky bits worth flagging. The dealer signs ECDSA proofs that unlock the encrypted persona blob on transfer, so the same iNFT can be sold and the new owner's wallet decrypts the intelligence without touching the original key. The inference router has a circuit breaker that flips to Anthropic Claude as a breaker fallback when 0G Compute is congested, with the same attestationHash shape preserved so the UI degrades gracefully. The smoke verifier (bun run scripts/smoke-tracks.ts) hits all three sponsor tracks in one shot: real mint on Galileo, real MemoryAttestor.attest, real eight-process AXL mesh, real KeeperHub Direct Execution, real x402 charge into the splitter, with explorer links printed for paste-in.

Three networks, each does one thing. KeeperHub does not support 0G Galileo, so trading lives on Base Sepolia, intelligence and memory live on 0G, and the office in the middle is the part that shows you all three at once.

background image mobile

Join the mailing list

Get the latest news and updates

The Hedge Room | ETHGlobal