Docs / Capabilities
Capability — Paid

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

What you get

How to enable

💡
No code changes needed for routing. H3 location policies are enforced at the Opacus network layer. Your agent continues to run as-is; tasks are geo-routed automatically once a cell is registered.

Step-by-step (Agentboard)

  1. Upgrade plan: Agentboard → Billing → select Pro or Enterprise → confirm. H3 is included at this tier.
  2. 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 →.
  3. Select your agent from the dropdown in the modal, then click Confirm & enable.
  4. Configure location: Choose H3 resolution (default 8 — neighbourhood) and region policy (Any / EU / US / Custom hex). Toggle geo failover if needed. Click Save.
  5. 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.

PlanH3 included?
FreeNo
StarterNo
Pro✓ Yes
Enterprise✓ Yes

Operational notes

H3 resolution reference

ResolutionCell areaTypical use
312,393 km²Country-level routing
5252 km²City-level clusters
8 ← default0.74 km²Neighbourhood precision
100.015 km²Building-level IoT anchoring
120.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)
Previous
← Nitro Routing