.do
ScaleServices-as-Software

Services-as-Software

The new business model unlocked by Business-as-Code - AI-delivered services that operate autonomously

The same way Infrastructure-as-Code unlocked Software-as-a-Service in the Cloud era, Business-as-Code unlocks AI-delivered Services-as-Software in the AI era.

The Paradigm Shift

Then: Cloud Era (2006-2024)

Infrastructure-as-Code (Terraform, CloudFormation, Kubernetes) enabled developers to:

  • Define infrastructure declaratively
  • Version control infrastructure
  • Deploy infrastructure automatically
  • Scale infrastructure elastically

This unlocked Software-as-a-Service businesses:

  • Salesforce: CRM delivered remotely
  • Stripe: Payments infrastructure as a service
  • Shopify: E-commerce platform as a service
  • Twilio: Communications as a service

Business Model: Deliver software applications remotely. Customers still need humans to operate the software.

Now: AI Era (2024+)

Business-as-Code ($.Subject.predicate.Object patterns, semantic graphs, AI agents) enables developers to:

  • Define businesses declaratively
  • Version control business logic
  • Deploy businesses automatically
  • Scale operations autonomously

This unlocks AI-delivered Services-as-Software:

  • Not software to operate → Services that execute autonomously
  • Not features to configure → Outcomes delivered automatically
  • Not licenses to buy → Results to consume
  • Not humans required → AI agents operate 24/7

Business Model: Deliver complete services autonomously. No human operators required.

What Changed?

From Software to Services

Traditional SaaS (2006-2024):

You buy: Software application
You operate: Configure, train staff, monitor, maintain
You get: A tool to use

Services-as-Software (2024+):

You buy: Service subscription
You operate: Nothing - service operates itself
You get: Outcomes delivered autonomously

Why Now?

Three convergences make Services-as-Software possible today:

  1. AI Models Reached Human-Level Capability

    • GPT-5, Claude Sonnet 4.5, Llama 4, Gemini 2.5 Pro
    • Reasoning, planning, tool use, memory
    • Multi-modal understanding (text, images, code)
  2. Semantic Standards Matured

    • Schema.org: 817 types, 1,518 properties
    • GS1: Supply chain and product standards
    • O*NET: 1,459 occupations, 17,588 tasks
  3. Infrastructure Became Elastic

    • Cloudflare Workers: Global, instant scale
    • Edge computing: 300+ locations
    • Serverless: Pay-per-execution pricing

Result: You can now build services that AI agents operate at global scale with zero human intervention.

Overview

graph TB SaaS[Services-as-Software Platform] SaaS --> Build[Build Services] SaaS --> Deploy[Deploy Globally] SaaS --> Monetize[Monetize & Bill] SaaS --> Operate[Operate Autonomously] Build --> B1[AI Integration] Build --> B2[Event Handlers] Build --> B3[Workflows] Deploy --> D1[300+ Edge Locations] Deploy --> D2[Auto-Scale] Deploy --> D3[Zero Downtime] Monetize --> M1[Subscription] Monetize --> M2[Usage-Based] Monetize --> M3[Outcome-Based] Operate --> O1[AI Agents 24/7] Operate --> O2[Self-Healing] Operate --> O3[Continuous Learning]

Create services that:

  • Combine AI, workflows, and business logic
  • Monetize through subscriptions or usage-based pricing
  • Scale automatically with demand
  • Integrate seamlessly with existing systems
  • Deliver measurable business outcomes autonomously

Key Capabilities

AI-Native Services: Built on foundation models (GPT-5, Claude Sonnet 4.5, Llama 4, Grok 4, Gemini 2.5 Pro) that provide intelligence, understanding, and generation capabilities.

Event-Driven Architecture: Services react to events ($.Event.created, $.Order.placed) and trigger actions across your business.

Semantic Integration: Using $.Subject.predicate.Object patterns, services integrate naturally with your existing data model and business processes.

Automatic Scaling: Built on Cloudflare Workers, services scale from zero to millions of requests without infrastructure management.

Built-in Monetization: Subscription, usage-based, and hybrid pricing models with automatic billing and payment processing.

What is a Service?

A Service is a packaged solution that delivers specific business outcomes:

  • Customer support automation
  • Content generation
  • Data analysis
  • Process automation
  • Integration services
  • Specialized AI agents

Creating Services

Define services using code:

import { service } from 'sdk.do'

export default service({
  name: 'SEO Content Generator',
  description: 'AI-powered SEO content creation',

  // Define pricing
  pricing: {
    model: 'subscription',
    plans: [
      { name: 'Starter', price: 29, features: ['10 articles/mo'] },
      { name: 'Pro', price: 99, features: ['50 articles/mo', 'priority'] },
      { name: 'Enterprise', price: 299, features: ['unlimited', 'custom'] },
    ],
  },

  // Define capabilities
  capabilities: {
    async generateArticle({ topic, keywords, length }) {
      // Use AI to generate SEO-optimized content
      const article = await $.ai.generateText({
        prompt: `Write an SEO article about ${topic}`,
        context: { keywords, length },
      })

      // Analyze and optimize
      const optimized = await $.ai.optimize(article, {
        for: 'seo',
        keywords,
      })

      return optimized
    },
  },
})

Monetization

Subscription Model

pricing: {
  model: 'subscription',
  plans: [
    { name: 'Basic', price: 19, interval: 'month' },
    { name: 'Pro', price: 199, interval: 'year' }
  ]
}

Usage-Based Model

pricing: {
  model: 'usage',
  tiers: [
    { up_to: 1000, price_per_unit: 0.10 },
    { up_to: 10000, price_per_unit: 0.08 },
    { above: 10000, price_per_unit: 0.05 }
  ]
}

Hybrid Model

pricing: {
  model: 'hybrid',
  subscription: { base: 49, includes: 1000 },
  overage: { price_per_unit: 0.05 }
}

Service Marketplace

List your services in the .do marketplace:

  • Automatic discovery
  • User reviews and ratings
  • Built-in billing
  • Usage analytics
  • Customer management

Integration

Services integrate seamlessly:

// Install a service
const seo = await $.services.install('seo-content-generator')

// Use the service
const article = await seo.generateArticle({
  topic: 'AI in Healthcare',
  keywords: ['AI', 'healthcare', 'diagnosis'],
  length: 1500,
})

Service Templates

Start with pre-built templates:

  • Customer Support Agent
  • Content Marketing Suite
  • Data Analysis Service
  • Email Marketing Automation
  • Social Media Manager
  • Sales Assistant

Managing Services

Dashboard

Monitor service performance:

  • Active users
  • Usage metrics
  • Revenue
  • Error rates
  • Customer feedback

Scaling

Automatic scaling based on:

  • Request volume
  • Response time
  • Resource usage
  • Cost optimization

Versioning

Manage service versions:

  • Semantic versioning
  • Gradual rollouts
  • A/B testing
  • Rollback support

Service Composition

Combine multiple services:

const workflow = $.workflow('content-pipeline', async (topic) => {
  // Use SEO service
  const article = await services.seo.generateArticle({ topic })

  // Use image service
  const images = await services.images.generate({
    descriptions: extractImageNeeds(article),
  })

  // Use publishing service
  await services.cms.publish({
    content: article,
    images,
    schedule: 'next_available',
  })
})

Analytics

Built-in analytics track:

  • Usage patterns
  • User engagement
  • Revenue metrics
  • Performance data
  • Error rates
  • Customer satisfaction

Best Practices

Design for Autonomy

Services should deliver value with minimal human intervention.

Clear Pricing

Make pricing transparent and predictable.

Quality Monitoring

Continuously monitor and improve service quality.

Documentation

Provide comprehensive docs and examples.

Customer Support

Offer responsive support channels.

The Economics Shift

Traditional Software Economics

Revenue Model: Per-seat licenses or subscriptions
Cost Structure: Software development + customer support + infrastructure
Margin Constraint: Human support team doesn't scale linearly

Example: Zendesk charges $19-99/agent/month. Customer needs humans to use the software.

Services-as-Software Economics

Revenue Model: Usage-based or outcome-based pricing
Cost Structure: Development + AI inference + infrastructure
Margin Benefit: AI scales infinitely, no human operators needed

Example: AI Customer Support Service charges $0.50/ticket resolved. No human support agents needed.

Real-World Examples

Customer Support Service

Traditional SaaS (Zendesk):

  • You buy support software ($99/agent/month)
  • You hire support agents
  • Agents use software to respond to tickets
  • You pay per agent seat

Services-as-Software:

// Deploy autonomous support service
const support = await $.Service.deploy({
  $type: 'CustomerSupportService',
  capabilities: ['ticket-triage', 'response-generation', 'resolution'],
  integration: { crm: 'salesforce' },
  pricing: { model: 'per-resolution', price: 0.5 },
})

// AI agents handle tickets 24/7
// You pay only for resolutions ($0.50 each)
// No human agents needed

Content Marketing Service

Traditional SaaS (HubSpot):

  • You buy content software ($800/month)
  • You hire content writers ($50-100/article)
  • Writers use software to create content

Services-as-Software:

// Deploy autonomous content service
const content = await $.Service.deploy({
  $type: 'ContentMarketingService',
  capabilities: ['seo-research', 'article-writing', 'publishing'],
  voice: await $.Brand.voice(business),
  pricing: { model: 'per-article', price: 25 },
})

// AI researches, writes, optimizes, publishes
// You pay per published article ($25 each)
// No writers needed

Documentation Structure

This documentation is organized into the following sections:

  1. The Paradigm Shift - Deep dive on IaC→SaaS :: BaC→SaS
  2. Architecture - Service architecture patterns built on Business-as-Code
  3. Building Services - How to create autonomous services
  4. Deployment - Service deployment and launch strategies
  5. Monetization - Usage and outcome-based pricing models
  6. Examples - Real-world autonomous service examples
  7. Lifecycle Management - Managing service versions and updates
  8. Service Composition - Combining services for complex workflows
  9. Pricing & Billing - Integration with payment systems
  10. Best Practices - Guidelines for autonomous service design

Getting Started

Start with The Paradigm Shift to understand how Business-as-Code enables Services-as-Software, then explore Architecture and Building Services.