StateSet iCommerce Engine
Infrastructure for autonomous commerce. Embedded engine, verifiable sync, on-chain settlement, x402 payments, and multi-channel messaging.Skill Files
Or just read them from the URLs above!
Check for updates: Re-fetch these files anytime to see new features!
API Base URLs
Environment Variables:
This page is the skill’s own reference — the whole surface an agent is given,
in one place. It is long by design and is not the way in for a person: read
the iCommerce quickstart to get the engine
running, then come back here for the command or endpoint you need.
Architecture Overview
StateSet iCommerce is a five-layer infrastructure stack:Install the CLI
How Reads run as-is; writes need
stateset parses a command (@stateset/cli 1.28.x, bin/stateset.js).
The binary dispatches exactly five subcommands — agent, doctor, update,
simulate, pay (its SUBCOMMAND_SCRIPTS table) — and joins every other
positional into one natural-language request:--apply. There is no stateset <resource> <verb> --flag
grammar: any flag outside the main set makes node’s parseArgs throw
ERR_PARSE_ARGS_UNKNOWN_OPTION before the CLI starts. For deterministic,
non-AI commands use stateset-direct <resource> <action> [args] (customers,
orders, products, inventory, returns, vector). Sibling binaries take a hyphen,
not a space: stateset-sync push, stateset-init --demo, stateset-pay.~/.config/stateset/config.json:
Initialize the Engine
Create a new commerce database:~/.stateset/commerce.db with:
- SQLite database with 203 tables
- Demo data (customers, products, inventory)
- Sync outbox ready for VES
Authentication
Commerce operations run locally via the embedded engine. Sequencer API requests require your API key:Agent Registration
AI agents must register with the sequencer to receive an API key for authentication.Register a New Agent
apiKey securely. It is only returned once and cannot be retrieved later.
Registration Options
Get Agent Details
Create Additional API Keys
List API Keys
Revoke an API Key
Register Signing Key (for VES Events)
After registration, agents should register an Ed25519 signing key for VES event signatures:Core Operations
Customers
Products
Inventory
Orders
Returns
Checkout Flow
Cart Operations
Complete Checkout Flow
x402 Payments
HTTP-native stablecoin micropayments between AI agents.Supported Networks
Create Payment Intent
Check Balance
Payment Flow
Verifiable Event Sync (VES)
Multi-agent coordination with cryptographic proofs.Check Sync Status
Push Events
Pull Events
Full Sync
View Outbox
Entity History
stateset-sync history takes only --limit and --db; it has no entity filter. For one entity’s
history query the sequencer directly: GET /api/v1/entities/{type}/{id} (see below).
Sequencer API Reference
The StateSet Sequencer provides deterministic event ordering with cryptographic proofs for multi-agent coordination. Base URL:https://api.sequencer.stateset.com
Authentication
All sequencer requests require Bearer token authentication:Event Ingestion
Legacy Event Ingestion (without signatures)
Computing Payload Hash:
Events & Head
VES Commitments
VES Validity Proofs (STARK ZK Proofs)
VES Compliance Proofs (Per-Event Encrypted)
Inclusion Proofs
On-Chain Anchoring
Agent Key Management
Schema Registry
x402 Payment Protocol
The x402 protocol enables agent-to-agent stablecoin payments with off-chain signing and batched on-chain settlement.Payment Flow Overview
Step 1: Generate and Register Signing Key
Step 2: Compute Signing Hash
The signing hash must be computed exactly as the sequencer expects:Step 3: Sign and Submit Payment Intent
Step 4: Create and Commit Batch
Step 5: Settle Batch On-Chain
Step 6: Get Payment Receipt
x402 API Reference
Supported Networks
Supported Assets
Complete Agent-to-Agent Payment Example
Health & Status
Legacy Endpoints
Agent Integration Patterns
Full Sync Flow for Agents
Multi-Agent Coordination
MCP Tool Integration
The CLI exposes 938 commerce tools via MCP for AI agents.Start MCP Server
Tool Categories
Permission Model
Multi-Channel Messaging
Supported Channels
Launch Channels
Configuration
Create~/.stateset/channels.json:
Warehouse Operations
Warehouse Management
Fulfillment
Receiving
@stateset/cli; the REST call above is
Create a put away.
Financial Operations
General Ledger
Accounts Receivable
@stateset/cli; the REST call is
Ar customer statement.
Accounts Payable
@stateset/cli; the REST call is
Ap create payment run.
Vector Search
Hybrid semantic + BM25 search across commerce entities.stateset-direct vector needs OPENAI_API_KEY. Grammar: search <scope> <query> [limit],
index <scope> <id>, index-all <scope>, stats, clear <scope>, clear-all.
Heartbeat Monitor
Proactive health checking for commerce operations.Built-in Checkers
CLI
Skills System
38 built-in skills covering the full commerce lifecycle.Install Skills
@stateset/icommerce-skills is not yet published to npm — install from the repository as
above. The npm install -g form will work once it ships.Skill Categories
Core Commerce:- commerce-engine-setup
- commerce-embedded-sdk
- commerce-customers
- commerce-products
- commerce-orders
- commerce-checkout
- commerce-payments
- commerce-inventory
- commerce-shipments
- commerce-returns
- commerce-backorders
- commerce-fulfillment
- commerce-receiving
- commerce-warehouse
- commerce-lots-and-serials
- commerce-invoices
- commerce-tax
- commerce-currency
- commerce-accounts-payable
- commerce-accounts-receivable
- commerce-cost-accounting
- commerce-credit
- commerce-general-ledger
- commerce-sync
- commerce-autonomous-engine
- commerce-vector-search
- commerce-mcp-tools
Language Bindings
The Rust core compiles to 10 target runtimes:Node.js Example
Python Example
Response Format
Success:Rate Limits
System Statistics
Everything You Can Do
Quick Reference
CLI Commands
Sequencer API Quick Reference
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 v1.22.0 July 2026
Next steps
iCommerce quickstart
The human path through the same material.
CLI overview
The commands this skill wraps.
iCommerce skills
The rest of the skill collection.
Getting started for AI agents
Installing skills and MCP servers for an agent.