In modern software development, we've embraced practices like unit testing and continuous integration to build robust, reliable applications. But when it comes to business processes—especially complex, multi-step workflows that interact with various services—testing often becomes a bottleneck. Fragile staging environments, dependencies on other teams, and inconsistent external APIs can turn a simple logic change into a deployment nightmare.
This is where the paradigm of Business-as-Code changes the game. By treating your business logic as version-controlled, testable software, you regain control and velocity. With the .do SDK, we've made local-first development a core principle. You can build, test, and debug your entire agentic workflow on your machine, giving you the confidence to deploy faster and more frequently.
This post will dive into how the .do SDK's local testing and mocking capabilities empower you to move from idea to production-ready API with unprecedented speed and reliability.
Imagine a standard customer onboarding process: validate an email, create a user profile in a database, and send a welcome email. In a traditional setup, testing this workflow is anything but simple.
This friction discourages thorough testing, especially for edge cases, leading to bugs discovered in production—the most expensive place to find them.
The .do SDK is a Typescript library that transforms complex processes into simple, powerful Services-as-Software. It allows you to define agentic workflows programmatically.
Consider our customer onboarding example, defined with the .do SDK:
import { Agent, Workflow } from '@do-sdk/core';
// Define a workflow with multiple steps
const onboardCustomer = new Workflow({
name: 'customer.onboard',
steps: [
{ do: 'validate.email' },
{ do: 'create.user.profile' },
{ do: 'send.welcome.email' },
],
});
This isn't just a definition; it's executable code. And if it's code, it should be testable like any other part of your application.
The .do SDK ships with a complete local testing environment and powerful mocking utilities, directly addressing the pains of traditional workflow testing.
You can execute your entire workflow on your local machine, without deploying anything. This allows you to use your favorite IDE, set breakpoints, and step through your business logic just as you would with any other Typescript application.
The true power comes from the ability to mock each step of your workflow. You don't need a real email service or a live database to verify that your onboardCustomer workflow behaves correctly.
Instead, you can provide mock implementations during your test run.
This granular control allows you to achieve near 100% test coverage for your business logic, ensuring every possible path is accounted for before you ever think about deployment.
The "Develop, Test, Deploy" cycle is at the heart of the .do platform. Once you have thoroughly tested your agentic workflow locally and committed your Business-as-Code to your repository, deployment is the final, simple step.
When you deploy a workflow using the SDK, the .do platform automatically provisions and exposes it as a secure, scalable API endpoint. Your locally-verified logic becomes a consumable Service-as-Software without any manual API gateway configuration or server setup. The confidence you built locally translates directly to a reliable production service.
Stop waiting for staging environments and start developing with confidence. The .do SDK gives you the tools to build, test, and deploy complex agentic workflows as easily as any other piece of modern software.
Ready to transform your business processes into robust, scalable APIs?
Check out our comprehensive documentation for detailed guides and examples. It's time to bring the power of local-first development to your agentic workflows.