Reference
Environment & config
Everything needed to stand the stack up against 0G Galileo, plus the real on-chain artifacts proving the pipeline ran end-to-end.
#Galileo testnet
| Setting | Value |
|---|---|
| Chain id | 16602 |
| EVM RPC | https://evmrpc-testnet.0g.ai |
| Storage indexer | https://indexer-storage-testnet-turbo.0g.ai |
| Chain explorer | https://chainscan-galileo.0g.ai |
| Storage explorer | https://storagescan-galileo.0g.ai |
| Faucet | https://faucet.0g.ai |
#API environment
Validated with Zod once at startup. Secrets live only in the API process — never the browser.
| Variable | Purpose |
|---|---|
PRIVATE_KEY | Dedicated testnet agent wallet; also the encrypt-to-self secret. |
COMPUTE_PROVIDER | The chosen TeeML provider address. |
COMPUTE_LEDGER_A0GI | Initial ledger funding in OG (default 3, the contract minimum). |
DATABASE_URL | The Postgres hot cache. |
AGENT_REGISTRY_ADDRESS | Optional; when set, memory roots are also committed on 0G Chain. |
#Run the stack
pnpm install
cp .env.example .env # fill PRIVATE_KEY, COMPUTE_PROVIDER, DATABASE_URL
pnpm --filter @sworn/api verify:0g # Phase 0 — upload+read-back, one TEE inference + verify
pnpm --filter @sworn/api db:push # create the hot-cache tables
pnpm --filter @sworn/api dev # API on :4000 (reconcile job on a timer)
pnpm --filter @sworn/web dev # web on :3000
cd contracts && forge test # 8 contract tests#Live artifacts
Proven on Galileo. These are public on-chain records — the proof the full pipeline ran.
| Artifact | Value |
|---|---|
| Backend agent wallet | 0x761ccA9C359d9f5F9CA8F40707B0f8a24BAeD709 |
| Live TeeML provider | 0xa48f01287233509FD694a22Bf840225062E67836 (qwen2.5-omni-7b) |
| First live memory root | 0x1d99d33774b8d31ee36756c23827fe27f586220c46334302512a5976a5649e03 |
Honesty invariant
Key hygiene
The agent wallet is a dedicated testnet wallet holding only trivial faucet funds; its private key lives only in the API’s env and never in the browser, logs, or git. No custody, no auto-execution of real funds — Sworn counsels, you sign.