In today's fast-paced digital landscape, business logic is growing more complex. We're moving beyond simple, static API calls to dynamic, multi-step workflows that orchestrate AI models, legacy systems, and human-in-the-loop processes. The challenge? Managing this complexity. How do you turn a tangled web of operations into something as simple and reliable as a software library?
Enter services.do, the unified service registry designed for the age of AI. Our platform helps you transform your most intricate business logic into discoverable, manageable, and consumable Services-as-Software.
This guide will walk you through the entire process: defining a business workflow as code, deploying it, and consuming it as a simple, powerful API. Let's build your first agentic service.
Before we dive in, let's clarify the terminology. You're familiar with APIs, but an "Agentic Service" is a level up.
By deploying a workflow, you automatically register it as a service, ready to be discovered and integrated with a single API call.
The journey begins with code. Using the concept of Business-as-Code, you define the sequence of actions that make up your business process. Let's imagine we're creating a customer.kyc.do service that performs a "Know Your Customer" check.
The workflow might look like this:
While the actual implementation would use the .do workflow syntax, conceptually, you're building a script that orchestrates these actions. This captures your entire business process in a single, version-controlled file.
// Example: A simplified workflow definition for customer.kyc.do
import { workflow, task } from '@do-inc/workflow-sdk';
// Define external tasks or connections
const db = task.connect('internal-database');
const idVerifier = task.connect('third-party-kyc-api');
// Define the workflow
export default workflow('customer.kyc.do', async ({ userId }) => {
// Step 1: Fetch user
const user = await db.fetchUser({ id: userId });
// Step 2: Call verification service
const verificationResult = await idVerifier.verify({
name: user.name,
documentId: user.documentId
});
// Step 3: Analyze and update
const newStatus = verificationResult.success ? 'verified' : 'requires_review';
await db.updateUserStatus({ id: userId, status: newStatus });
return { userId, kycStatus: newStatus };
});
Once your workflow is defined, you deploy it to the .do platform. This is the moment of transformation. The code you wrote is compiled, secured, and, most importantly, registered as a new endpoint in services.do.
# Deploying the workflow from your terminal
do deploy ./workflows/customer.kyc.do.ts
That's it. Your complex, multi-step workflow is now a standardized, scalable service. It's automatically discoverable, versioned, and ready for consumption.
How do you know it worked? You can query the central Service Registry. The services.do platform acts as the single source of truth for all available agentic services your organization has deployed.
Using our SDK, you can programmatically list all available services you have access to.
<center>Your application can dynamically discover services through the registry.</center>
Let's use the SDK to see our newly created service.
import { Do } from '@do-inc/sdk';
// Initialize the .do client with your API key
const बिंदु = new Do(process.env.DO_API_KEY);
// List all available services in the registry
const services = await बिंदु.services.list();
console.log(services.data);
// Expected output would now include our new service:
// [
// { "id": "svc_123", "name": "geocode.do", "description": "...", ... },
// { "id": "svc_789", "name": "customer.kyc.do", "description": "...", ... }
// ]
As you can see, customer.kyc.do is now listed alongside other services, ready to be integrated into any application. This is the power of a unified API Management layer for business processes.
Discovery is great, but consumption is where the value is unlocked. Any application, from a frontend UI to a backend microservice, can now execute this entire KYC workflow with a single, simple API call.
import { Do } from '@do-inc/sdk';
const बिंदु = new Do(process.env.DO_API_KEY);
async function runKycCheck(userId: string) {
try {
console.log(`Starting KYC check for user: ${userId}`);
// Run the entire workflow with one line of code
const result = await बिंदु.services.run('customer.kyc.do', { userId });
console.log('KYC workflow completed!');
console.log(result);
// { "userId": "...", "kycStatus": "verified" }
} catch (error) {
console.error('KYC workflow failed:', error);
}
}
// Trigger the workflow for a new user
runKycCheck('user_abc_123');
With that one bindu.services.run() call, you've triggered a potentially complex, asynchronous, and robust business process. You've abstracted away all the underlying complexity, creating a clean, composable building block for your developers.
You've just seen how to turn a complex idea into a simple, manageable, and consumable API. By embracing Services-as-Software, you empower your teams to build faster, scale more reliably, and maintain a clear overview of all the critical processes that run your business.
Discover. Integrate. Scale. This isn't just a tagline; it's the new reality for enterprise development.
Ready to deploy your first agentic service? Explore the services.do platform today and start turning your business logic into your biggest asset.