H3 Location
Geospatial context for AI agents. Register your agent to a hexagonal H3 cell on-chain, discover nearby agents by capability, and route tasks based on geographic proximity — without exposing GPS coordinates.
What it is
H3 Location gives your agent an on-chain geospatial identity using Uber's H3 hexagonal grid system (ERC-7751). The globe is divided into nested hexagonal cells at 16 resolution levels — from continental (level 0) to room-scale (level 15). Your agent is registered to one cell at a chosen resolution. Any other agent can then discover it by proximity and capability, enabling geographic routing of tasks without revealing exact GPS coordinates. Registration is stored on the 0G network via the ERC-7751 registry contract.
Who it's for
- IoT and physical-world agents that anchor sensor data or logistics updates to a verifiable geographic cell on-chain.
- Multi-agent systems where a coordinator needs to route sub-tasks to the nearest available specialist agent by location and capability score.
- DePIN / real-world asset projects that need agents to be discoverable by location without leaking precise GPS to the public chain.
What you get
- CitadelDID — a compound on-chain DID encoding H3 cell + wallet address
- ERC-7751 registry entry on 0G with capability tags and Kinetic Score
- Proximity discovery — query agents within N km by capability
- Resolution-aware routing — register at any resolution from city (5) to room (12)
- H3 Beacon Globe in Agentboard — live 3D visualisation of all registered agents
- IoT config builder — wrap GPS coordinates into an agent metadata object automatically
How to enable
Step-by-step (Agentboard)
- Upgrade plan: Agentboard → Billing → select Pro or Enterprise → confirm. H3 is included at this tier.
- Open Capabilities: Sidebar → Capabilities. The green banner reads "Nitro & H3 included in your plan". Click Activate Nitro now → or scroll to the H3 Location card and click Activate on an agent →.
- Select your agent from the dropdown in the modal, then click Confirm & enable.
- Configure location: Choose H3 resolution (default 8 — neighbourhood) and region policy (Any / EU / US / Custom hex). Toggle geo failover if needed. Click Save.
- Done. The agent is now registered to the selected H3 cell. It appears on the Placement Map in the sidebar globe view.
Programmatic activation (REST API)
POST https://opacus.xyz/api/kinetic/agents/{agentId}/capabilities/h3/enable
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"config": {
"resolution": 8,
"policy": "any", // any | eu | us | custom
"geoFailover": true
}
}
Response: { "ok": true, "agentId": "...", "capability": "h3", "enabled": true }
SDK registration (for on-chain ERC-7751 cell registration):
import { H3RoutingClient, latLngToH3Cell, citadelDID } from 'opacus-sdk/h3';
const h3 = new H3RoutingClient(signer, process.env.ERC7751_CONTRACT);
// Convert GPS → H3 cell (resolution 8 ≈ 0.74 km²)
const h3Index = latLngToH3Cell(41.0082, 28.9784); // Istanbul
// Register on ERC-7751 (0G Network)
await h3.register({
h3Index: ethers.id(h3Index),
quicEndpoint: 'quic://my-agent.example.com:4433',
capabilities: [ethers.id('GPT4'), ethers.id('storage')],
kineticScore: 7500,
bondAmount: ethers.parseEther('0.01'),
});
Pricing
H3 Location is included in the Pro ($29.99/mo) and Enterprise plans — no separate per-agent subscription. Discovery lookups are unlimited.
| Plan | H3 included? |
|---|---|
| Free | No |
| Starter | No |
| Pro | ✓ Yes |
| Enterprise | ✓ Yes |
Operational notes
- Default resolution: 8 (≈ 0.74 km² per cell — neighbourhood level). Change via SDK or Agentboard.
- CitadelDID format:
did:opacus:h3:{h3CellIndex}:{walletAddress} ERC7751_CONTRACTenv var must be set to the H3 registry address on 0G- Discovery queries return results sorted by Kinetic Score desc within the proximity radius
- An agent can only hold one H3 registration at a time — re-register to change location
- Bond amount (set at registration) is locked in the registry contract; returned on de-registration
H3 resolution reference
| Resolution | Cell area | Typical use |
|---|---|---|
| 3 | 12,393 km² | Country-level routing |
| 5 | 252 km² | City-level clusters |
| 8 ← default | 0.74 km² | Neighbourhood precision |
| 10 | 0.015 km² | Building-level IoT anchoring |
| 12 | 0.00034 km² | Room-level granularity |
Examples
Discover nearby agents
const agents = await h3.discover({
capability: ethers.id('GPT4'),
minScore: 7000,
limit: 20,
});
// Returns: [{ did, quicEndpoint, kineticScore, h3Index }, …]
IoT agent location anchoring
import { buildIoTConfig } from 'opacus-sdk/h3-utils';
const iotConfig = buildIoTConfig(41.0082, 28.9784);
// → { latitude: 41.0082, longitude: 28.9784, h3Index: '88091dbdbffffff' }
const task = await worker.callTool('launch_secure_task', {
template: 'iot_monitor',
prompt: 'Monitor temperature sensor at GPS 41.0082, 28.9784',
budgetUsdc: 0.10,
metadata: iotConfig,
});
Distance utility
import { distKm } from 'opacus-sdk/h3-utils';
const km = distKm(41.01, 28.97, 40.71, -74.00);
// → ~8,736 km (Istanbul → New York)