The conversation around AI is shifting. We're moving beyond simple chatbots and into the realm of true autonomous agents—AI-powered programs that can reason, plan, and execute complex tasks independently. For developers, this represents a new frontier: the ability to build and deploy an entire digital workforce. But how do you go from concept to a functioning AI employee?
Enter Agents.do, the enterprise-grade platform designed for building and orchestrating this new AI-powered workforce. In this guide, we'll walk you through the fundamentals of agentic workflows and show you how to build your very first digital worker using the developer-first toolkit from Agents.do.
Before we dive into the code, let's clarify what we're building. An autonomous agent, or digital worker, is an AI-powered software program designed to understand objectives, perform complex tasks, make decisions, and operate independently to achieve specific business goals.
Think of it not as a script that follows a rigid path, but as a digital teammate you can delegate objectives to. You define the what and the why; the agent, orchestrated by the Agents.do platform, handles the how.
The best way to understand the power of Agents.do is to build an agent. Let's create "Amy," a customer support agent whose objective is to handle customer inquiries and resolve common issues.
With Agents.do, you can define an entire agent using a simple, declarative structure. This is "Business-as-Code" in action.
Here is the complete definition for Amy:
import { Agent } from 'agents.do'
// Create a customer support agent
const customerSupportAgent = Agent({
name: 'Amy',
role: 'Customer Support Agent',
objective: 'Handles customer inquiries and resolves common issues',
keyResults: ['responseTime', 'resolutionTime', 'escalationRate', 'customerSatisfaction'],
url: 'https://amy.do',
integrations: ['chat', 'slack', 'email', 'zendesk', 'shopify'],
triggers: ['onTicketCreated', 'onMessageReceived'],
searches: ['FAQs', 'Tickets', 'Orders', 'Products', 'Customers'],
actions: ['sendMessage', 'updateOrder', 'refundOrder', 'resolveTicket', 'escalateTicket'],
})
This compact block of code defines a powerful agent capable of significant business automation. Let’s break it down parameter by parameter.
name: 'Amy',
role: 'Customer Support Agent',
objective: 'Handles customer inquiries and resolves common issues',
This is the agent's core identity.
keyResults: ['responseTime', 'resolutionTime', 'escalationRate', 'customerSatisfaction'],
How do you know if your digital worker is performing well? The keyResults array connects the agent's performance to concrete business metrics. The Agents.do platform can track these KPIs, giving you a clear view of your agent's effectiveness and ROI.
integrations: ['chat', 'slack', 'email', 'zendesk', 'shopify'],
searches: ['FAQs', 'Tickets', 'Orders', 'Products', 'Customers'],
An agent is only as good as the tools and information it can access.
triggers: ['onTicketCreated', 'onMessageReceived'],
actions: ['sendMessage', 'updateOrder', 'refundOrder', 'resolveTicket', 'escalateTicket'],
This is where the agent becomes truly autonomous.
Building one agent is powerful, but the true potential of AI agents is realized when they collaborate. A core feature of the Agents.do platform is enabling agent-to-agent collaboration.
Imagine a customer messages Amy asking, "Where is my order, and can you change the shipping address?"
This is a true agentic workflow. You can build teams of specialized agents that delegate tasks and share information to accomplish complex, multi-step business processes, all orchestrated by the Agents.do platform.
Agents.do empowers developers to treat business processes like software. By using simple SDKs and APIs, you can define, deploy, manage, and scale a reliable workforce of autonomous agents that deliver valuable Services-as-Software.
You are no longer just writing code; you are architecting an autonomous workforce.
Ready to orchestrate your first team of digital workers?