In the world of software development, the siren song of a "quick script" is all too familiar. A small task comes up—syncing data, sending a report, provisioning a user—and a developer whips up a script to handle it. Problem solved. But is it?
Weeks later, that script breaks. The API it calls has changed. A new edge case appears. The original developer is on vacation. What was a "quick fix" now becomes a time-consuming-fire-drill, pulling valuable engineering resources away from core product work. This cycle of building brittle, monolithic automations is a silent killer of productivity. It’s a tax paid in developer hours, frustration, and technical debt.
What if we could fundamentally change this dynamic? The solution lies in shifting a single, core assumption: instead of building monolithic scripts, we should be building reusable, composable, atomic actions. This is the foundational principle behind the .do platform, turning your business logic into scalable, programmable building blocks.
Think of building a complex system with LEGOs versus carving it from a single block of wood. The latter might work, but any change, mistake, or addition requires re-carving the entire block. The LEGO approach lets you build, combine, and swap individual pieces with ease.
In our world, those LEGOs are atomic actions.
An atomic action is the smallest, indivisible unit of work in a workflow. It's a self-contained, executable task designed to do one thing and do it well.
Examples include:
By breaking down complex processes into these granular units, you gain immense power. Each action becomes a reusable, independently testable, and versionable component of your entire operational stack.
Talk is cheap. Let's see what an atomic action looks like in practice on the .do platform. Here’s how you would define a simple, yet crucial, action to send a welcome email using our TypeScript SDK:
import { Action } from '@do-co/agent';
// Define a new atomic action to send a welcome email
const sendWelcomeEmail = new Action('send-welcome-email', {
title: 'Send Welcome Email',
description: 'Sends a standardized welcome email to a new user.',
input: {
to: { type: 'string', required: true },
name: { type: 'string', required: true },
},
async handler({ to, name }) {
console.log(`Sending email to ${to}...`);
// Actual email sending logic (e.g., using an SMTP service) would go here
const message = `Welcome to the platform, ${name}!`;
console.log(message);
return { success: true, messageId: `msg_${Date.now()}` };
},
});
// Execute the action with specific inputs
const result = await sendWelcomeEmail.run({
to: 'new.user@example.com',
name: 'Alex',
});
console.log(result);
Let's break down what makes this so powerful:
Adopting this model isn't just an engineering exercise; it's a strategic investment with a clear and compounding return.
Drastically Reduced Development Time: Once the send-welcome-email action is defined, it never needs to be written again. Your "New User Onboarding" workflow can use it. Your "Re-engagement Campaign" can use it. Your "Admin Manual Add" process can use it. You write it once and reuse it everywhere.
Simplified Debugging and Maintenance: When a user onboarding process fails, you don't have to trace through a 500-line script. The system tells you the send-welcome-email action failed with a specific error. You know exactly where to look, reducing mean time to resolution (MTTR) from hours to minutes.
Unmatched Scalability and Reliability: Each action is an independent unit. You can deploy updates to one action without affecting others. You can monitor, log, and set alerts on an action-by-action basis. This granular control is impossible with monolithic scripts.
True "Business as Code": The most powerful aspect is transforming your unique business operations into these programmable building blocks. You're not just limited to generic tasks. You can create your own custom actions for logic that is entirely unique to your company, like calculate-user-churn-risk or provision-project-resources.
It's crucial to understand the relationship between a part and the whole. Actions are the individual steps, while workflows are the orchestration of multiple actions.
A complex New User Onboarding workflow isn't one giant script. It’s a sequence of simple, reusable actions:
By composing workflows from atomic actions, you build systems that are flexible, easy to understand, and resilient to change. Swapping out your CRM? Just update the add-user-to-crm action. The rest of the workflow remains untouched.
This is the future of agentic workflows: intelligent systems built on a foundation of robust, reliable, and discrete tasks.
Stop paying the tax of brittle scripts. Start investing in a library of reusable, atomic actions that capture your business logic. This is how you reclaim developer hours, build more reliable systems, and scale your operations with confidence.
Ready to stop writing boilerplate? Define your first atomic action on the .do platform and build the future of your automated workflows.