The rise of intelligent agents and large language models (LLMs) has unlocked a new frontier in automation. We can now build systems that don't just follow rigid scripts but can reason, plan, and interact with the world. However, with great power comes great complexity. How do we ensure that these sophisticated, multi-step processes are reliable, accurate, and manageable?
The answer lies not in building bigger, more monolithic automations, but in breaking them down to their smallest, most fundamental components. It's time to think in terms of atomic actions. At action.do, we believe this is the key to building robust, scalable, and truly intelligent agentic workflows.
In the context of workflow automation, an atomic action is the smallest, indivisible unit of work. Think of it as a single, perfectly defined task that represents a clear business function.
More importantly, an atomic action is transaction-like: it either completes successfully, or it fails entirely, leaving no messy partial states behind.
Consider these examples:
Each is a self-contained operation. You can't "half-send" an email. This all-or-nothing principle is the foundation of reliability. When an agentic workflow calls an action, it gets a clear success or failure signal, allowing it to make accurate decisions about the next step.
action.do is designed to make this "business-as-code" philosophy a reality. We provide the framework to encapsulate any single, repeatable task into a powerful, API-callable action.
Instead of burying your business logic deep within a complex application, you define it as a clean, version-controlled, and testable unit. Here’s how simple it is to define a send-welcome-email action in TypeScript:
import { action } from '@do-sdk/core';
export const sendWelcomeEmail = action({
name: 'send-welcome-email',
description: 'Sends a welcome email to a new user.',
inputs: {
to: { type: 'string', required: true },
name: { type: 'string', required: true }
},
handler: async ({ inputs, context }) => {
const { to, name } = inputs;
// Email sending logic via an API like SendGrid or AWS SES would go here
console.log(`Sending welcome email to ${name} at ${to}`);
return { success: true, messageId: 'xyz-123' };
},
});
Let's break this down:
This isn't just a function; it's a super-powered, API-callable building block. Simple. Atomic. Powerful.
So, if an action.do is a single step, how do you handle complex processes? That's where workflow.do comes in.
You define an action once, and it becomes a reliable tool in your automation toolbox. You can then call this action from any number of different workflows. This promotes the DRY (Don't Repeat Yourself) principle, saving development time, reducing bugs, and simplifying maintenance. Define generate-report once, then use it in your "End of Month" workflow, your "Quarterly Review" workflow, and your "Ad-Hoc CEO Request" workflow.
This is where it all comes together. Intelligent agents are brilliant at high-level reasoning. An LLM can easily understand a request like, "When a new user signs up for the pro plan, send them a welcome email and create a task for their account manager to follow up in 3 days."
The agent's job is to plan the steps, not to get bogged down in the messy details of how to execute them. By providing the agent with a toolkit of well-defined atomic actions, you create a powerful partnership:
This separation of concerns—planning vs. execution—is the future of automation. It allows agents to focus on complex decision-making while relying on a set of robust, pre-approved, and perfectly executed tools.
Ready to move beyond brittle scripts? Start building the next generation of agentic workflows from the ground up. Encapsulate your business logic, simplify complexity, and unlock true accuracy with action.do.