In the world of business automation, complexity is the enemy of reliability. We've all seen it: sprawling workflows that become a tangled mess of dependencies, making them impossible to debug, difficult to update, and fragile enough to break at the slightest change. When one part fails, the entire process can grind to a halt. What if there was a better way?
The solution lies in a fundamental principle of engineering: atomicity. By breaking down complex processes into their smallest, indivisible parts, we can build systems that are more resilient, scalable, and manageable. This is the core philosophy behind action.do—a platform for defining and executing atomic units for your agentic workflows. It's time to move beyond brittle scripts and embrace Business-as-Code.
Think of a complex machine. It's not a single, monolithic entity; it's an assembly of simple, specialized components. A screw, a gear, a spring—each has one job and does it well. This is precisely what an atomic action is on the .do platform.
An atomic action is the smallest unit of work in your automation. It's a self-contained, reusable function that encapsulates a single, specific task.
This "Define. Execute. Repeat." model is the foundation of reliable automation. You define a task once and can then execute it repeatedly across any number of workflows, confident in its behavior.
Creating an action on the .do platform is designed to be simple and intuitive for developers. You define what the action does, what it needs to run, and how it should behave.
Here’s a practical example using the .do SDK in TypeScript. We'll create an action to enrich a user's profile by fetching data from a service like Clearbit and updating our local database.
import { Do } from '@do-platform/sdk';
// Initialize the .do client with your API key
const-do = new Do(process.env.DO_API_KEY);
// Define a new atomic action to enrich user data
const enrichUserAction = await-do.action.create({
name: 'enrich-user-profile',
description: 'Fetches user data from Clearbit and updates the DB.',
inputs: {
email: 'string',
},
handler: async (inputs) => {
const userData = await clearbit.lookup(inputs.email);
const dbResult = await db.users.update({ email: inputs.email, data: userData });
return { success: true, userId: dbResult.id };
}
});
console.log('Action created:', enrichUserAction.id);
Let's break this down:
This is a fair question. While an action.do may feel similar to a serverless function, it operates at a higher level of abstraction, designed specifically for building agentic workflows.
A .do Action is a fully managed, versioned, and observable entity. When you create an action, you're not just deploying code; you're registering a first-class citizen in the .do ecosystem. This provides benefits far beyond a simple FaaS (Function-as-a-Service) offering:
This turns your business logic into true Services-as-Software—managed, versioned, and composable building blocks for your enterprise.
A crucial design principle in the .do platform is that actions cannot call other actions.
This might seem limiting at first, but it's a deliberate choice that enforces resilience and clarity. The responsibility of an action.do is to perform a single task. The responsibility of sequencing, branching, and orchestrating multiple actions belongs to a .workflow.do agent.
This separation of concerns is powerful:
By embracing atomicity, you shift from writing brittle scripts to composing resilient business processes. Instead of a single monolithic function, a customer onboarding process becomes a clean, readable workflow that orchestrates a series of atomic actions:
Each step is an independent, reusable, and observable unit. If the email service is down, only the send-welcome-email action fails, and the workflow can be designed to retry that specific step without affecting the others. This is the path to building automation that doesn't just work—it lasts.
Ready to stop fighting with complex scripts and start composing powerful, resilient automations? Dive into the .do platform and build your first atomic action today.