Skip to main content
This guide helps AI agents get up and running with the StateSet iCommerce engine in minutes.
This page is the agent-oriented path: register an agent, sync it, and let it run commands. If you are a person setting up the engine or deploying it, start with the StateSet iCommerce Engine Quickstart instead.

Overview

StateSet iCommerce provides:
  • Embedded Commerce Engine - Local SQLite database with 203 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.
The commerce database initialised in step 3 is the agent’s whole world: it answers from what is in it and nothing else. If replies come back plausible but unspecific, the gateway is connected and the database is empty — check the --db path before looking anywhere else.

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)

There is no --sync flag on stateset; sync is a separate step (or a running stateset-sync daemon).

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

Next steps

iCommerce CLI

The commands behind each step.

Messaging channels

Putting the agent in front of customers.

Admin console

Operating the engine you just started.

iCommerce architecture

How the pieces fit together.
Last modified on August 31, 2026