Skip to main content

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

Verify installation:

Step 2: Register Your Agent

Register with the sequencer to get an API key for multi-agent coordination:
Response:
Save your API key - it’s only shown once.

Step 3: Initialize Commerce Database

This creates ~/.stateset/commerce.db with:
  • 70+ commerce tables (orders, customers, products, inventory, etc.)
  • Demo data (if --demo flag used)
  • Sync outbox for VES events

Step 4: Configure Sync

Create ~/.stateset/sync-config.json:
Verify connection:

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:
Output:

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:
Terminal 2 - Inventory Agent:
Both agents sync through the sequencer and coordinate automatically.

Autonomous Engine Features

Scheduled Jobs

Default Jobs

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

  1. Explore the CLI - Run stateset --help for all commands
  2. Customize Agents - Edit .claude/agents/*.md for agent personalities
  3. Add Workflows - Create custom workflows in .stateset/autonomous/
  4. Enable Webhooks - Configure external integrations
  5. Scale Up - Run multiple agents with different specializations

Quick Reference


API Endpoints

Base URL: https://api.sequencer.stateset.com
StateSet iCommerce Engine v1.22.0 July 2026