In modern software development, the gap between a defined business process and its live, technical implementation can be a minefield. We've all seen it: brittle automation scripts, tangled third-party integrations, and complex logic that lives only in documentation or a project manager's mind. What if you could treat your business processes with the same rigor and discipline as your application code?
This is the promise of Business-as-Code, a paradigm that transforms operational workflows into version-controlled, testable, and deployable software assets. And the tool that makes this a reality for developers today is the .do SDK.
Let's explore how you can go from a simple business requirement to a scalable, production-ready API using our agentic workflow SDK.
Business-as-Code (BaC) is an approach where you define, execute, and manage business processes using code. Instead of relying on disparate visual flow builders, spreadsheets, or manual hand-offs, you codify the logic in a programming language.
This brings the powerful benefits of modern software development to your operations:
The .do SDK is a Typescript library designed from the ground up to enable Business-as-Code. It provides the tools to build, test, and deploy agentic workflows—sequences of automated tasks carried out by a software "agent."
At its core, the SDK allows you to turn complex processes into simple, powerful Services-as-Software. If you know Typescript, you have everything you need to start automating complex business logic and delivering it as a robust service.
Theory is great, but let's see how it works in practice. Imagine a common business process: onboarding a new customer. This typically involves several steps: validating their email, creating a user profile in your database, and sending a welcome email.
Here’s how you would define this entire process using the .do SDK:
import { Agent, Workflow } from '@do-sdk/core';
// Define a workflow with multiple, declarative steps
const onboardCustomer = new Workflow({
name: 'customer.onboard',
steps: [
{ do: 'validate.email' },
{ do: 'create.user.profile' },
{ do: 'send.welcome.email' },
],
});
// Create an agent to execute the workflow
const agent = new Agent({ workflows: [onboardCustomer] });
// Execute the workflow via the agent with specific data
async function run() {
const result = await agent.execute('customer.onboard', {
email: 'new.user@example.com',
name: 'Jane Doe',
});
console.log(result);
}
Notice the simplicity. The Workflow is a declarative list of steps. Each step, like validate.email, is a modular, reusable action that you define elsewhere. The Agent is the executor, responsible for running the workflow with the provided data. This code is clean, easy to read, and version-controllable with Git.
This is where the .do platform truly shines. You've written and tested your workflow. Now what?
Once you deploy your Agent and its workflows using the SDK, the .do platform automatically exposes your workflow as a secure, scalable API endpoint.
Without any extra configuration, your customer.onboard workflow becomes a live API. You can now call this service from your frontend application, a mobile app, or any other system:
POST /api/customer.onboard
Content-Type: application/json
{
"email": "another.user@example.com",
"name": "John Smith"
}
You just transformed your business logic (Business-as-Code) into a consumable, production-grade service (Service-as-Software). No API gateways to configure, no servers to manage. It just works.
The .do SDK is built for the modern developer experience.
Q: Who is the .do SDK for?
A: It's designed for developers who want to automate complex business processes and deliver them as robust, version-controlled software. If you're comfortable with Typescript and API development, you'll feel right at home.
Q: How do I get started?
A: Getting started is simple. Just install the package from npm and start building:
npm install @do-sdk/core
Then, import the Agent and Workflow classes and define your first process. Be sure to check our official documentation for comprehensive guides and examples.
Stop letting critical business logic get lost in translation. With the .do SDK, you can build, test, and deploy complex processes as reliable and scalable APIs. Embrace the power of Business-as-Code and start turning your operations into first-class software assets.
Ready to build your first agentic workflow? Check out our documentation to get started!