StateSet iCommerce Quickstart
This guide helps AI agents get up and running with the StateSet iCommerce engine in minutes.Overview
StateSet iCommerce provides:- Embedded Commerce Engine - Local SQLite database with 70+ tables
- Autonomous Agent Runtime - Scheduled jobs, workflows, policies
- Multi-Agent Coordination - Verifiable Event Sync (VES) via sequencer
- 90+ MCP Tools - Full commerce operations accessible to agents
Prerequisites
- Node.js 18+
- npm or yarn
- Anthropic API key (for Claude-powered agents)
Step 1: Install the CLI
Step 2: Register Your Agent
Register with the sequencer to get an API key for multi-agent coordination:Step 3: Initialize Commerce Database
~/.stateset/commerce.db with:
- 70+ commerce tables (orders, customers, products, inventory, etc.)
- Demo data (if
--demoflag used) - Sync outbox for VES events
Step 4: Configure Sync
Create~/.stateset/sync-config.json:
Step 5: Run Your First Agent Command
Read-Only Query
Write Operation
With Sync (Multi-Agent)
Step 6: Start Autonomous Engine
Run the full autonomous engine with scheduled jobs and workflows:Agent Commands Reference
Customer Operations
Order Operations
Inventory Operations
Returns Operations
Sync Operations
Programmatic Usage (Node.js)
Multi-Agent Coordination
How Agents Coordinate
Running Multiple Agents
Terminal 1 - Order Agent:Autonomous Engine Features
Scheduled Jobs
Default Jobs
| Job | Schedule | Description |
|---|---|---|
process-orders | Every 5 min | Process pending orders |
check-inventory | Hourly | Check low stock levels |
sync-events | Every 10 min | Sync with sequencer |
cleanup-carts | Daily | Abandon old carts |
Workflows
Pre-configured workflows for:- Order fulfillment lifecycle
- Return processing
- Subscription billing
- Inventory replenishment
Policies
15 policy sets covering:- Order value limits
- Inventory thresholds
- Return windows
- Discount rules
Environment Variables
Troubleshooting
Database not found
Sync not connecting
Agent not responding
Next Steps
- Explore the CLI - Run
stateset --helpfor all commands - Customize Agents - Edit
.claude/agents/*.mdfor agent personalities - Add Workflows - Create custom workflows in
.stateset/autonomous/ - Enable Webhooks - Configure external integrations
- Scale Up - Run multiple agents with different specializations
Quick Reference
| Command | Description |
|---|---|
stateset init | Initialize commerce database |
stateset "query" | Run agent query (read-only) |
stateset --apply "task" | Run agent task (write enabled) |
stateset --apply --sync "task" | Run with multi-agent sync |
stateset-autonomous start | Start autonomous engine |
stateset-sync status | Check sync health |
stateset-sync push | Push events to sequencer |
stateset-sync pull | Pull events from sequencer |
API Endpoints
| Endpoint | Purpose |
|---|---|
POST /api/v1/agents/register | Register new agent |
POST /api/v1/ves/events/ingest | Ingest VES events |
GET /api/v1/events | List events |
POST /api/v1/ves/commitments | Create commitment |
GET /health | Health check |
https://api.sequencer.stateset.app
StateSet iCommerce Engine v0.3.2 January 2026