Quick Start

Option 1: Enable for Existing Products

If you already use OnlyStables Pay:

  1. Go to your OnlyStables Dashboard

  2. Navigate to Agent Commerce

  3. Toggle "Enable AI Agent Access"

  4. Copy your MCP configuration

  5. Done! Agents can now purchase your products

Option 2: SDK Integration

For developers building custom integrations:

Installation:

npm install @onlystables/agent-sdk

Basic Usage:

import { AgentCommerce } from '@onlystables/agent-sdk';

const commerce = new AgentCommerce({
  businessName: "Your Business",
  paymentAddress: '0xYourWalletAddress',
  network: 'base',
});

// Add your offerings
commerce.addOffering({
  type: 'product',
  id: 'laptop-charger',
  name: 'USB-C Laptop Charger',
  description: '65W fast charging',
  price: 49.99,
  inStock: true,
});

// Handle purchases
commerce.onPurchase(async (purchase) => {
  console.log('Agent purchased:', purchase.offering.name);
  await fulfillOrder(purchase);
});

// Start agent-accessible endpoint
await commerce.start({
  port: 4021,
  enableAPI: true,  // REST API
  enableMCP: true   // Model Context Protocol (optional)
});

console.log('✅ Your business is now AI-agent-ready!');

That's it! AI agents can now discover and purchase from you.

Use Cases

E-Commerce

Scenario: Online store selling electronics

Agent interaction:

User: "I need a wireless mouse" AI Agent: - Discovers your store via API - Finds wireless mouse ($29.99) - Confirms with user - Pays autonomously - Provides order confirmation

Service Businesses

Scenario: Salon offering haircuts and styling

Agent interaction:

User: "Book me a haircut for tomorrow afternoon" AI Agent: - Checks available time slots - Books 2:00 PM appointment - Pays $60 USDC - Adds to user's calendar

SaaS Subscriptions

Scenario: Cloud software with monthly plans

Agent interaction:

User: "Upgrade me to the Pro plan" AI Agent: - Compares plans - Selects Pro ($99/month) - Subscribes and pays first month - Sets up auto-renewal - Provides login credentials

Event Tickets

Scenario: Concert venue selling tickets

Agent interaction:

User: "Get me 2 VIP tickets to the summer concert" AI Agent: - Finds event - Purchases 2 tickets ($300 total) - Pays with USDC - Receives NFT tickets - Adds to user's wallet

Offering Types

Product

Physical or digital goods

Service

Scheduled appointments or on-demand services

Subscription

Recurring payments (monthly, yearly, etc.)

Event

One-time events with limited capacity

Last updated