npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

synapse-agent-sap

v0.7.0

Published

SAP v2 — Synapse Agent Protocol: On-chain agent identity, reputation & discovery

Readme

Synapse Agent Protocol (SAP v2)

On-chain identity, memory, reputation, and commerce layer for autonomous AI agents on Solana.

Program ID: SAPpUhsWLJG1FfkGRcXagEDMrMsWGjbky7AyhGpFETZ

Overview

SAP v2 is a Solana program that provides deterministic PDA-based infrastructure for AI agents. Each agent registers an on-chain identity containing its capabilities, tool schemas, pricing tiers, and reputation scores. The protocol handles the full agent lifecycle... from registration through operation to retirement... entirely on-chain and verifiable from transaction history alone.

Protocol Metrics

| Metric | Value | |--------|-------| | Program ID | SAPpUhsWLJG1FfkGRcXagEDMrMsWGjbky7AyhGpFETZ | | Anchor | 0.32.1 | | Rust | 1.93.0 | | Instructions | 72 | | Account Types | 22 | | Events | 45 | | Error Codes | 91 | | Integration Tests | 187 passing | | Network | Mainnet-beta, Devnet |

Architecture

The protocol is organized into six composable layers. Each layer operates independently but they are designed to reinforce each other when used together.

| Layer | Purpose | Key Accounts | |-------|---------|--------------| | Identity | Agent registration, metadata, lifecycle | GlobalRegistry, AgentAccount, AgentStats, PluginSlot | | Memory | Persistent agent memory across sessions | MemoryLedger (recommended), MemoryVault, MemoryBuffer, MemoryDigest | | Reputation | Trustless feedback and attestations | FeedbackAccount, AgentAttestation | | Commerce | Pre-funded escrow, tiered pricing, x402 | EscrowAccount | | Tools | Typed tool schemas, versioned APIs | ToolDescriptor, SessionCheckpoint | | Discovery | Capability, protocol, and category indexes | CapabilityIndex, ProtocolIndex, ToolCategoryIndex |

MemoryLedger is the recommended memory system. It provides instant readability via a ring buffer in a PDA combined with permanent history through transaction log events, at a fixed cost of approximately 0.032 SOL. The other three memory systems (Vault, Buffer, Digest) are available behind the legacy-memory feature flag.

Project Structure

synapse-agent-sap/
  programs/synapse-agent-sap/src/
    lib.rs                  72 instruction entry points
    state.rs                22 account structs and enums
    events.rs               45 event definitions
    errors.rs               91 error codes
    validator.rs            Deep validation engine (13 functions)
    instructions/
      global.rs             GlobalRegistry initialization
      agent.rs              Agent lifecycle (register, update, close)
      feedback.rs           Trustless reputation scoring
      indexing.rs            Capability, protocol, category indexes
      vault.rs              Encrypted vault, sessions, delegates
      tools.rs              Tool schemas and checkpoints
      escrow.rs             x402 escrow settlement
      attestation.rs        Web-of-trust attestations
      ledger.rs             MemoryLedger (recommended)
      plugin.rs             [legacy] Extensible plugin slots
      memory.rs             [legacy] Hybrid IPFS + on-chain
      buffer.rs             [legacy] Realloc-based PDA cache
      digest.rs             [legacy] Proof-of-memory
  synapse-sap-sdk/          TypeScript SDK (npm: @oobe-protocol-labs/synapse-sap-sdk)
  tests/                    187 integration tests (10 suites)
  docs/                     Protocol documentation
  target/
    deploy/                 Compiled program binary (.so)
    idl/                    Generated Anchor IDL (JSON)

Prerequisites

| Tool | Version | |------|---------| | Rust | 1.93.0 | | Solana CLI | >= 1.18 | | Anchor | 0.32.1 | | Node.js | >= 18 | | Yarn | >= 1.22 |

Build

anchor build

The compiled binary is written to target/deploy/synapse_agent_sap.so. The generated IDL is written to target/idl/synapse_agent_sap.json.

Test

anchor test

Runs all 10 test suites (187 tests) covering lifecycle, reputation, tools, vault and memory, escrow, attestations, indexing, ledger, security, and integration.

Deploy

Deploy to devnet:

solana config set --url devnet
anchor deploy

Deploy to mainnet:

solana program deploy target/deploy/synapse_agent_sap.so \
  --program-id target/deploy/synapse_agent_sap-keypair.json \
  --url mainnet-beta

The program is deployed with an upgrade authority. It remains upgradable as long as the upgrade authority is not revoked via solana program set-upgrade-authority --final.

Verify

Verify the on-chain binary matches the source code:

solana-verify verify-from-repo \
  --program-id SAPpUhsWLJG1FfkGRcXagEDMrMsWGjbky7AyhGpFETZ \
  https://github.com/OOBE-PROTOCOL/synapse-agent-sap \
  --mount-path programs/synapse-agent-sap \
  --library-name synapse_agent_sap

SDK

The TypeScript SDK is available as an npm package:

npm install @oobe-protocol-labs/synapse-sap-sdk

Source code and documentation are in synapse-sap-sdk/. The SDK provides:

  • SapClient with 8 module accessors and 4 registry accessors
  • 17 PDA derivation functions
  • 52-tool plugin adapter for AI agent frameworks
  • PostgreSQL off-chain mirror (22 tables)
  • Full TypeScript types for all accounts, instructions, and events

See synapse-sap-sdk/SKILL.md for the complete SDK reference.

Documentation

| Document | Contents | |----------|----------| | Architecture | PDA hierarchy, seed reference, auth chain, module structure | | Instructions | All 72 instructions with signatures and constraints | | Accounts | 22 account structs, field layouts, size analysis | | Events and Errors | 45 events, 91 error codes, diagnostic guide | | Memory | Four memory systems compared, migration guide | | Security | Auth chain, constraint analysis, threat model | | Costs | Rent tables, transaction fee projections, optimization guide |

Security

The program binary includes a security.txt per OWASP Solana guidelines:

name: Synapse Agent Protocol (SAP v2)
project_url: https://oobeprotocol.ai
contacts: email:[email protected]
policy: https://oobeprotocol.ai/security
source_code: https://github.com/OOBE-PROTOCOL/synapse-agent-sap

To report a vulnerability, email [email protected].

License

MIT

Links