Serverless functions have transformed how we build applications. The ability to deploy small, isolated snippets of code without managing servers gave us unprecedented scalability and cost-efficiency. For simple, discrete tasks—resizing an image, sending a notification—they are a perfect fit.
But what happens when your business logic isn't one simple task? What happens when it's a multi-step process like onboarding a new customer, processing an insurance claim, or fulfilling a complex order?
Suddenly, you find yourself in "function chaining hell." You're manually orchestrating a dozen different serverless functions, wrestling with state management between them, and struggling to trace a single transaction through a web of logs. The initial simplicity of serverless gives way to a fragile, hard-to-maintain system.
There has to be a better way. The future of business logic lies not in scattered functions, but in a higher-level abstraction: workflows.
Chaining functions to model a business process introduces several critical challenges:
These problems arise because a serverless function is the wrong unit of abstraction for a business process. We need a tool that lets us define the entire process as a single, cohesive unit.
The paradigm shift is to think of your core business processes as first-class citizens in your codebase. This is the essence of Business-as-Code: defining, versioning, testing, and deploying your business logic with the same rigor you apply to your application code.
This is where agentic workflows come in. An agentic workflow is a declarative set of steps executed by an intelligent agent. Instead of telling your code how to chain functions together, you simply declare what steps make up the process.
And the best way to build them is with the sdk.do Developer SDK for Agentic Workflows.
The .do SDK is a Typescript library designed to be the fastest way to turn complex business processes into simple, powerful Services-as-Software. It provides developers with two core primitives: Workflows and Agents.
Let's look at how you would model the customer onboarding process. Instead of wiring up multiple functions, you define a single, readable Workflow:
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' },
],
});
// Create an agent to execute the workflow
const agent = new Agent({ workflows: [onboardCustomer] });
// Execute the workflow via the agent
async function run() {
const result = await agent.execute('customer.onboard', {
email: 'new.user@example.com',
name: 'Jane Doe',
});
console.log(result);
}
Look at the clarity of that Workflow definition. The business process is laid out plain as day. There's no orchestration logic, no manual state passing—just a clean declaration of intent. The Agent is the smart executor that handles the rest.
Adopting an agentic workflow model with the .do SDK offers developers a massive strategic advantage.
If you know Typescript, you're ready to go. The SDK is designed for developers. You define your logic declaratively, focusing on the what, not the how. The .do platform handles the underlying orchestration, state management, and error handling.
One of the biggest headaches with chained serverless functions is testing. The .do SDK solves this by providing a comprehensive local testing environment and mocking utilities. You can develop and debug your entire workflow on your local machine before ever deploying a single line of code.
This is where the magic happens. Once your workflow is defined and tested, you deploy it with the SDK. The .do platform instantly and automatically exposes your version-controlled workflow as a secure, scalable API endpoint.
You get a production-ready API without configuring API gateways, load balancers, or complex server infrastructure.
Ready to move beyond serverless functions and start building robust, scalable business logic? You can start building your first agentic workflow in minutes.
For comprehensive guides and API references, check out the official sdk.do documentation.
The era of gluing functions together is over. The future of API development and business automation is about clear, maintainable, and powerful abstractions. Agentic workflows provide that future, and the .do SDK is the tool that lets you build it today.