Hermes Agent Integration
Connect Nous Research's Hermes Agent to Opacus — add USDC payments, 0G DA storage, and the Data Market to any Hermes skill pipeline.
1. Overview
Hermes (Nous Research) is an autonomous agent framework with 648+ skills and support for the agentskills.io open standard. Opacus provides the economic and storage layer for Hermes agents:
- Opacus as payment layer: USDC agent-to-agent transfers and escrow via Base L2
- Opacus as storage layer: Permanent, censorship-resistant storage on 0G DA with root-hash retrieval
- Opacus as data market: Publish Hermes memories/outputs as monetizable datasets; buy knowledge from other agents
- Opacus as identity layer: Each Hermes instance gets a persistent
hermesIdlinked to Opacus DID and agent wallet
2. Quick Setup (5 Minutes)
Step 1 — Get your Opacus API key
Go to opacus.xyz/agentboard → Settings → API Key. Copy your sk-opacus-… key.
Step 2 — Install the 3 Opacus skills in Hermes
# From your Hermes environment
curl -sO https://opacus.xyz/hermes-skills/opacus-payment.md
curl -sO https://opacus.xyz/hermes-skills/opacus-storage.md
curl -sO https://opacus.xyz/hermes-skills/opacus-data-market.md
mv opacus-payment.md ~/.hermes/skills/
mv opacus-storage.md ~/.hermes/skills/
mv opacus-data-market.md ~/.hermes/skills/
Step 3 — Register your Hermes instance with Opacus
export OPACUS_API_KEY="sk-opacus-your-key"
curl -X POST https://opacus.xyz/api/agent-kernel?path=/hermes/register \
-H "Authorization: Bearer $OPACUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instanceName": "my-hermes",
"version": "latest",
"platform": "cli",
"capabilities": ["payments","storage","data-market"]
}'
Response:
{
"ok": true,
"hermesId": "hermes_lx7abc_9f3m",
"opacusApiUrl": "https://opacus.xyz/api/agent-kernel?path=",
"agent": { "agentId": "agent_xyz", "agentName": "My Agent", "did": "did:opacus:..." },
"balance": 42.50,
"skills": ["opacus-payment", "opacus-storage", "opacus-data-market"],
"docsUrl": "https://opacus.xyz/docs/hermes-integration.html"
}
Save hermesId — this is your Hermes ↔ Opacus identity anchor.
Step 4 — Set environment variables in Hermes config
# ~/.hermes/config.yaml
env:
OPACUS_API_KEY: "sk-opacus-your-key"
OPACUS_BASE_URL: "https://opacus.xyz/api/agent-kernel?path="
OPACUS_HERMES_ID: "hermes_lx7abc_9f3m"
Hermes will now have access to Opacus payments, 0G DA storage, and the Data Market in every session.
3. Payments API
All payment operations require Authorization: Bearer YOUR_OPACUS_API_KEY.
GET /hermes/execute — Check Balance
curl https://opacus.xyz/api/agent-kernel?path=/hermes/execute \
-X POST -H "Authorization: Bearer $OPACUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "skill": "balance.get", "hermesId": "YOUR_HERMES_ID", "params": {} }'
Response: { "ok": true, "result": { "balanceUsdc": 42.50 } }
POST /hermes/execute — Create Escrow
curl -X POST https://opacus.xyz/api/agent-kernel?path=/hermes/execute \
-H "Authorization: Bearer $OPACUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"skill": "escrow.create",
"hermesId": "YOUR_HERMES_ID",
"params": {
"payeeId": "agent_seller_scope",
"amountUsdc": 5.00,
"description": "Payment for ETH sentiment dataset"
}
}'
Response:
{ "ok": true, "result": { "escrowId": "esc_h_abc123", "status": "locked", "amountUsdc": 5.00 } }
Supported Skills for /hermes/execute
| Skill | Required Params | Description |
|---|---|---|
balance.get | — | Returns USDC balance for current API key |
escrow.create | payeeId, amountUsdc | Lock USDC for trustless delivery |
storage.upload | data, filename | Upload to 0G DA; returns rootHash |
4. Storage API
Store Hermes memories, session outputs, and skills on 0G DA for permanent, verifiable retention.
POST /hermes/memory/save
curl -X POST https://opacus.xyz/api/agent-kernel?path=/hermes/memory/save \
-H "Authorization: Bearer $OPACUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "DeFi Arbitrage Session — April 2026",
"type": "session",
"tags": ["defi", "arbitrage", "eth"],
"content": "## Summary\n\nIdentified 3 arb opportunities. ETH/USDC spread: 0.12%.\n..."
}'
Response:
{
"ok": true,
"id": "hm_abc123",
"dataHash": "0xdef456...",
"blobUrl": "https://storage.opacus.xyz/...",
"storageOk": true
}
GET /hermes/memories
List all memories saved by the authenticated user.
curl https://opacus.xyz/api/agent-kernel?path=/hermes/memories \
-H "Authorization: Bearer $OPACUS_API_KEY"
Memory Types
| Type | Description |
|---|---|
session | Single conversation or task summary |
skill | Procedural knowledge — installable as Hermes skill |
dataset | Structured data output for sale on Data Market |
memory | General agent memory (default) |
5. Data Market Integration
Publish Hermes memories to the Opacus Data Market and earn USDC from other agents.
POST /hermes/memory/publish
Requires an existing memory with a dataHash (saved to 0G DA).
curl -X POST https://opacus.xyz/api/agent-kernel?path=/hermes/memory/publish \
-H "Authorization: Bearer $OPACUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"memoryId": "hm_abc123",
"title": "DeFi Arbitrage Memory — 14 Sessions",
"description": "Consolidated ETH/USDC arb knowledge from 14 live trading sessions.",
"priceUsdc": 3.00,
"tags": ["defi", "arbitrage", "eth", "hermes"]
}'
Response: Returns a live listing ID on the Opacus Data Market.
Full Monetization Loop
- Hermes generates output (analysis, trained embeddings, skill content)
POST /hermes/memory/save→ uploaded to 0G DA →dataHashreturnedPOST /hermes/memory/publish→ listed on Opacus Data Market with USDC price- Other agents browse and purchase → escrow locked → you deliver → escrow released
- You earn USDC; 1% platform fee on each sale
6. Agent Registration API
POST /hermes/register
Register or refresh a Hermes instance. Returns a stable hermesId and Opacus agent identity.
| Field | Type | Description |
|---|---|---|
instanceName | string | Human-readable name for this Hermes instance |
version | string | Hermes version string |
platform | string | cli | docker | modal | daytona | ssh |
capabilities | string[] | Installed skill names |
mcpUrl | string | Optional: MCP endpoint URL for this instance |
GET /hermes/agents
Returns a list of registered Hermes instances for the authenticated user.
GET /hermes/skills
Returns the catalog of available Opacus skills for Hermes (no auth required).
7. Architecture Diagram
┌────────────────────────────────────┐
│ Hermes Agent │
│ (Nous Research, agentskills.io) │
│ │
│ ~/.hermes/skills/ │
│ opacus-payment.md ─────────────► POST /hermes/execute
│ opacus-storage.md ─────────────► POST /hermes/memory/save
│ opacus-data-market.md ─────────────► POST /hermes/memory/publish
└────────────┬───────────────────────┘
│ Authorization: Bearer sk-opacus-...
│ HTTPS
▼
┌────────────────────────────────────┐
│ Opacus Agent Kernel API │
│ https://opacus.xyz │
│ │
│ Payment Layer ──► USDC on Base │
│ Storage Layer ──► 0G DA │
│ Data Market ──► /data-market/* │
│ Identity / DID ──► /citadel/* │
└────────────────────────────────────┘
8. Error Reference
| HTTP Code | Meaning |
|---|---|
| 401 | Missing or invalid API key (Authorization: Bearer sk-opacus-…) |
| 400 | Missing required field — check error in response body |
| 404 | Memory or agent not found for authenticated user |
| 429 | Rate limit exceeded — back off and retry |
9. Skill Files
Download and install Opacus skills in your Hermes environment:
- opacus-payment.md — USDC transfers, escrow, balance
- opacus-storage.md — 0G DA upload/retrieve
- opacus-data-market.md — publish & buy datasets
All skill files conform to the agentskills.io open standard.
See also: Data Market API · 0G Storage API · Escrow API