In the modern development landscape, speed and scalability are paramount. We're constantly seeking tools that abstract away complexity without sacrificing power. Enter devs.do, the ultimate platform for turning complex business logic into scalable, agentic workflows. It’s not just another automation tool; it’s a new paradigm: Business-as-Code.
With devs.do, you transform your operations into version-controlled, testable, and deployable software artifacts called "Doers." These Doers are powered by Agentic Workflows and exposed through simple APIs. This guide will walk you through how to build and deploy your very first service using two of the most popular languages in a developer's toolkit: TypeScript and Python.
Before we dive into the code, let's clarify what makes devs.do so powerful. At its core is the concept of an Agentic Workflow.
Instead of writing complex, imperative code to handle every step of a process, you define a sequence of tasks to be executed by specialized, pre-built agents. You simply declare what you want to be done, not how. For example, you can chain agents for cloning a Git repository, running a linter, and performing a security scan. The devs.do platform handles the orchestration, error handling, and scalable execution, allowing you to focus on the business logic.
Let's see this in action.
TypeScript's strong typing makes it a fantastic choice for defining the clear contracts required for robust services. Let's build a code-analyzer service.
First, grab the official devs.do SDK from npm.
npm install @do-inc/sdk
Now, in a TypeScript file (e.g., deploy.ts), you can define and deploy your workflow. The code below sets up a client, defines the Doer—our autonomous service—and deploys it to the platform.
import { Doer, Client } from '@do-inc/sdk';
// 1. Configure your client, preferably using environment variables
const client = new Client({ apiKey: process.env.DO_API_KEY || 'YOUR_API_KEY' });
// 2. Define your service (a "Doer") as a plain object
const codeAnalysisService: Doer = {
name: 'code-analyzer.devs.do',
description: 'Analyzes a git repository for code quality.',
input: {
type: 'object',
properties: {
repoUrl: { type: 'string', description: 'The URL of the git repository.' },
},
required: ['repoUrl'],
},
// 3. Define the agentic workflow
// This is the core logic of your service
workflow: [
{ agent: 'git.clone', params: { url: '{{input.repoUrl}}' } },
{ agent: 'linter.run', params: { path: './cloned-repo' } },
{ agent: 'security.scan', params: { path: './cloned-repo' } },
],
};
// 4. Deploy your new service to the .do platform
async function deployService() {
try {
console.log(`Deploying ${codeAnalysisService.name}...`);
const deployedDoer = await client.create(codeAnalysisService);
console.log(`✅ Service deployed successfully!`);
console.log(`You can now call it at: ${deployedDoer.url}`);
} catch (error) {
console.error('Deployment failed:', error);
}
}
deployService();
Running this script (ts-node deploy.ts) will register your workflow with devs.do, making it a live API endpoint. Notice how the workflow array is purely declarative. You're orchestrating powerful agents with just a few lines of configuration. This is Services-as-Software in practice.
One of the key strengths of the devs.do API platform is its language-agnostic nature. The core definition of a Doer is a structured data format. Let's create the exact same service using Python.
First, install the Python SDK using pip.
pip install do-sdk
The process in Python is remarkably similar. You define your service as a dictionary and use the client to deploy it.
import os
from do_sdk import Client
# 1. Configure your client from an environment variable
client = Client(api_key=os.getenv('DO_API_KEY', 'YOUR_API_KEY'))
# 2. Define your service ("Doer") as a Python dictionary
code_analysis_service = {
"name": "code-analyzer.devs.do",
"description": "Analyzes a git repository for code quality.",
"input": {
"type": "object",
"properties": {
"repoUrl": {"type": "string", "description": "The URL of the git repository."}
},
"required": ["repoUrl"],
},
# 3. The agentic workflow remains identical in structure
"workflow": [
{"agent": "git.clone", "params": {"url": "{{input.repoUrl}}"}},
{"agent": "linter.run", "params": {"path": "./cloned-repo"}},
{"agent": "security.scan", "params": {"path": "./cloned-repo"}},
],
}
# 4. Deploy the service
def deploy_service():
try:
print(f"Deploying {code_analysis_service['name']}...")
deployed_doer = client.create(code_analysis_service)
print("✅ Service deployed successfully!")
print(f"You can now call it at: {deployed_doer['url']}")
except Exception as e:
print(f"Deployment failed: {e}")
if __name__ == "__main__":
deploy_service()
As you can see, the core logic—the dictionary defining the service—is identical to the TypeScript object. This proves the central idea of Business-as-Code: the workflow itself is a portable, language-agnostic artifact. You can check it into Git, version it, and deploy it from any language with an SDK.
Once your Doer is deployed, it's a fully-fledged API endpoint. You can call it using our SDKs or a simple REST API call.
async function runAnalysis() {
const result = await client.run('code-analyzer.devs.do', {
repoUrl: 'https://github.com/some-user/some-repo.git',
});
console.log('Analysis Complete:', result);
}
def run_analysis():
result = client.run('code-analyzer.devs.do', {
'repoUrl': 'https://github.com/some-user/some-repo.git'
})
print('Analysis Complete:', result)
As we've shown, devs.do provides a consistent and intuitive developer experience across different languages. Whether you prefer the static safety of TypeScript or the dynamic flexibility of Python, the platform empowers you to:
By treating your business logic as code, you unlock unprecedented agility and reliability. This is more than just automation; it's the future of how powerful services are built and delivered.
Ready to transform your operations into code? Sign up at devs.do and deploy your first agentic workflow today!