Documentation Index
Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
Use this file to discover all available pages before exploring further.
StateSet iCommerce Engine
Infrastructure for autonomous commerce. Embedded engine, verifiable sync, on-chain settlement, x402 payments, and multi-channel messaging.
Skill Files
| File | URL |
|---|
| 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
| Service | Base URL | Purpose |
|---|
| Commerce Engine | Local (embedded) | Core commerce operations (orders, products, customers) |
| Sequencer | https://api.sequencer.stateset.app/v1 | VES event ordering, proofs, commitments |
| VES (Sequencer) | https://api.sequencer.stateset.app/v1/ves | VES v1.0 protocol endpoints |
| x402 Payments | https://api.sequencer.stateset.app/v1/x402 | Payment 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:
| Layer | Component | Function |
|---|
| Compute | stateset-embedded | In-process commerce engine |
| Coordination | stateset-sequencer | Distributed event ordering |
| Settlement | Set Chain (L2) | On-chain verification |
| Payments | x402 Protocol | HTTP-native stablecoin payments |
| Communication | Messaging Gateway | 9-channel agent interaction |
Install the CLI
npm install -g @stateset/cli
Verify installation:
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:
This creates ~/.stateset/commerce.db with:
- SQLite database with 70+ tables
- Demo data (customers, products, inventory)
- Sync outbox ready for VES
Without demo data:
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
| Field | Type | Description |
|---|
name | string | Human-readable agent name (required) |
description | string | Agent purpose description |
tenantId | UUID | Join existing tenant (optional) |
storeIds | UUID[] | Restrict to specific stores |
readOnly | boolean | Read-only permissions (default: false) |
admin | boolean | Admin permissions (default: false) |
rateLimit | number | Requests 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
| Network | Chain ID | Assets | Status |
|---|
| Set Chain | 84532001 | ssUSD, USDC | Production |
| Base | 8453 | USDC | Production |
| Ethereum | 1 | USDC, USDT | Production |
| Arbitrum | 42161 | USDC | Production |
| Optimism | 10 | USDC | Production |
| Solana | — | USDC | Production |
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
Response:
{
"local_head": 1523,
"remote_head": 1520,
"pending_events": 3,
"last_sync": "2026-01-30T10:15:00Z"
}
Push Events
Pull Events
Full Sync
View 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());
The CLI exposes 700+ commerce operations via MCP for AI agents.
Start MCP Server
| Domain | Examples |
|---|
| Customers | list_customers, get_customer, create_customer |
| Orders | create_order, ship_order, cancel_order |
| Products | list_products, create_product |
| Inventory | get_stock, adjust_inventory, reserve_inventory |
| Returns | create_return, approve_return |
| Carts | create_cart, add_cart_item, checkout |
| Payments | create_payment, process_refund |
| Analytics | get_sales_summary, get_demand_forecast |
| Sync | sync_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
| Channel | Protocol | Status |
|---|
| WhatsApp | Cloud API | GA |
| Telegram | Bot API | GA |
| Discord | Gateway + REST | GA |
| Slack | Events + Web API | GA |
| Signal | signal-cli | GA |
| Google Chat | Spaces API | GA |
| WebChat | WebSocket | GA |
| iMessage | AppleScript | Experimental |
| Teams | Bot Framework | Experimental |
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
Vector Search
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
| Checker | Trigger | Action |
|---|
low-stock | Stock below threshold | Alert, auto-reorder |
abandoned-carts | Cart idle > timeout | Recovery notification |
revenue-milestone | Target reached/missed | Dashboard alert |
pending-returns | Return aging > days | Escalation |
overdue-invoices | Invoice past due | Collection notification |
subscription-churn | Cancellation spike | Retention 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:
| Runtime | Technology | Use Case |
|---|
| Native Rust | Direct linking | High-performance backends |
| Node.js | NAPI-RS | JavaScript/TypeScript |
| Python | PyO3 | Data science, ML |
| Browser | wasm-pack | Client-side |
| Ruby | Magnus | Rails |
| PHP | ext-php-rs | Laravel/WordPress |
| Java | JNI | Enterprise JVM |
| Kotlin | JNI | Android, server |
| Swift | C FFI | iOS/macOS |
| .NET/C# | P/Invoke | ASP.NET, Unity |
| Go | cgo | Go 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}')
Success:
{"success": true, "data": {...}}
Error:
{"success": false, "error": "Description", "hint": "How to fix"}
Rate Limits
| Limit | Value |
|---|
| API requests | 1000/minute |
| Write operations | 100/minute |
| Sync operations | 10/minute |
| Vector search | 100/minute |
System Statistics
| Component | Metric | Value |
|---|
| stateset-core | Lines of Code | ~45,000 |
| stateset-db | Lines of Code | ~55,000 |
| stateset-embedded | Lines of Code | ~39,000 |
| stateset-sequencer | Lines of Code | ~33,000 |
| Total Rust | Lines of Code | ~172,000 |
| Domain Modules | Count | 32 |
| Domain Types | Count | 400+ |
| Database Tables | Count | 70+ |
| Commerce API Methods | Count | 700+ |
| Sequencer API Endpoints | Count | 40+ |
| Language Bindings | Count | 10 |
| Commerce Skills | Count | 38 |
| Messaging Channels | Count | 9 |
Everything You Can Do
| Action | What it does |
|---|
| Create orders | Process commerce transactions |
| Manage inventory | Track stock, reservations, adjustments |
| Process returns | Handle RMAs and refunds |
| Run fulfillment | Pick, pack, ship workflows |
| Accept payments | x402 stablecoin payments |
| Sync events | VES multi-agent coordination via sequencer |
| Generate proofs | Merkle inclusion + STARK ZK proofs |
| Anchor on-chain | Set Chain L2 commitment anchoring |
| Register schemas | Event type validation |
| Search products | Hybrid semantic + keyword search |
| Message customers | 9-channel omnichannel support |
| Run analytics | Sales reports, forecasts |
| Manage finances | GL, 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