Scoped agent identity
Every agent is registered to its operating address with daily spend limits and whitelists owned by you. Revoke it onchain and the agent is immediately deactivated.
AegisSubnameRegistrySmall trades run automatically within daily spending limits. Moves at or above $1,000 hold onchain until you approve.
Every phase of guardrailed agent execution is recorded on Ethereum Sepolia and 0G. Verified transactions and cryptographic storage receipts from real runs below.
An agent asks to act. AegisNet checks who it is, builds the route, decides if a human must sign off, then settles it onchain.
The AI agent plans execution parameters inside 0G Private Compute TEEs, verifying liquidity and quotes.
AegisExecutionManager queries AegisSubnameRegistry on Sepolia to verify the agent's ENSv2 identity, EAC target contract whitelist, and daily spend limits.
Trades at or above the threshold hold onchain until authorization arrives from the registered ENS subname owner.
The trade settles atomically on Uniswap V3 via SwapRouter02 and writes an immutable decision audit record to 0G Storage.
# 1. Plan via 0G Private Compute POST /api/agent/propose { "amountUSD": 2500 } ← 0G Req: b9fed931… · 0G Storage Root: 0xc9d554… # 2. Onchain check on Sepolia AegisExecutionManager.requestExecution(adapter, data, 2500e18) ← ExecutionRequested requiresApproval true # 3. ENS Owner Approval Gate POST /api/approval/verify { sessionId } ← relayer signature ✓ (nullifier: 0x3d15…) # 4. Uniswap V3 swap & 0G storage record AegisExecutionManager.approveWithRelayer(reqId, nullifier, sig) ← SwapExecuted SETTLED ON SEPOLIA (USDC → WETH)
Agents with a raw private key can do anything. AegisNet gives each agent a named identity with hard limits, and brings a verified human in exactly when the stakes are high.
Every agent is registered to its operating address with daily spend limits and whitelists owned by you. Revoke it onchain and the agent is immediately deactivated.
AegisSubnameRegistryA whitelist of target contracts and a daily spend limit live onchain. Requests outside them are rejected before they are queued.
isAgentAuthorized()Anything at or above the agent's threshold pauses until human authorization arrives from the registered ENS subname owner. Each approval works only once with single-use replay protection.
≥ $1,000 → Owner GateAutonomous trade proposals are planned in 0G Private Compute TEEs, while Merkle-verified JSON decision records are permanently committed to 0G Storage.
0gm-1.0-35b-a3b · Merkle RootApproved trades route directly through Uniswap V3 SwapRouter02 on Sepolia, executing exact-input swaps with strictly configured slippage bounds.
SwapRouter02 · ExactInputSingleA pending high-value request can be cancelled by the agent's owner at any point before it executes. Nothing moves without the gate clearing.
cancelExecution()The same agent, three different trades. AegisNet decides, on its own, which ones can run, which need a human, and which get stopped.
Automated DAO treasury rebalancing within pre-approved daily spend limits.
Large opportunistic position exceeding the configured approval threshold.
Rogue or exploited agent attempting an unwhitelisted contract call or limit breach.
Every contract is live and verifiable on Etherscan. This list is loaded from the running backend when it's available.
Hardhat contracts, a TypeScript API and this console, all in one repo.
cd contracts
npm install
npm testbackend/.envSEPOLIA_RPC_URL=…
PRIVATE_KEY=…
RELAYER_PRIVATE_KEY=…
ZG_COMPUTE_API_KEY=…
ZG_STORAGE_RPC=https://rpc-storage-testnet.0g.ai
WORLD_ID_APP_ID=app_…cd backend
npm install && npm run build
npm start # → http://localhost:4000Writes are signed by the user's wallet directly on the contracts. The API plans, verifies and indexes.
/api/agent/propose0G Compute plans strategy & returns encoded Uniswap V3 calldata/api/approval/sessionCreate ENS Owner verification session/api/approval/verifyValidate owner authorization & return relayer attestation/api/execution/requestsEvery trade request, indexed from chain events/api/uniswap/infoUniswap V3 router, adapter, and Sepolia deployment details/api/zg/proofLatest 0G Compute request ID and 0G Storage Merkle root/api/healthChain, relayer, 0G compute, storage and indexer statusAegisNet is currently deployed for testing on Ethereum Sepolia (execution manager & Uniswap V3 swaps) and the 0G Galileo testnet (storage & private compute). Approval thresholds and USD exchange rates are configurable via environment variables for live demonstration.
AegisExecutionManager and AegisSubnameRegistry. First, the agent must be registered and active with its contract targets whitelisted. Second, the agent cannot exceed its daily spending limit (tracked and reset daily onchain). Third, any trade at or above the approval threshold pauses onchain until the registered ENS subname owner provides authorization with a single-use nullifier.
cancelExecution (callable by owner, agent, or anyone after deadline). Once cancelled, zero funds move, the transaction cannot be revived, and the single-use request state is sealed.
Register an agent, preview its route and run a guarded execution from the console.