worker
Deploy serverless functions to 300+ edge locations with zero cold starts. Run TypeScript at the edge with <1ms execution. Scale to millions of requests with pay-per-use pricing.
worker
Worker.do
Overview
The worker primitive is part of the .do platform's semantic API system. It follows the $.Subject.verb.Object pattern for consistent, intuitive interactions across SDK, CLI, API, and MCP interfaces.
Semantic Pattern
All worker operations follow the semantic $.Worker.verb.Object pattern:
import { $, worker } from 'sdk.do'
// Create resources
await $.Worker.create.Resource({ /* config */ })
// Query data
await $.Worker.get.Data({ /* params */ })
// Update state
await $.Worker.update.Status({ /* changes */ })Quick Start
import { worker } from 'sdk.do'
// Initialize and use the primitive
const result = await worker.operation({
// configuration parameters
})Access Methods
The worker primitive is accessible through multiple interfaces:
SDK
TypeScript/JavaScript library for programmatic access:
import { worker } from 'sdk.do'
await worker.method({ /* ... */ })CLI
Command-line interface for terminal operations:
do worker <command> [options]API
REST/RPC endpoints for HTTP integration:
curl -X POST https://api.do/v1/worker \
-H "Content-Type: application/json" \
-d '{"key":"value"}'MCP
Model Context Protocol for AI assistant integration:
Use worker primitives with AI assistants via MCPRelated Primitives
See other primitives in the execution category.