Skip to main content

StateSet iCommerce Engine

Infrastructure for autonomous commerce. Embedded engine, verifiable sync, on-chain settlement, x402 payments, and multi-channel messaging.

Skill Files

FileURL
SKILL.md (this file)https://doc.stateset.com/stateset-icommerce-skill.md
Or just read them from the URLs above! Check for updates: Re-fetch these files anytime to see new features!

API Base URLs

ServiceBase URLPurpose
Commerce EngineLocal (embedded)Core commerce operations (orders, products, customers)
Sequencerhttps://api.sequencer.stateset.app/v1VES event ordering, proofs, commitments
VES (Sequencer)https://api.sequencer.stateset.app/v1/vesVES v1.0 protocol endpoints
x402 Paymentshttps://api.sequencer.stateset.app/v1/x402Payment intents, batches, settlements
Environment Variables:
export STATESET_API_KEY=sk_live_xxx
export STATESET_SEQUENCER_URL=https://api.sequencer.stateset.app/v1

Architecture Overview

StateSet iCommerce is a five-layer infrastructure stack:
LayerComponentFunction
Computestateset-embeddedIn-process commerce engine
Coordinationstateset-sequencerDistributed event ordering
SettlementSet Chain (L2)On-chain verification
Paymentsx402 ProtocolHTTP-native stablecoin payments
CommunicationMessaging Gateway9-channel agent interaction

Install the CLI

npm install -g @stateset/cli
Verify installation:
stateset --version
Recommended: Save your credentials to ~/.config/stateset/config.json:
{
  "api_key": "sk_live_xxx",
  "tenant_id": "your-tenant-id",
  "store_id": "your-store-id",
  "database_path": "~/.stateset/commerce.db"
}

Initialize the Engine

Create a new commerce database:
stateset init --demo
This creates ~/.stateset/commerce.db with:
  • SQLite database with 70+ tables
  • Demo data (customers, products, inventory)
  • Sync outbox ready for VES
Without demo data:
stateset init

Authentication

Commerce operations run locally via the embedded engine. Sequencer API requests require your API key:
curl https://api.sequencer.stateset.app/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY"
For CLI operations:
export STATESET_API_KEY=sk_live_xxx
stateset orders list        # Local embedded engine
stateset sync push          # Syncs to sequencer API

Agent Registration

AI agents must register with the sequencer to receive an API key for authentication.

Register a New Agent

curl -X POST https://api.sequencer.stateset.app/v1/agents/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-commerce-agent",
    "description": "Autonomous commerce agent for order processing"
  }'
Response:
{
  "success": true,
  "agentId": "550e8400-e29b-41d4-a716-446655440000",
  "tenantId": "660e8400-e29b-41d4-a716-446655440001",
  "apiKey": "ss_660e8400aBcDeFgHiJkLmNoPqRsTuVwXyZ",
  "permissions": "read_write",
  "message": "Agent registered successfully. Store your API key securely - it cannot be retrieved later."
}
Important: Store the apiKey securely. It is only returned once and cannot be retrieved later.

Registration Options

FieldTypeDescription
namestringHuman-readable agent name (required)
descriptionstringAgent purpose description
tenantIdUUIDJoin existing tenant (optional)
storeIdsUUID[]Restrict to specific stores
readOnlybooleanRead-only permissions (default: false)
adminbooleanAdmin permissions (default: false)
rateLimitnumberRequests per minute limit

Get Agent Details

curl https://api.sequencer.stateset.app/v1/agents/{agent_id} \
  -H "Authorization: Bearer YOUR_API_KEY"

Create Additional API Keys

curl -X POST https://api.sequencer.stateset.app/v1/agents/{agent_id}/api-keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "readOnly": true
  }'

List API Keys

curl https://api.sequencer.stateset.app/v1/agents/{agent_id}/api-keys \
  -H "Authorization: Bearer YOUR_API_KEY"

Revoke an API Key

curl -X DELETE https://api.sequencer.stateset.app/v1/agents/{agent_id}/api-keys/{key_prefix} \
  -H "Authorization: Bearer YOUR_API_KEY"

Register Signing Key (for VES Events)

After registration, agents should register an Ed25519 signing key for VES event signatures:
curl -X POST https://api.sequencer.stateset.app/v1/agents/keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tenantId": "660e8400-e29b-41d4-a716-446655440001",
    "agentId": "550e8400-e29b-41d4-a716-446655440000",
    "keyId": 1,
    "publicKey": "0x1234567890abcdef...",
    "validFrom": "2026-01-30T00:00:00Z",
    "validTo": "2027-01-30T00:00:00Z"
  }'

Core Operations

Customers

# List customers
stateset customers list

# Create customer
stateset customers create --email "alice@example.com" --name "Alice Smith"

# Get customer by email
stateset customers get --email "alice@example.com"
Embedded API (local):
const customer = commerce.customers.create({
  email: 'alice@example.com',
  name: 'Alice Smith'
});

Products

# List products
stateset products list

# Create product
stateset products create --sku "SHOE-001" --name "Running Shoes" --price 99.99

# Get product by SKU
stateset products get --sku "SHOE-001"

Inventory

# Check stock
stateset inventory get --sku "SHOE-001"

# Adjust inventory
stateset inventory adjust --sku "SHOE-001" --quantity 100 --reason "Initial stock"

# Reserve inventory
stateset inventory reserve --sku "SHOE-001" --quantity 5 --reference "ORD-123"

Orders

# List orders
stateset orders list

# Create order
stateset orders create --customer-email "alice@example.com" --items '[{"sku":"SHOE-001","qty":2}]'

# Get order
stateset orders get --id "ord_xxx"

# Ship order
stateset orders ship --id "ord_xxx" --carrier "fedex" --tracking "1234567890"

Returns

# Create return
stateset returns create --order-id "ord_xxx" --reason "Defective" --items '[{"sku":"SHOE-001","qty":1}]'

# Approve return
stateset returns approve --id "ret_xxx"

# Complete return
stateset returns complete --id "ret_xxx"

Checkout Flow

Cart Operations

# Create cart
stateset carts create --customer-email "alice@example.com"

# Add item to cart
stateset carts add-item --cart-id "cart_xxx" --sku "SHOE-001" --quantity 2

# Get cart
stateset carts get --id "cart_xxx"

# Checkout
stateset carts checkout --id "cart_xxx" --payment-method "card"

Complete Checkout Flow

# 1. Create cart
CART_ID=$(stateset carts create --customer-email "alice@example.com" --json | jq -r '.id')

# 2. Add items
stateset carts add-item --cart-id $CART_ID --sku "SHOE-001" --quantity 2

# 3. Apply promotion (optional)
stateset carts apply-coupon --cart-id $CART_ID --code "SAVE10"

# 4. Calculate tax
stateset carts calculate-tax --cart-id $CART_ID

# 5. Checkout
stateset carts checkout --cart-id $CART_ID --payment-method "card"

x402 Payments

HTTP-native stablecoin micropayments between AI agents.

Supported Networks

NetworkChain IDAssetsStatus
Set Chain84532001ssUSD, USDCProduction
Base8453USDCProduction
Ethereum1USDC, USDTProduction
Arbitrum42161USDCProduction
Optimism10USDCProduction
SolanaUSDCProduction

Create Payment Intent

stateset-pay create \
  --amount "10.00" \
  --asset "USDC" \
  --network "base" \
  --recipient "0x..."

Check Balance

stateset-pay balance --network base

Payment Flow

1. GET /api/products/123
   → HTTP 402 Payment Required
   → { asset: "USDC", amount: "0.001", network: "set-chain", recipient: "0x..." }

2. Agent signs PaymentIntent (Ed25519)

3. GET /api/products/123
   X-Payment: <signed intent>
   → 200 OK
   X-Payment-Receipt: <receipt>

Verifiable Event Sync (VES)

Multi-agent coordination with cryptographic proofs.

Check Sync Status

stateset sync status
Response:
{
  "local_head": 1523,
  "remote_head": 1520,
  "pending_events": 3,
  "last_sync": "2026-01-30T10:15:00Z"
}

Push Events

stateset sync push

Pull Events

stateset sync pull

Full Sync

stateset sync full

View Outbox

stateset sync outbox

Entity History

stateset sync history --entity-type order --entity-id "ord_xxx"

Sequencer API Reference

The StateSet Sequencer provides deterministic event ordering with cryptographic proofs for multi-agent coordination. Base URL: https://api.sequencer.stateset.app

Authentication

All sequencer requests require Bearer token authentication:
curl https://api.sequencer.stateset.app/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY"

Event Ingestion

Ingest VES Events (Recommended)
POST https://api.sequencer.stateset.app/v1/ves/events/ingest
Content-Type: application/json

{
  "events": [
    {
      "event_id": "evt_xxx",
      "event_type": "order.created",
      "entity_type": "order",
      "entity_id": "ord_xxx",
      "payload": {...},
      "signature": "ed25519_signature"
    }
  ]
}
Legacy Event Ingestion
POST https://api.sequencer.stateset.app/v1/events/ingest

Events & Head

# List events
GET https://api.sequencer.stateset.app/v1/events

# Get head sequence number
GET https://api.sequencer.stateset.app/v1/head

# Get entity history
GET https://api.sequencer.stateset.app/v1/entities/{entity_type}/{entity_id}

VES Commitments

# List all commitments
GET https://api.sequencer.stateset.app/v1/ves/commitments

# Create new commitment
POST https://api.sequencer.stateset.app/v1/ves/commitments

# Create and anchor commitment
POST https://api.sequencer.stateset.app/v1/ves/commitments/anchor

# Get specific commitment
GET https://api.sequencer.stateset.app/v1/ves/commitments/{batch_id}

VES Validity Proofs (STARK ZK Proofs)

# Get public inputs for proof generation
GET https://api.sequencer.stateset.app/v1/ves/validity/{batch_id}/inputs

# List proofs for batch
GET https://api.sequencer.stateset.app/v1/ves/validity/{batch_id}/proofs

# Submit external STARK proof
POST https://api.sequencer.stateset.app/v1/ves/validity/{batch_id}/proofs
Content-Type: application/json
{
  "proof_data": "base64_encoded_proof",
  "prover": "agent_address"
}

# Get specific proof
GET https://api.sequencer.stateset.app/v1/ves/validity/proofs/{proof_id}

# Verify proof
GET https://api.sequencer.stateset.app/v1/ves/validity/proofs/{proof_id}/verify

VES Compliance Proofs (Per-Event Encrypted)

# Get compliance inputs for event
POST https://api.sequencer.stateset.app/v1/ves/compliance/{event_id}/inputs

# List compliance proofs for event
GET https://api.sequencer.stateset.app/v1/ves/compliance/{event_id}/proofs

# Submit compliance proof
POST https://api.sequencer.stateset.app/v1/ves/compliance/{event_id}/proofs

# Get specific compliance proof
GET https://api.sequencer.stateset.app/v1/ves/compliance/proofs/{proof_id}

# Verify compliance proof
GET https://api.sequencer.stateset.app/v1/ves/compliance/proofs/{proof_id}/verify

Inclusion Proofs

# Get inclusion proof for sequence number
GET https://api.sequencer.stateset.app/v1/ves/proofs/{sequence_number}

# Verify inclusion proof
POST https://api.sequencer.stateset.app/v1/ves/proofs/verify
Content-Type: application/json
{
  "sequence_number": 1523,
  "merkle_proof": {...}
}

On-Chain Anchoring

# Anchor commitment to Set Chain L2
POST https://api.sequencer.stateset.app/v1/ves/anchor
Content-Type: application/json
{
  "batch_id": "batch_xxx"
}

# Verify on-chain anchor
GET https://api.sequencer.stateset.app/v1/ves/anchor/{batch_id}/verify

Agent Key Management

# Register agent signing key
POST https://api.sequencer.stateset.app/v1/agents/keys
Content-Type: application/json
{
  "agent_id": "agent_xxx",
  "public_key": "ed25519_pubkey",
  "permissions": ["read", "write"]
}

Schema Registry

# List all schemas
GET https://api.sequencer.stateset.app/v1/schemas

# Register new schema
POST https://api.sequencer.stateset.app/v1/schemas
Content-Type: application/json
{
  "event_type": "order.created",
  "schema": {...}
}

# Validate payload against schema
POST https://api.sequencer.stateset.app/v1/schemas/validate

# Get schema by ID
GET https://api.sequencer.stateset.app/v1/schemas/{schema_id}

# Update schema status
PUT https://api.sequencer.stateset.app/v1/schemas/{schema_id}/status

# Delete schema
DELETE https://api.sequencer.stateset.app/v1/schemas/{schema_id}

# List schemas by event type
GET https://api.sequencer.stateset.app/v1/schemas/event-type/{event_type}

# Get latest schema for event type
GET https://api.sequencer.stateset.app/v1/schemas/event-type/{event_type}/latest

x402 Sequencer Payments

# Submit payment intent
POST https://api.sequencer.stateset.app/v1/x402/payments
Content-Type: application/json
{
  "amount": "10.00",
  "asset": "USDC",
  "network": "base",
  "recipient": "0x...",
  "sender": "0x..."
}

# Get payment status
GET https://api.sequencer.stateset.app/v1/x402/payments/{intent_id}

# Get payment receipt
GET https://api.sequencer.stateset.app/v1/x402/payments/{intent_id}/receipt

# Get batch status
GET https://api.sequencer.stateset.app/v1/x402/batches/{batch_id}

# Settle payment batch
POST https://api.sequencer.stateset.app/v1/x402/batches/settle

Health & Status

# Basic health check
GET https://api.sequencer.stateset.app/health

# Readiness check (includes DB)
GET https://api.sequencer.stateset.app/ready

# Detailed component health
GET https://api.sequencer.stateset.app/health/detailed

Legacy Endpoints

# Legacy commitments
GET https://api.sequencer.stateset.app/v1/commitments
POST https://api.sequencer.stateset.app/v1/commitments
GET https://api.sequencer.stateset.app/v1/commitments/{batch_id}

# Legacy proofs
GET https://api.sequencer.stateset.app/v1/proofs/{sequence_number}
POST https://api.sequencer.stateset.app/v1/proofs/verify

# Legacy anchoring
GET https://api.sequencer.stateset.app/v1/anchor/status
POST https://api.sequencer.stateset.app/v1/anchor
GET https://api.sequencer.stateset.app/v1/anchor/{batch_id}/verify

Agent Integration Patterns

Full Sync Flow for Agents

# 1. Ingest local commerce events to sequencer
curl -X POST https://api.sequencer.stateset.app/v1/ves/events/ingest \
  -H "Authorization: Bearer $STATESET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [{
      "event_id": "evt_001",
      "event_type": "order.created",
      "entity_type": "order",
      "entity_id": "ord_xxx",
      "payload": {"customer_id": "cust_xxx", "total": 99.99}
    }]
  }'

# 2. Get sequencer receipt with sequence number
# Response includes: sequence_number, merkle_root, signature

# 3. Create commitment batch
curl -X POST https://api.sequencer.stateset.app/v1/ves/commitments \
  -H "Authorization: Bearer $STATESET_API_KEY"

# 4. Anchor to Set Chain
curl -X POST https://api.sequencer.stateset.app/v1/ves/anchor \
  -H "Authorization: Bearer $STATESET_API_KEY" \
  -d '{"batch_id": "batch_xxx"}'

# 5. Verify on-chain
curl https://api.sequencer.stateset.app/v1/ves/anchor/batch_xxx/verify \
  -H "Authorization: Bearer $STATESET_API_KEY"

Multi-Agent Coordination

// Agent A: Create order and sync
const order = await commerce.orders.create({...});
const receipt = await fetch('https://api.sequencer.stateset.app/v1/ves/events/ingest', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${API_KEY}` },
  body: JSON.stringify({
    events: [{
      event_type: 'order.created',
      entity_type: 'order',
      entity_id: order.id,
      payload: order
    }]
  })
}).then(r => r.json());

// Agent B: Pull events and verify
const head = await fetch('https://api.sequencer.stateset.app/v1/head', {
  headers: { 'Authorization': `Bearer ${API_KEY}` }
}).then(r => r.json());

const proof = await fetch(`https://api.sequencer.stateset.app/v1/ves/proofs/${receipt.sequence_number}`, {
  headers: { 'Authorization': `Bearer ${API_KEY}` }
}).then(r => r.json());

MCP Tool Integration

The CLI exposes 700+ commerce operations via MCP for AI agents.

Start MCP Server

stateset mcp serve

Tool Categories

DomainExamples
Customerslist_customers, get_customer, create_customer
Orderscreate_order, ship_order, cancel_order
Productslist_products, create_product
Inventoryget_stock, adjust_inventory, reserve_inventory
Returnscreate_return, approve_return
Cartscreate_cart, add_cart_item, checkout
Paymentscreate_payment, process_refund
Analyticsget_sales_summary, get_demand_forecast
Syncsync_status, sync_push, sync_pull

Permission Model

# Read operations - always allowed
stateset "list orders"

# Write operations - blocked by default
stateset "create an order"
# → Shows preview, does not execute

# Write operations - enabled with --apply
stateset --apply "create an order for alice@example.com"
# → Executes operation

Multi-Channel Messaging

Supported Channels

ChannelProtocolStatus
WhatsAppCloud APIGA
TelegramBot APIGA
DiscordGateway + RESTGA
SlackEvents + Web APIGA
Signalsignal-cliGA
Google ChatSpaces APIGA
WebChatWebSocketGA
iMessageAppleScriptExperimental
TeamsBot FrameworkExperimental

Launch Channels

# All configured channels
stateset-channels

# Specific channels
stateset-whatsapp
stateset-discord
stateset-telegram
stateset-slack

Configuration

Create ~/.stateset/channels.json:
{
  "whatsapp": {
    "enabled": true,
    "phone_number_id": "xxx",
    "access_token": "xxx"
  },
  "discord": {
    "enabled": true,
    "bot_token": "xxx",
    "guild_id": "xxx"
  }
}

Warehouse Operations

Warehouse Management

# Create warehouse
stateset warehouse create --name "Main DC" --address "123 Warehouse Ave"

# Add zone
stateset warehouse add-zone --warehouse-id "wh_xxx" --name "Picking Zone A"

# Add location
stateset warehouse add-location --zone-id "zone_xxx" --name "A-01-01"

Fulfillment

# Create wave
stateset fulfillment create-wave --warehouse-id "wh_xxx" --orders '["ord_xxx", "ord_yyy"]'

# Assign pick task
stateset fulfillment assign-pick --task-id "pick_xxx" --picker "user_xxx"

# Complete pick
stateset fulfillment complete-pick --task-id "pick_xxx"

# Pack
stateset fulfillment pack --wave-id "wave_xxx"

# Ship
stateset fulfillment ship --wave-id "wave_xxx"

Receiving

# Create receipt
stateset receiving create --po-id "po_xxx" --expected-date "2026-02-01"

# Receive items
stateset receiving receive-items --receipt-id "rec_xxx" --items '[{"sku":"SHOE-001","qty":100}]'

# Put away
stateset receiving put-away --receipt-id "rec_xxx" --location "A-01-01"

Financial Operations

General Ledger

# Create account
stateset gl create-account --number "1000" --name "Cash" --type "asset"

# Post journal entry
stateset gl post-entry --debit '{"account":"1000","amount":100}' --credit '{"account":"4000","amount":100}'

# Trial balance
stateset gl trial-balance

# Close period
stateset gl close-period --period "2026-01"

Accounts Receivable

# AR aging
stateset ar aging

# Apply payment
stateset ar apply-payment --customer-id "cust_xxx" --amount 500 --invoice-id "inv_xxx"

# Generate statement
stateset ar generate-statement --customer-id "cust_xxx"

Accounts Payable

# Create bill
stateset ap create-bill --supplier-id "sup_xxx" --amount 1000 --due-date "2026-02-15"

# Schedule payment
stateset ap schedule-payment --bill-id "bill_xxx" --date "2026-02-10"

# AP aging
stateset ap aging

Hybrid semantic + BM25 search across commerce entities.
# Index products
stateset vector index-products

# Search products
stateset vector search --query "red running shoes under $100" --limit 10

# Index customers
stateset vector index-customers

# Search customers
stateset vector search-customers --query "enterprise accounts in California"

Heartbeat Monitor

Proactive health checking for commerce operations.

Built-in Checkers

CheckerTriggerAction
low-stockStock below thresholdAlert, auto-reorder
abandoned-cartsCart idle > timeoutRecovery notification
revenue-milestoneTarget reached/missedDashboard alert
pending-returnsReturn aging > daysEscalation
overdue-invoicesInvoice past dueCollection notification
subscription-churnCancellation spikeRetention campaign

CLI

# Health status
stateset heartbeat status

# Trigger check
stateset heartbeat run low-stock

# Enable/disable checker
stateset heartbeat enable low-stock
stateset heartbeat disable low-stock

Skills System

38 built-in skills covering the full commerce lifecycle.

Install Skills

npm install -g @stateset/icommerce-skills
icommerce-skills list
icommerce-skills install

Skill Categories

Core Commerce:
  • commerce-engine-setup
  • commerce-embedded-sdk
  • commerce-customers
  • commerce-products
  • commerce-orders
  • commerce-checkout
  • commerce-payments
Inventory & Fulfillment:
  • commerce-inventory
  • commerce-shipments
  • commerce-returns
  • commerce-backorders
  • commerce-fulfillment
  • commerce-receiving
  • commerce-warehouse
  • commerce-lots-and-serials
Financial:
  • commerce-invoices
  • commerce-tax
  • commerce-currency
  • commerce-accounts-payable
  • commerce-accounts-receivable
  • commerce-cost-accounting
  • commerce-credit
  • commerce-general-ledger
Platform:
  • commerce-sync
  • commerce-autonomous-engine
  • commerce-vector-search
  • commerce-mcp-tools

Language Bindings

The Rust core compiles to 10 target runtimes:
RuntimeTechnologyUse Case
Native RustDirect linkingHigh-performance backends
Node.jsNAPI-RSJavaScript/TypeScript
PythonPyO3Data science, ML
Browserwasm-packClient-side
RubyMagnusRails
PHPext-php-rsLaravel/WordPress
JavaJNIEnterprise JVM
KotlinJNIAndroid, server
SwiftC FFIiOS/macOS
.NET/C#P/InvokeASP.NET, Unity
GocgoGo microservices

Node.js Example

const { Commerce } = require('@stateset/embedded');

const commerce = new Commerce('~/.stateset/commerce.db');

// Create customer
const customer = commerce.customers.create({
  email: 'alice@example.com',
  name: 'Alice Smith'
});

// Create order
const order = commerce.orders.create({
  customerId: customer.id,
  items: [{ sku: 'SHOE-001', quantity: 2 }]
});

console.log(`Order created: ${order.id}`);

Python Example

from stateset_embedded import Commerce

commerce = Commerce('~/.stateset/commerce.db')

# Create customer
customer = commerce.customers.create(
    email='alice@example.com',
    name='Alice Smith'
)

# Create order
order = commerce.orders.create(
    customer_id=customer.id,
    items=[{'sku': 'SHOE-001', 'quantity': 2}]
)

print(f'Order created: {order.id}')

Response Format

Success:
{"success": true, "data": {...}}
Error:
{"success": false, "error": "Description", "hint": "How to fix"}

Rate Limits

LimitValue
API requests1000/minute
Write operations100/minute
Sync operations10/minute
Vector search100/minute

System Statistics

ComponentMetricValue
stateset-coreLines of Code~45,000
stateset-dbLines of Code~55,000
stateset-embeddedLines of Code~39,000
stateset-sequencerLines of Code~33,000
Total RustLines of Code~172,000
Domain ModulesCount32
Domain TypesCount400+
Database TablesCount70+
Commerce API MethodsCount700+
Sequencer API EndpointsCount40+
Language BindingsCount10
Commerce SkillsCount38
Messaging ChannelsCount9

Everything You Can Do

ActionWhat it does
Create ordersProcess commerce transactions
Manage inventoryTrack stock, reservations, adjustments
Process returnsHandle RMAs and refunds
Run fulfillmentPick, pack, ship workflows
Accept paymentsx402 stablecoin payments
Sync eventsVES multi-agent coordination via sequencer
Generate proofsMerkle inclusion + STARK ZK proofs
Anchor on-chainSet Chain L2 commitment anchoring
Register schemasEvent type validation
Search productsHybrid semantic + keyword search
Message customers9-channel omnichannel support
Run analyticsSales reports, forecasts
Manage financesGL, AP, AR, tax

Quick Reference

CLI Commands

# Engine
stateset init [--demo]
stateset status

# Customers
stateset customers list|get|create|update|delete

# Products
stateset products list|get|create|update|delete

# Inventory
stateset inventory get|adjust|reserve|release

# Orders
stateset orders list|get|create|ship|cancel

# Returns
stateset returns list|get|create|approve|complete

# Sync
stateset sync status|push|pull|full|outbox

# Payments
stateset-pay create|balance|verify

# Channels
stateset-channels
stateset-whatsapp|discord|telegram|slack

Sequencer API Quick Reference

# Base URL: https://api.sequencer.stateset.app

# Events
POST   /v1/ves/events/ingest          # Ingest VES events
GET    /v1/events                     # List events
GET    /v1/head                       # Get head sequence
GET    /v1/entities/{type}/{id}       # Entity history

# VES Commitments
GET    /v1/ves/commitments            # List commitments
POST   /v1/ves/commitments            # Create commitment
POST   /v1/ves/commitments/anchor     # Commit and anchor
GET    /v1/ves/commitments/{batch_id} # Get commitment

# VES Validity Proofs
GET    /v1/ves/validity/{batch_id}/inputs   # Get proof inputs
GET    /v1/ves/validity/{batch_id}/proofs   # List proofs
POST   /v1/ves/validity/{batch_id}/proofs   # Submit proof
GET    /v1/ves/validity/proofs/{id}/verify  # Verify proof

# VES Compliance Proofs
POST   /v1/ves/compliance/{event_id}/inputs  # Get inputs
GET    /v1/ves/compliance/{event_id}/proofs  # List proofs
POST   /v1/ves/compliance/{event_id}/proofs  # Submit proof

# Inclusion Proofs
GET    /v1/ves/proofs/{sequence_number}     # Get proof
POST   /v1/ves/proofs/verify                # Verify proof

# Anchoring
POST   /v1/ves/anchor                       # Anchor to chain
GET    /v1/ves/anchor/{batch_id}/verify     # Verify on-chain

# Agent Registration
POST   /v1/agents/register                  # Register new agent (get API key)
GET    /v1/agents/{agent_id}                # Get agent details
POST   /v1/agents/{agent_id}/api-keys       # Create additional API key
GET    /v1/agents/{agent_id}/api-keys       # List agent's API keys
DELETE /v1/agents/{agent_id}/api-keys/{pfx} # Revoke API key

# Agent Signing Keys
POST   /v1/agents/keys                      # Register signing key

# Schemas
GET    /v1/schemas                          # List schemas
POST   /v1/schemas                          # Register schema
POST   /v1/schemas/validate                 # Validate payload
GET    /v1/schemas/event-type/{type}/latest # Latest schema

# x402 Payments
POST   /v1/x402/payments                    # Submit intent
GET    /v1/x402/payments/{id}               # Get status
GET    /v1/x402/payments/{id}/receipt       # Get receipt
POST   /v1/x402/batches/settle              # Settle batch

# Health
GET    /health                              # Basic health
GET    /ready                               # Readiness
GET    /health/detailed                     # Component health

Ideas to Try

  • Register your AI agent with the sequencer to get an API key
  • Set up the embedded engine with demo data
  • Create a multi-step order flow with cart → checkout → fulfillment
  • Configure VES sync between multiple agents using the sequencer
  • Enable x402 payments for agent-to-agent commerce
  • Ingest events and generate inclusion proofs via sequencer API
  • Anchor commitments on-chain and verify with STARK proofs
  • Register custom event schemas for domain-specific events
  • Set up WhatsApp or Discord for customer support
  • Run vector search for product discovery
  • Configure heartbeat monitors for low-stock alerts
  • Build a storefront with stateset scaffold

StateSet iCommerce v0.3.2 January 2026