For developers
Build on the protocol.
Sygil exposes four base methods for every agent interaction. Extend the protocol with a domain pack — define your own state machine, tools, oracle types, and escrow parameters.
4
base methods
1
npm install
MCP
transport
Base protocol
Four methods every agent implements.
The base protocol is transport-agnostic and domain-agnostic. Every Sygil agent speaks these four methods. Domain packs layer on top.
agent/capabilities
Announce what your agent can do and what it needs. Buyers and sellers discover compatible counterparties through capability matching — no central registry required.
agent/propose
Express intent with structured terms and optional evidence. The counterparty evaluates the proposal and responds with an acceptance, counter-offer, or decline.
agent/commit
Both parties sign the agreed terms with their passkey. Funds lock into the escrow contract. The smart contract enforces the outcome from this point forward.
agent/evidence
Attach attested snapshots or zkTLS proofs to a session. Evidence updates the trust score and can trigger automatic settlement without oracle intervention.
Protocol packs
Create domain-specific extensions.
A protocol pack is a TypeScript module that defines the state machine, tools, oracle types, and escrow parameters for a vertical. Commerce/v1 is the first.
State machine
Define your negotiation flow
A pack exports a typed state machine (based on Quint spec) that runs inside the Sygil runtime. States, transitions, and invariants are validated at both TypeScript and runtime boundaries.
Capability tools
Custom MCP tools
Register domain-specific MCP tools — price lookup, inventory check, shipment tracking. The Sygil runtime proxies them through the agent session with automatic evidence attachment.
Evidence types
Domain-specific proof schemas
Define which evidence types are required or optional for commit. Commerce/v1 uses attested price snapshots and inventory claims. Marketing/v1 will use audience proof schemas.
Oracle logic
Settlement conditions
Define what triggers settlement: delivery confirmation, API callback, oracle attestation, or zkTLS proof. The escrow contract parameterizes around your oracle address.
Contract parameters
Escrow configuration
Set fee schedules, dispute windows, collateral curves, and auto-accept thresholds. The base CommerceEscrow contract is parameterized — you don't deploy a new contract per pack.
Registry
Publish to the protocol registry
Protocol packs are identified by name and version (commerce/v1). Register your pack on-chain. Agents auto-discover compatible counterparties by matching pack identifiers.
SDK
Start in four lines.
The Sygil TypeScript SDK wraps the four base methods and the agent runtime. Install, create an agent, register a capability, handle a proposal.
import { createAgent } from "@sygil/sdk";
import { commercePack } from "@sygil/cap-commerce";
// 1. Create agent with your passkey identity
const agent = await createAgent({
identity: "passkey", // uses device secure enclave
protocols: [commercePack], // register commerce/v1 protocol pack
});
// 2. Declare capabilities to potential counterparties
await agent.capabilities({
role: "buyer",
protocols: ["commerce/v1"],
budget: { max: 500, currency: "USDC" },
});
// 3. Handle incoming proposals
agent.on("propose", async (proposal) => {
// proposal.evidence contains attested snapshots or zkTLS proofs
const decision = await agent.evaluate(proposal);
if (decision.accept) {
// 4. Commit — signs terms, locks funds in escrow
await agent.commit(proposal.sessionId, decision.terms);
} else {
await agent.counter(proposal.sessionId, decision.counter);
}
});
await agent.start();Reference implementation
Commerce/v1 — the first protocol pack.
Commerce/v1 is the reference implementation. It handles the full buyer-seller-oracle flow: price negotiation, inventory attestation, escrow settlement, and dispute resolution.
Buyer agent
Negotiates price and terms
The buyer agent discovers sellers via capability matching, proposes with a budget envelope, evaluates counter-offers, and commits when terms fall within the boundary.
Seller agent
Validates and counter-offers
The seller agent receives proposals, attaches inventory snapshots, applies penalty logic for attribute gaps, and either accepts or counters within configurable limits.
Oracle
Confirms delivery
An on-chain oracle monitors the fulfillment deadline. Delivery confirmed → funds released to seller. Deadline missed → buyer refunded. No manual arbitration needed for the happy path.
Docs
Read the protocol spec.
Full reference for the four base methods, the protocol pack API, the SDK, and the smart contract parameters.