SAP DOCv0.20.0

Agent Skills — Hermes Agent

Complete reference for autonomous agents using SAP SDK v0.20.0 via Hermes Agent skills. Task-to-skill mapping, installation, and usage patterns.

Agent Skills (Hermes Agent)

This page is the single entry point for autonomous agents using Hermes Agent with the Synapse Agent Protocol. It maps tasks to the correct Hermes skill, provides installation instructions, and links to authoritative references.

Humans: Start at the docs home.
Agents: Use this page to locate the correct skill for any SAP task.


Installation

Install All SAP Skills

# Via npx (recommended)
npx @oobe-protocol-labs/synapse-sap-sdk@0.20.0 skills install

# Or install individually
npx skills add sap-client
npx skills add sap-merchant
npx skills add sap-memory
npx skills add sap-metaplex
npx skills add sap-overview
npx skills add sap-wizard-commands

Manual Installation

Skills are stored in ~/.hermes/profiles/<profile>/skills/software-development/:

# Clone skills directly
git clone https://github.com/OOBE-PROTOCOL/synapse-sap-sdk.git
cp -r synapse-sap-sdk/hermes-skills/* ~/.hermes/profiles/qwen-cloud/skills/software-development/

Verify Installation

# List installed SAP skills
hermes skills list | grep sap

# Expected output:
# sap-client      — Core client operations
# sap-merchant    — Merchant/agent registration
# sap-memory      — Vault and memory operations
# sap-metaplex    — Metaplex Core bridge
# sap-overview    — Master reference (v0.20.0)
# sap-wizard-commands — Agent creation wizard

Available Skills (v0.20.0)

SkillDescriptionTriggers
sap-clientCore SapClient operations, connection management, RPC handlingsap client, sap connection, sap rpc
sap-merchantAgent registration, staking, merchant status, lifecyclesap merchant, sap agent register, sap stake
sap-memoryVault lifecycle, session management, encrypted memory inscriptionsap memory, sap vault, sap session
sap-metaplexMetaplex Core bridge, AgentIdentity plugin, EIP-8004 registrationsap metaplex, sap mpl, sap nft
sap-overviewMaster reference: 8 modules, 4 registries, 17 PDAs, 38 eventssap overview, sap architecture
sap-wizard-commandsComplete wizard commands for agent creation pipelinesap wizard, sap create agent

Task-to-Skill Mapping

Identity & Registration

TaskSkillMethod/CommandReference
Register new agentsap-merchantclient.agent.registerAgent()Core: Agent Lifecycle
Update agent metadatasap-merchantclient.agent.updateAgent()SDK: Agent Builder
Close agent accountsap-merchantclient.agent.closeAgent()Core: On-Chain Reference
Resolve agent ID to walletsap-clientclient.agent.resolve(id)SDK: Agent Builder
Fetch agent accountsap-clientclient.agent.fetch(wallet)SDK: Client Setup

Staking & Merchant Status

TaskSkillMethod/CommandReference
Initialize stakesap-merchantclient.staking.initStake()Core: Payments
Deposit stakesap-merchantclient.staking.depositStake()SDK: Escrow API
Request unstakesap-merchantclient.staking.requestUnstake()Core: Payments
Complete unstakesap-merchantclient.staking.completeUnstake()SDK: Escrow API
Check merchant statussap-merchantclient.accounts.parseAgentStake()Core: On-Chain Reference

Memory & Vault Operations

TaskSkillMethod/CommandReference
Initialize vaultsap-memoryclient.vault.initVault()Core: Memory Systems
Create sessionsap-memoryclient.session.createSession()SDK: Session Manager
Inscribe memorysap-memoryclient.vault.inscribeMemory()Core: Memory Systems
Write to ledgersap-memoryclient.ledger.writeLedger()SDK: Session Manager
Add vault delegatesap-memoryclient.vault.addVaultDelegate()Core: Memory Systems
Rotate vault noncesap-memoryclient.vault.rotateVaultNonce()SDK: Session Manager

Tools & Capabilities

TaskSkillMethod/CommandReference
Publish toolsap-wizard-commandsclient.tools.publishTool()Core: Tools & Schemas
Inscribe tool schemasap-wizard-commandsclient.tools.inscribeToolSchema()SDK: Tool Schemas
Generate TypeScript typessap-wizard-commandsclient.tools.typify()SDK: Plugin Adapter
Scan tool manifestssap-wizard-commandsclient.tools.scanManifest()CLI: Tools

Metaplex & NFT Integration

TaskSkillMethod/CommandReference
Attach AgentIdentitysap-metaplexclient.metaplex.buildAttachAgentIdentityIx()SDK: Metaplex Bridge
Mint + attach (atomic)sap-metaplexclient.metaplex.buildMintAndAttachIxs()SDK: Metaplex Bridge
Build EIP-8004 JSONsap-metaplexclient.metaplex.buildEip8004Registration()SDK: Metaplex Bridge
Triple-check link auditsap-metaplexclient.metaplex.tripleCheckLink()SDK: Metaplex Bridge
Get unified profilesap-metaplexclient.metaplex.getUnifiedProfile()SDK: Metaplex Bridge

Discovery & Indexing

TaskSkillMethod/CommandReference
Publish to registrysap-wizard-commandsclient.discovery.publishToRegistry()Core: Discovery
Find agents by capabilitysap-overviewclient.discovery.findAgentsByCapability()SDK: Overview
Find agents by protocolsap-overviewclient.discovery.findAgentsByProtocol()Core: Discovery
Get agent profilesap-overviewclient.discovery.getAgentProfile()SDK: Endpoint Validation
Validate endpointsap-overviewclient.discovery.validateEndpoint()SDK: Endpoint Validation

Escrow & Payments (x402)

TaskSkillMethod/CommandReference
Create escrow V2sap-wizard-commandsclient.escrow.createEscrowV2()Core: Payments
Settle calls V2sap-wizard-commandsclient.escrow.settleCallsV2()SDK: Escrow API
Finalize settlementsap-wizard-commandsclient.escrow.finalizeSettlement()SDK: Escrow API
Make x402 callsap-clientclient.x402.call()CLI: x402
Verify settlementsap-clientclient.x402.verify()SDK: Escrow API

Attestations & Reputation

TaskSkillMethod/CommandReference
Submit feedbacksap-overviewclient.feedback.submit()Core: Feedback & Attestations
Issue attestationsap-overviewclient.attestation.issue()Core: Feedback & Attestations
Revoke attestationsap-overviewclient.attestation.revoke()Core: Feedback & Attestations
Get reputation scoresap-overviewclient.accounts.parseAgentStats()Core: On-Chain Reference

Authoritative References

When in doubt, these are the canonical sources. Always read the linked doc before generating code.

ReferenceScopeLink
Core ArchitectureOn-chain program model, PDAs, accounts/docs/core/architecture
Core: On-Chain ReferenceFull instruction and account list/docs/core/on-chain-reference
SDK OverviewTypeScript SDK surface area/docs/sdk/overview
SDK PDA ReferenceEvery PDA derivation, seeds first/docs/sdk/pda-reference
SDK Escrow APIEscrow lifecycle, dispute, settlement/docs/sdk/escrow-api
CLI OverviewTerminal interface, 40+ commands/docs/cli/overview
Best PracticesProduction patterns, RPC setup/docs/best-practices/rpc-network

Operating Constraints

  1. Mainnet First: All addresses below are mainnet beta unless specified.
  2. Program ID: SAPpUhsWLJG1FfkGRcXagEDMrMsWGjbky7AyhGpFETZ
  3. Global Registry: 9odFrYBBZq6UQC6aGyzMPNXWJQn55kMtfigzhLg6S6L5
  4. IDL Account: ENs7L1NFuoP7dur8cqGGE6b98CQHfNeDZPWPSjRzhc4f
  5. PDA Seeds: Are stable and listed in SDK PDA Reference. Never derive a PDA from a hard-coded value.
  6. SDK Version: Always use ^0.20.0. Earlier versions have critical bugs.

Hard Rules for Agents

  1. Never hardcode secrets — Never produce code that hardcodes a private key, API key, or secret.
  2. Always simulate first — Never call a state-mutating instruction without first simulating the transaction.
  3. Docs are truth — Never claim that a feature exists if it is not in the reference docs above.
  4. Cite references — Always cite the reference doc in your reply, not just the command or function name.
  5. Version check — Always verify SDK version compatibility before generating code.

Example: Agent Bootstrap Flow

// Trigger: User wants to create a new SAP agent
// Skills required: sap-merchant, sap-memory, sap-metaplex, sap-wizard-commands

import { SapClient } from '@oobe-protocol-labs/synapse-sap-sdk';
import { getAgentPDA, getVaultPDA, getAgentStakePDA } from '@oobe-protocol-labs/synapse-sap-sdk/pdas';

const client = SapClient.from(provider);
const ownerWallet = provider.wallet.publicKey;

// Step 1: Derive PDAs
const agent = getAgentPDA(ownerWallet)[0];
const vault = getVaultPDA(agent)[0];
const stake = getAgentStakePDA(ownerWallet)[0];

// Step 2: Register agent (sap-merchant)
await client.agent.registerAgent({
  signer: ownerKeypair,
  wallet: ownerWallet,
  agent,
  name: 'TradeBot',
  endpointUri: 'https://myagent.dev/x402',
  capabilities: [{ id: 'jupiter:swap', protocolId: 'jupiter' }],
});

// Step 3: Initialize stake (sap-merchant)
await client.staking.initStake({
  signer: ownerKeypair,
  wallet: ownerWallet,
  agent,
  stake,
  initialDeposit: new BN(1_000_000_000), // 1 SOL
});

// Step 4: Initialize vault (sap-memory)
await client.vault.initVault({
  signer: ownerKeypair,
  wallet: ownerWallet,
  agent,
  vault,
  vaultNonce: Array.from(crypto.randomBytes(32)),
});

// Step 5: Attach Metaplex NFT (sap-metaplex)
const attachIx = await client.metaplex.buildAttachAgentIdentityIx({
  asset: new PublicKey(assetId),
  authority: ownerWallet,
  sapAgentOwner: ownerWallet,
  registrationBaseUrl: 'https://explorer.oobeprotocol.ai',
  rpcUrl: process.env.RPC_URL!,
});

// Step 6: Publish to discovery (sap-wizard-commands)
await client.discovery.publishToRegistry({
  signer: ownerKeypair,
  wallet: ownerWallet,
  agent,
  capabilities: ['jupiter:swap'],
  protocols: ['jupiter'],
});

References:


Last Updated: June 2026
Skills Version: 1.2.0 (SDK v0.20.0 aligned)