← Back to Docs

Integration Guide

Set up identity, vault, gateway pairing, and orchestration for your AI agents

Complete Solution

NervePay provides a complete management layer for AI agents: Agent Passport for cryptographic identity, Secrets Vault for secure credential storage, gateway pairing for runtime integration, and orchestration for multi-agent task management.

Integration Patterns

Identity + Vault

Use Agent Passport for authentication and the Secrets Vault for secure credential storage. Agents authenticate with signatures, then retrieve API keys at runtime.

Example: Agent authenticates, fetches OPENAI_API_KEY from vault

Identity + Gateway

Pair your OpenClaw gateway with NervePay. Agents get cryptographic identity and can be managed from the dashboard.

Example: OpenClaw agent with DID identity and gateway pairing

Full Stack (Recommended)

Combine identity, vault, gateway, and orchestration. Break down tasks, assign to verified agents, track progress, and manage secrets — all from one dashboard.

Example: Multi-agent orchestration with verified identities

Integration Flow

1

Create Agent Identity

Run the setup wizard to generate a DID and Ed25519 keypair for your agent

npx nervepay setup
→ Returns: DID + private_key + BIP39 mnemonic
2

Store Secrets in Vault

Add API keys and credentials through the dashboard. Agents retrieve them securely at runtime.

POST /api/agent-identities/:did/secrets
{ "name": "OPENAI_API_KEY", "value": "sk-..." }
3

Pair Gateway

Connect your OpenClaw gateway for real-time orchestration and monitoring

npx nervepay pair
→ Gateway connected and ready
4

Authenticate Requests

Agent signs each request with its Ed25519 private key

X-Agent-DID: did:nervepay:agent:7xKp...
X-Signature: <ed25519-signature>
X-Nonce: <unique-string>
X-Timestamp: 2026-02-18T10:00:00Z
5

Track & Orchestrate

Monitor activity, manage tasks, and coordinate multiple agents from the dashboard

reputation_score: recalculated (70% attestations + 30% success rate)
activity: logged to agent_activity_log

Automatic Reputation Tracking

When agents authenticate with their passport, every interaction is linked to their identity and their reputation score is automatically updated based on success rates and attestations.

What's Tracked

  • • Total authentication attempts
  • • Successful authentications
  • • Auth success rate
  • • Reputation score (0-100)
  • • Activity history with passport

Reputation Formula

70% attestations + 30% success rate

Agents with higher reputation can be granted broader capabilities, priority access, or elevated trust levels.

Python Example

python
1import json
2import base64
3import uuid
4from datetime import datetime
5from nacl.signing import SigningKey
6import requests
7
8# Agent credentials
9AGENT_DID = "did:nervepay:agent:7xKp..."
10PRIVATE_KEY_BASE58 = "..." # From registration
11
12# 1. Sign authentication payload
13def sign_request(method, path):
14 nonce = str(uuid.uuid4())
15 timestamp = datetime.utcnow().isoformat() + "Z"
16
17 payload = {
18 "method": method,
19 "path": path,
20 "nonce": nonce,
21 "timestamp": timestamp,
22 "agent_did": AGENT_DID
23 }
24
25 # Sign with Ed25519
26 signing_key = SigningKey(base58.b58decode(PRIVATE_KEY_BASE58))
27 message = json.dumps(payload, separators=(',', ':')).encode()
28 signature = signing_key.sign(message).signature
29
30 return {
31 "X-Agent-DID": AGENT_DID,
32 "X-Signature": base64.b64encode(signature).decode(),
33 "X-Nonce": nonce,
34 "X-Timestamp": timestamp
35 }
36
37# 2. Make authenticated request
38headers = sign_request("GET", "/v1/vault/secrets/OPENAI_API_KEY")
39response = requests.get(
40 "https://api.nervepay.xyz/v1/vault/secrets/OPENAI_API_KEY",
41 headers=headers
42)
43
44# 3. Use the secret
45secret = response.json()
46print(f"Retrieved: {secret['name']}") # OPENAI_API_KEY

Benefits of the Full Stack

Enhanced Security

Cryptographic identity + encrypted vault + audit trails for every action

Full Audit Trail

Know WHO accessed WHAT and WHEN for every secret and API call

Multi-Agent Orchestration

Break down complex tasks and assign to verified agents with tracked progress

Fraud Prevention

Agent identity tied to all actions — easier to detect and block bad actors

Analytics

Track usage patterns per agent, identify power users, understand behavior

Compliance

Complete activity history with verified agent identities for audits

Get Started