HeadlessOps
Platform

Platform Overview

Architecture and core components of the HeadlessOps platform

Platform Overview

HeadlessOps is a serverless automation runtime with a REST API, an MCP server, and a web UI. The platform is structured around Workspaces as the top-level isolation boundary.

Architecture

┌─────────────────────────────────────────────────┐
│                   HeadlessOps                   │
│                                                 │
│  ┌───────────────┐   ┌────────────────────────┐ │
│  │   REST API    │   │      MCP Server        │ │
│  │   /api/*      │   │   OAuth 2.1 + PKCE     │ │
│  └───────┬───────┘   └───────────┬────────────┘ │
│          │                       │              │
│  ┌───────▼───────────────────────▼────────────┐ │
│  │               Platform Core                │ │
│  │  Workspaces · Integrations · Credentials   │ │
│  │  Runs · Data Stores · Knowledge Base       │ │
│  └───────────────────────┬────────────────────┘ │
│                          │                      │
│  ┌───────────────────────▼────────────────────┐ │
│  │         TypeScript Step Runner             │ │
│  │   Isolated V8 isolate per step             │ │
│  │   ctx.http · ctx API · 30s timeout         │ │
│  └────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────┘

Key Components

Workspaces

A workspace is a self-contained tenant environment. All resources (integrations, credentials, data stores, knowledge base) are scoped to a workspace. A user can belong to multiple workspaces with different roles in each.

Each workspace has:

  • A unique id (CUID) and slug (URL-friendly name)
  • A member roster with role assignments (OWNER, ADMIN, DEVELOPER, MEMBER, VIEWER)
  • API keys scoped to that workspace
  • Isolated credentials vault, data stores, and knowledge base

Integrations

An integration is the core unit of automation. It consists of:

  • An integration.yaml manifest — defines trigger type, step graph, and routing
  • One or more TypeScript step files (step_id.ts) — each step is async function run(input, ctx)
  • Optional supporting files — helpers, config, knowledge_base.md, fix_log.md
my-automation/
  integration.yaml      # Required — manifest
  step_one.ts           # TypeScript step (must match step id)
  step_two.ts
  helpers.ts            # Optional — shared utilities
  knowledge_base.md     # Recommended — documents design and schemas
  fix_log.md            # Required when debugging

Runs

Each time an integration is triggered (via webhook, schedule, or manual API call), a Run is created. Runs track:

FieldDescription
statusPENDINGRUNNINGSUCCEEDED / FAILED / CANCELLED
stepsStructured log per step with input, output, and timestamps
outputValue set via ctx.output() (for synchronous webhooks)
triggeredBywebhook / schedule / manual

The TypeScript Runtime

Each step runs in an isolated V8 TypeScript environment:

  • Steps communicate through ctx (credentials, logging, data stores, output, HTTP)
  • Steps pass data to each other via their return value: ${{ steps.STEP_ID.output.field }}
  • The runtime enforces a 30-second timeout per step
  • ctx.http is the built-in HTTP client, auto-instrumented for request tracing

API Authentication

Two authentication modes are supported:

ModeHeader / CookieUse Case
API KeyAuthorization: Bearer iter_<key>Programmatic access, MCP, CI/CD
SessionCookie after POST /api/auth/sign-in/emailBrowser-based web app

API keys are scoped to a workspace and automatically resolve the workspace — you do not need to pass workspaceId with API key requests.

Integration Lifecycle

create ──▶ push files ──▶ deploy ──▶ trigger ──▶ run ──▶ logs
              │                          │
              └──── push-run (atomic) ───┘
StepAPI EndpointDescription
CreatePOST /api/integrationsRegister a new integration by name
Push filesPUT /api/integrations/:name/files/:filenameUpload individual files
DeployPOST /api/integrations/:name/deploySnapshot current files as a versioned deployment
Push-runPOST /api/integrations/:name/push-runAtomic: push + deploy + trigger a run
TriggerPOST /api/integrations/:name/runsTrigger a manual run
ActivatePOST /api/integrations/:name/activateEnable webhook/schedule processing

Platform Data Flow

External Event (webhook/cron/manual)


   Integration Trigger


    Step 1: fetch_data.ts
         │   ctx.credentials.MY_API_KEY
         │   ctx.log("fetched", {...})
         │   return {"record": {...}}

         ▼ ${{ steps.step_1.output.record }}
    Step 2: process.ts
         │   ctx.stores.processed_records.find_one(...)
         │   ctx.stores.processed_records.insert(...)
         │   return {"status": "ok"}


   Run completed → SUCCEEDED

Supported Trigger Types

TypeHow It FiresYAML trigger.type
WebhookHTTP POST/GET to /api/hooks/{workspaceId}/{name}webhook
ScheduleCron expression in UTCschedule
ManualAPI call or web UImanual

What Makes HeadlessOps Different

  • AI-native — every operation is available as an MCP tool for AI agents
  • Code-first — automations are TypeScript files, not drag-and-drop blocks
  • Deterministic — no magic. Steps run in order, data flows explicitly
  • Observable — every step produces structured logs visible in the run history
  • Idempotency-ready — data stores let you track what's been processed