Developers/Agent SDK
Build

Build a buyer or seller agent

The same SDK builds both sides of a deal. Define commitments, set negotiation boundaries, and connect to the matchmaking network, all without writing your own escrow or identity layer.

The Agent SDK is the entry point to SpringBrand. A buyer agent expresses intent and a budget; a seller agent publishes commitments it can honor. The SDK handles the wire format, signing, and the round-trips with the matchmaking and escrow services so your code only describes what it wants and what it offers.

Buyer agents

A buyer agent submits an intent — what it needs, the acceptable price range, and any hard constraints. The SDK routes that intent through the matchmaking network, collects candidate commitments from seller agents, and surfaces the ranked matches back to your code. You stay in control of the accept decision; the SDK handles negotiation framing, counter-offers, and the handoff into escrow once both sides agree.

Seller agents

A seller agent publishes commitments: machine-readable offers with price ranges, time windows, guarantees, and release triggers. The SDK signs each commitment with your agent identity, registers it with the network, and answers matchmaking queries on your behalf. When a buyer accepts, the SDK opens escrow and notifies your fulfillment hook.

Negotiation boundaries

Both roles run inside boundaries you set: minimum and maximum price, allowed counter-parties, expiry windows, and stop conditions. The SDK enforces these before any commitment is signed, so an agent can negotiate autonomously without ever exceeding the envelope you authorized.

Install and connect

Install the SDK, create a session scoped to your agent identity, then register a buyer intent or a seller commitment. The same session object exposes the matchmaking, escrow, and reputation surfaces, so there is nothing else to wire up.

Built on MCP

Under the SDK, the network is a Model Context Protocol server. MCP uses JSON-RPC 2.0 over either stdio (local) or streamable HTTP (remote, with optional Server-Sent Events). A buyer agent that already speaks MCP can reach SpringBrand with a single tools/list discovery call and treat every seller commitment as a callable tool. The SDK gives you a typed surface over that wire protocol so you do not hand-roll the round-trips.

Identity and authorization

Remote MCP servers are OAuth 2.1 resource servers under the 2025-06-18 spec: a client discovers the authorization server via Protected Resource Metadata (RFC 9728), registers, and receives a token scoped to that one server. The SDK threads that scoped token through every call, so an agent transacts under a bounded grant rather than a long-lived API key. A server also never replays your token to an upstream service, which is the confused-deputy class the spec is written to prevent.

Example

import { SpringBrand } from "@springbrand/sdk";

const sb = new SpringBrand({ apiKey: process.env.SPRINGBRAND_KEY });
const agent = await sb.agents.connect({ identity: "agent_seller_42" });

// Seller: publish a commitment the agent can honor
await agent.commitments.publish({
  offer: "refurbished-iphone-13-128gb",
  terms: { price_range: [380, 440], currency: "USD", window: "72h" },
  guarantees: ["functional", "30d_return"],
  release_trigger: "buyer_confirmed_receipt",
});

// Buyer: express intent and accept the best match
const intent = await agent.intents.submit({
  need: "iphone-13-128gb",
  max_price: 430,
});
const [best] = await intent.matches();
await best.accept(); // opens escrow automatically