In any complex software system, when something goes wrong, the frantic search for answers begins. Engineers dive into a sea of scattered logs, piecing together cryptic messages from a dozen different services, trying to reconstruct a single event. Why did that user's order fail? Did the welcome email ever get sent? This reactive, time-consuming process is a familiar pain point for development teams. Traditional logging is noisy, lacks business context, and makes auditing a significant engineering project in itself.
But what if every single business operation—from sending an invoice to updating a CRM record—automatically generated its own clear, contextual, and immutable audit trail?
This isn't a future-state dream; it's a core feature of building with action.do. By defining your business logic as atomic Actions, you do more than just execute code. You create a rich, queryable history of every operation, transforming your execution layer from a black box into a goldmine of business intelligence and operational insight.
Typically, building a reliable audit trail is an afterthought. It's a feature you have to build, not one you get for free. This approach has several fundamental flaws:
At the heart of the action.do platform is the concept of the atomic action. As a refresher, an atomic action is the smallest, indivisible unit of work in a workflow. Think 'send an email', 'update a CRM record', or 'charge a credit card'.
According to our docs, it's designed "to either succeed completely or fail without side effects, ensuring process integrity and reliability."
Here’s a simple Action defined as code:
import { Action, client } from '@do-sdk/core';
// Define an atomic action as code
const sendWelcomeEmail = new Action({
name: 'send-welcome-email',
handler: async (inputs: { userId: string }) => {
const user = await db.users.find(inputs.userId);
if (!user) {
throw new Error('User not found.');
}
await email.send({
to: user.email,
subject: 'Welcome to .do!',
body: `Hi ${user.name}, welcome aboard!`
});
return { success: true, messageId: '...' };
}
});
While this looks like a simple function, the .do platform elevates it. Unlike a standard API endpoint or a serverless function, a .do Action is inherently stateful, auditable, and designed for agentic workflows. This is the key difference.
When you execute the Action above, the platform doesn't just run the code. It meticulously records the entire lifecycle of that execution automatically.
// Execute the action via the SDK
const result = await client.action('send-welcome-email').invoke({
userId: 'usr_12345'
});
For this single line of code, the .do platform automatically captures a complete, queryable record containing:
This isn't logging; it's a structured, event-sourced history of your business processes. You get a complete audit trail without writing a single extra line of code.
This built-in history is more than just a tool for debugging. It becomes a powerful source of business intelligence.
A customer reports they never received their welcome email.
Because Actions map directly to business operations, their history provides a real-time view of your business health. You can answer critical questions without custom analytics:
Need to prove to an auditor that a specific data change was authorized and completed? The immutable history of a .do Action serves as verifiable proof. You have an ironclad record of who (or what service) did what, with what data, and when.
The inherent audit trail of action.do is a paradigm shift. It moves observability from a costly, manually-intensive task to an automatic byproduct of a well-designed system. By encapsulating your work in atomic Actions, you're not just writing more reliable and scalable code—you're building a system that tells you its own story.
Stop spending valuable engineering cycles on building custom logging and auditing infrastructure. Focus on your core business logic and let the platform provide the deep insight needed to run, debug, and optimize your workflows.
Ready to build reliable and transparently auditable workflows? Define your first Action and see the difference with action.do today.