In the rapidly evolving landscape of intelligent automation, the ability to define, reuse, and orchestrate atomic units of business logic is paramount. Enter function.do – the foundational building block on the .do platform that empowers you to create robust, agentic workflows.
At its core, a function.do is an Atomic Business Logic unit. Think of it as a single, self-contained piece of business functionality. Whether it's processing an order, generating a report, or interacting with an external API, function.do allows you to encapsulate this logic cleanly and composably.
Agentic workflows, by nature, are designed to be intelligent, adaptive, and autonomous. For an agent to perform complex tasks, it needs access to well-defined, reliable actions. This is precisely where function.do shines:
Defining a function.do is straightforward, leveraging familiar programming languages like TypeScript or JavaScript. Here's a glimpse of how easily you can define a service creation function:
In this example, createService is a function.do. It takes specific inputs (name, description), executes encapsulated logic (generating an ID, creating a service object), and returns a result. This atomic unit can then be called by an agent whenever there's a need to provision a new service, becoming a building block within a broader service management workflow.
Q: What is a function.do ?
A: A function.do represents a single, atomic unit of business logic within the .do platform. It's a core building block for creating more complex agents and services.
Q: How do I define a function.do?
A: You define function.do using standard programming languages like TypeScript or Javascript, leveraging the .do SDK to encapsulate specific business logic.
Q: Can function.do be combined?
A: Yes, multiple function.do can be composed and chained together using the .do platform's orchestration capabilities to create comprehensive Agentic Workflows.
Q: Where are function.do executed?
A: function.do are deployed and managed within the .do platform, making them easily discoverable, executable, and scalable.
By embracing function.do, you're not just writing code; you're building a library of reusable, intelligent actions that your agents can leverage. This paradigm shift, where business logic is treated as atomic, composable units, is a cornerstone of true intelligent automation on the .do platform. Start defining your function.do today and empower your agents to do more.
Discover function.do and begin building your atomic, composable functions for agentic workflows.
export const createService = agent(async (input: { name: string, description?: string }) => {
// Logic to create a new service
const newService = {
id: generateId(),
name: input.name,
description: input.description || '',
createdAt: new Date()
};
console.log(`Created service: ${newService.name}`);
return newService;
});