Start Here
5-min Quickstart
One SDK. One API key. Your agent gets identity, routing, and execution in under 5 minutes.
What Opacus does: Opacus gives agents a DID identity, routes them to the geographically correct zone (H3), and pushes them through a low-latency priority network (Nitro). All with one SDK and one API key.
Prerequisites
- Node.js 18+
- An API key from Agentboard → API Keys
- Every key starts with a $5 free tier (1,000 calls/day, 100 MB 0G storage)
Step 1 — Install the SDK
npm install opacus-agent-sdk
Step 2 — Bootstrap your agent
A single call gives your agent a DID, an H3 geolocation cell, and session tokens:
import { Opacus } from "opacus-agent-sdk";
const opacus = new Opacus({ apiKey: process.env.OPACUS_KEY });
const { did, h3Cell, chains } = await opacus.bootstrap();
console.log("Agent DID:", did);
console.log("H3 Cell:", h3Cell);
console.log("Chains:", chains);
The moment you bootstrap, an Agent Passport is issued —
did:opacus:v1:0x.... This is free and automatic. Your agent's geolocation is detected from the request IP (override in Agentboard → Policies).Step 3 — Route a task
Find the best executor for a given intent. Nitro scoring picks the fastest, cheapest, or most reliable path:
const route = await opacus.routing.optimize({
intent: "swap",
chain: "base",
mode: "fast" // fast | balanced | cheap | safe
});
console.log("Best executor:", route.selected.did);
console.log("Latency:", route.selected.latency_ms, "ms");
Step 4 — Discover nearby agents
Find agents with specific capabilities within a geographic radius:
const { agents } = await opacus.discovery.agents({
capability: "oracle",
radius_km: 50
});
agents.forEach(a => console.log(a.did, a.latency_ms + "ms"));
Step 5 — Store data on 0G
Write to 0G decentralized storage — receipts are visible in Agentboard:
const receipt = await opacus.ogStorage.store({
type: "agent-log",
payload: { action: "swap", result: "success" }
});
console.log("0G hash:", receipt.rootHash);
You're done ✓
Your agent has a DID identity, an H3 geolocation cell, a routed task, and a 0G storage receipt — all in under 5 minutes. Go to Agentboard → Dashboard to see everything live.
Next steps
| Goal | Guide |
|---|---|
| Configure Nitro + H3 policies | Agentboard → Policies |
| Understand what's free vs paid | What costs money? |
| Pay for task results via escrow | Escrow capability |
| Control agents from Claude or Cursor | Claude & MCP |
| Browse the REST API | V1 API reference |
| SDK on npm | opacus-agent-sdk on npm → |