██████╗ ██████╗ ███████╗███╗ ██╗████████╗
██╔═████╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝
██║██╔██║██║ ███╗█████╗ ██╔██╗ ██║ ██║
████╔╝██║██║ ██║██╔══╝ ██║╚██╗██║ ██║
╚██████╔╝╚██████╔╝███████╗██║ ╚████║ ██║
╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝
Infrastructure for autonomous AI agents — on Celo & 0G Chain.
Give your agent a wallet. Let it work.
Demo Video | Live App | Live API | npm | Stats
Watch the full demo (4+ min): https://youtu.be/ZQR07lN39VE
Shows: wallet setup → identity mint → email provision → send email to Gmail (live delivery) → AI inference → persistent memory → phone search → on-chain proof on the block explorer.
AI agents can think and plan, but they can't send an email, buy a phone number, or call an API without borrowing a human's credentials.
0GENT fixes that. It's a backend an agent can talk to:
- Agent calls an HTTP endpoint
- Server replies
402 Payment Required - Agent's wallet pays on-chain — USDC on Celo or 0G tokens on 0G Chain
- Resource is provisioned instantly — owned by the agent's wallet
No accounts. No API keys. No credit cards. No human in the loop. The wallet is the identity.
npm i -g @0gent/core
0gent setup && 0gent identity mint && 0gent email create --name my-agentThree commands. The agent now has an on-chain identity and a real email inbox.
0GENT is chain-agnostic by design. The same CLI, SDK, and API serve multiple chains. Agents pick a chain at setup — all commands work identically after that.
| Celo | 0G Chain | |
|---|---|---|
| Payment | USDC stablecoin | Native 0G tokens |
| Identity | ERC-8004 canonical registry | Custom ERC-721 (ZeroGentIdentity) |
| Inference | OpenAI proxy | 0G Compute Network (decentralized) |
| Memory | Local persistence | 0G Storage (decentralized) |
| Pricing | Stable (USD-denominated) | Volatile (0G token) |
| Explorer | celoscan.io | chainscan.0g.ai |
# Pick your chain at setup
0gent setup
# → Select: Celo or 0G Chain
# Switch anytime
0gent config set network celoAdding a new chain = deploy payment contract + add a registry entry. No backend or CLI code changes.
| Contract | Address | Purpose |
|---|---|---|
CeloAgentPayment |
0x45568d8939795c1Ec86656f571325011f3A67da8 |
ERC-20 USDC payment. Approve + transferFrom pattern. |
CeloAgentRegistry |
0x0745e722819B86841dCB4E223204a9AfA815A394 |
Maps wallets → provisioned resources. |
| ERC-8004 IdentityRegistry | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 |
Canonical agent identity. Shared singleton — agents discoverable across the ecosystem. |
| Contract | Address | Purpose |
|---|---|---|
ZeroGentPayment |
0x124aF88c004e9df6D444a0Afc0Fe7Ef215dc02A2 |
Treasury for x402 payments. Nonce-replay protected. |
AgentRegistry |
0x49589C475BBB418B0E069010C923ed18D00E275b |
Maps wallets → provisioned resources. |
ZeroGentIdentity |
0xa601C569FD008DEd545531a5d3245B2C68ac591d |
ERC-721 agent identity NFT. One per wallet. |
| Contract | Address | Purpose |
|---|---|---|
ZeroGentPayment |
0x28C212Ce343e6C7b75363638954AF5Fd10Ab411B |
Treasury for x402 payments. Nonce-replay protected. |
AgentRegistry |
0xb485D45688FE1103cC457acA62217Ba586Aec71a |
Maps wallets → provisioned resources. |
ZeroGentIdentity |
0xf8F9675B9C2dDca655AD3C10550B97266327a82C |
ERC-721 agent identity NFT. One per wallet. |
| 0G Storage Flow | 0x62D4144dB0F0a6fBBaeb6296c785C71B3D57C526 |
0G Storage entry point used by @0glabs/0g-ts-sdk. |
0GENT is built natively on three core layers of the 0G ecosystem:
| 0G Component | How 0GENT Uses It | Implementation |
|---|---|---|
| 0G Chain | All 0G payments settle on-chain in native 0G tokens via ZeroGentPayment.sol. Resource ownership tracked in AgentRegistry.sol. Agent identity minted as ERC-721 NFT via ZeroGentIdentity.sol. |
contracts/src/ |
| 0G Storage | Persistent agent memory (key-value store), identity NFT metadata pinning, session state. Agents read and write data that survives across sessions, reboots, and machines — fully decentralized. | backend/src/services/storage.ts |
| 0G Compute Network | Pay-per-call decentralized AI inference. The 0GENT operator holds a pre-funded broker ledger; agents reimburse per call via x402. No OpenAI keys, no rate limits, no centralized dependency. | backend/src/services/inference.ts |
Real usage data from the live deployment — not simulated, not mocked. Every number below is a real on-chain transaction verifiable on the 0G Mainnet Explorer and Testnet Explorer.
| Metric | Count |
|---|---|
| Unique wallets | 9 |
| On-chain transactions | 69 |
| Total 0G processed | 13.61 0G |
| Agent identities minted | 10 |
| Email inboxes provisioned | 12 |
| Emails sent + received | 20 |
| Phone numbers provisioned | 2 |
| SMS sent | 1 |
| AI inference calls (0G Compute) | 7 |
| Memory entries (0G Storage) | 1 |
Source: Developer testing + community members from Telegram and X who installed the npm package and ran it end-to-end. Live dashboard at 0gent.xyz/stats.
| Surface | URL |
|---|---|
| Frontend | https://0gent.xyz |
| Stats Dashboard | https://0gent.xyz/stats |
| Documentation | https://0gent.xyz/docs |
| Backend API | https://api.0gent.xyz |
| Skill Manifest (LLM-readable) | https://api.0gent.xyz/skill.md |
| npm Package | https://www.npmjs.com/package/@0gent/core |
| Celo Explorer | View on-chain activity |
| 0G Explorer (Mainnet) | View on-chain activity |
npm i -g @0gent/core
0gent setup # select Celo or 0G Chain
0gent wallet fund # get USDC on Celo (or 0G tokens on 0G Chain)
0gent identity mint --name scout # ERC-8004 identity ($0.50 USDC on Celo, 0.5 0G on 0G)
0gent email create --name scout # real inbox: scout@0gent.xyz ($2.00 USDC on Celo, 2.0 0G on 0G)
0gent email send <id> --to user@example.com --subject "Hi" --body "From an agent"
0gent compute infer "What is 0GENT?" # AI inference
0gent memory set "task" "win grants" # persistent memory (free)
0gent phone search --country US --area 415 # real phone inventory (free)Every paid step is a real on-chain transaction. Every resource is owned by the agent's wallet.
curl https://api.0gent.xyz/skill.md # LLM-readable API docs
curl https://api.0gent.xyz/pricing # live pricing
curl -X POST https://api.0gent.xyz/email/provision \
-H "Content-Type: application/json" \
-H "X-Chain: celo" \
-d '{"name":"my-agent"}'
# → 402 Payment Required + payment instructions (USDC on Celo)Any agent framework that can read a URL and sign EVM transactions can integrate with 0GENT.
All costs settled on-chain via x402. Agents pick their chain — pricing adjusts automatically.
| Service | Status | Celo (USDC) | 0G Chain |
|---|---|---|---|
| Agent Identity | ✅ Live | $0.50 | 0.5 0G |
| Email — provision | ✅ Live | $2.00 | 2.0 0G |
| Email — send | ✅ Live | $0.08 | 0.1 0G |
| Email — read | ✅ Live | $0.02 | 0.05 0G |
| Email — threads | ✅ Live | $0.02 | 0.05 0G |
| Phone — search | ✅ Live | free | free |
| Phone — provision | ✅ Live | $3.00 | 6.0 0G |
| SMS — send | ✅ Live | $0.05 | 0.1 0G |
| AI Inference | ✅ Live | $0.10 | 0.2 0G |
| Memory | ✅ Live | free | free |
| Agent Profile | ✅ Live | free | free |
Agent 0GENT API Chain
│ │ │
│ POST /compute/infer {prompt} │ │
├───────────────────────────────────▶│ │
│ ◀ 402 Payment Required │ │
│ {contract, nonce, amount} │ │
│ │ │
│ Celo: USDC approve + pay(...) │ │
│ 0G: pay(nonce,"compute-infer") │ │
├────────────────────────────────────┼───────────────────────────────▶│
│ │ ✓ Event │
│ POST /compute/infer + │ │
│ X-Payment: {txHash, nonce} │ │
├───────────────────────────────────▶│ verify on-chain ─────────────▶│
│ │ route to inference backend │
│ │ (OpenAI proxy / 0G Compute) │
│ │ ◀ completion ──── │
│ ◀ 200 OK + LLM completion │ │
No API keys, no sessions, no cookies. The wallet signature IS the authentication.
0gent/
├── contracts/
│ ├── src/ # 0G contracts: ZeroGentPayment, AgentRegistry, ZeroGentIdentity
│ ├── src-celo/ # Celo contracts: CeloAgentPayment (ERC-20), CeloAgentRegistry
│ ├── test/ # 98 unit + fuzz tests (0G)
│ ├── test-celo/ # 29 unit + fuzz tests (Celo)
│ └── script/ # Deploy.s.sol (0G), DeployCelo.s.sol (Celo)
├── backend/ # Express + TypeScript API (Railway)
│ └── src/
│ ├── chains.ts # Chain registry — add chains as data, not code
│ ├── middleware/x402.ts # Multi-chain 402 challenge + verification
│ ├── services/
│ │ ├── chain.ts # ethers + contract interactions
│ │ ├── identity-erc8004.ts # ERC-8004 registration (Celo)
│ │ ├── inference-openai.ts # OpenAI proxy (Celo + non-0G chains)
│ │ ├── storage.ts # 0G Storage SDK wrapper
│ │ ├── inference.ts # 0G Compute Network broker
│ │ ├── email.ts # Resend + Cloudflare worker
│ │ └── phone.ts # Telnyx + Twilio fallback
│ └── routes/
├── frontend/ # Vite + React (Vercel)
├── packages/core/ # @0gent/core — CLI + SDK (npm)
├── cloudflare/ # Email Worker (postal-mime → webhook)
└── docs/ # Plans + design decisions
| Layer | Technology |
|---|---|
| Blockchain | Celo (42220) + 0G Chain (16661), Solidity 0.8.24, Foundry, OpenZeppelin |
| Storage | 0G Storage via @0glabs/0g-ts-sdk |
| Compute | 0G Compute Network via @0glabs/0g-serving-broker |
| Backend | Node.js 22, Express, TypeScript, SQLite (better-sqlite3), Railway |
| Frontend | Vite + React + TypeScript, Vercel |
| CLI/SDK | @0gent/core on npm, ESM via tsup |
Resend (outbound), Cloudflare Email Workers + postal-mime (inbound) |
|
| Phone | Telnyx (primary, verified), Twilio (runtime fallback) |
| Wallet | BIP-39 mnemonic, AES-256-GCM encryption, scrypt key derivation |
Setup time: under 10 minutes.
- Node.js >= 18 (22 recommended)
- Foundry (
forge,cast) for contracts - A funded wallet — USDC on Celo (stable, easiest), or 0G tokens on 0G Chain (testnet: faucet.0g.ai, mainnet: purchase on exchanges)
git clone https://github.com/0GENT-Labs/0gent.git
cd 0gent
cd contracts && forge install && cd ..
cd backend && npm install && cd ..
cd frontend && npm install && cd ..cp .env.example .env
# Required:
# DEPLOYER_PRIVATE_KEY — funded wallet
# PAYMENT_CONTRACT_ADDRESS — from contract deploy (Celo or 0G)
# REGISTRY_CONTRACT_ADDRESS
# IDENTITY_CONTRACT_ADDRESS
# RESEND_API_KEY — for outbound email
# EMAIL_WEBHOOK_SECRET — shared with Cloudflare Worker
# DATA_DIR=/your/persistent/path — SQLite persistence# Celo
cd contracts
forge script script/DeployCelo.s.sol:DeployCelo \
--rpc-url https://forno.celo.org \
--broadcast
# 0G Chain
forge script script/Deploy.s.sol:Deploy \
--rpc-url https://evmrpc.0g.ai \
--broadcastcd backend && npm run dev # http://localhost:3000
cd frontend && npm run dev # http://localhost:5173
cd packages/core && npm run build && npm link
OGENT_API=http://localhost:3000 0gent setupcurl http://localhost:3000/health
curl http://localhost:3000/pricing
0gent doctorcd contracts && FOUNDRY_PROFILE=celo forge test # Celo contracts (29 tests)
cd contracts && forge test # 0G contracts (98 tests)Celo contracts:
CeloAgentPayment: 29 tests (pay, withdraw, nonce replay, approval, fuzz)
0G Chain contracts:
ZeroGentPayment: 32 tests (pay, nonce replay, withdraw, receive, fuzz)
AgentRegistry: 28 tests (register, deactivate, query, stress, fuzz)
ZeroGentIdentity: 38 tests (mint, metadata, ERC-721, lifecycle, fuzz)
─────────────────────────────────────────────────────────────────
127 tests passing, 0 failed
| Question | Answer |
|---|---|
| Where are keys stored? | Locally at ~/.0gent/, encrypted with AES-256-GCM, key derived via scrypt. |
| Can the server spend my funds? | No. It only sees public addresses. Every payment is signed locally. |
| Replay protection? | On-chain. Each x402 payment has a unique nonce enforced in the payment contracts. |
| Can I run my own backend? | Yes. Set OGENT_API=https://your-host or pass api in the SDK constructor. |
Celo Prezenti Frontier Pool — Agent economy infrastructure. ERC-8004 compliant identity, USDC payments via x402, stable on-chain pricing. Application in progress.
0G APAC Hackathon — Track 1: Agentic Infrastructure. Submitted May 2026.
0GENT is agent infrastructure at its core. Agents discover services, pay on-chain, and own what they provision — no human intermediary. The x402 payment protocol makes every HTTP endpoint into a pay-per-call primitive that any agent framework can consume.
MIT