In the world of task automation and agentic workflows, complexity is the enemy. We've all seen them: sprawling, monolithic scripts that try to do everything at once. They're brittle, a nightmare to debug, and nearly impossible to reuse. When a small part fails, the entire process grinds to a halt. But what if there was a better way? What if, instead of building giant, fragile machines, we could assemble powerful systems from simple, durable parts?
This is the core philosophy behind the .do platform: focusing on the atomic unit of work. By breaking down complex processes into their smallest, indivisible components, we can build automation that is more reliable, scalable, and intelligent.
Think of an atomic action as a single Lego brick. It's a self-contained, executable task designed to do one thing and do it exceptionally well. It has a clear purpose, defined inputs, and predictable outputs.
On the .do platform, an atomic action is the smallest, indivisible unit of work in a workflow. It could be anything from:
Each action is isolated and independent. Its success or failure doesn't inherently depend on the actions that came before or after it—only on the inputs it receives.
If actions are the Lego bricks, then workflows are the structures you build with them. A workflow orchestrates multiple atomic actions, chaining them together with logic to accomplish a larger business goal.
For example, a "New User Onboarding" workflow might be composed of these atomic actions:
This "business as code" approach offers tremendous advantages:
The true power of the .do platform is that it allows you to transform your unique business operations into these reusable, programmable building blocks. You're not limited to a pre-built library; you can define any custom action you need.
Here’s a simple example in TypeScript of how you might define an atomic action to send a welcome email using the .do 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);
In this code, we've clearly defined:
This action is now a first-class citizen in your automation toolkit, ready to be executed, automated, and scaled within any agentic workflow.
Q: What is an atomic action in the .do platform?
A: An atomic action is the smallest, indivisible unit of work in a workflow. It's a self-contained, executable task—like sending an email, querying a database, or calling an external API. Each action is designed to do one thing well.
Q: How are actions different from workflows?
A: Actions are the individual steps, while workflows are the orchestration of multiple actions in a specific sequence or logic. You build complex workflows by composing simple, reusable actions together.
Q: Can I create my own custom actions?
A: Absolutely. The .do SDK allows you to define custom actions with specific inputs, outputs, and business logic. This transforms your unique business operations into reusable, programmable building blocks for any workflow.
Ready to move beyond brittle scripts? Start thinking atomically. By breaking down your processes into their fundamental components, you can build task automation that is more powerful, flexible, and ready for the future of agentic work.