In the world of software development, your most valuable asset is your focus. Yet, how much of your day is spent on tasks that aren't coding? Generating reports, summarizing meeting notes, triaging support tickets, wrangling data—these repetitive but necessary chores fragment your attention and slow down your real work.
What if you could delegate those tasks just as you would to a junior team member?
Meet Ivy, your autonomous digital worker. Powered by the .do platform, Ivy isn't just another API or automation tool. She is a proactive AI teammate you can command directly from your code. This guide will show you how to master the .do SDK and turn complex business processes into a single line of code.
You've worked with APIs and you've probably seen chatbots. Ivy is a fundamental shift from both.
This is the principle of Business-as-Code. By using the .do SDK, you are programmatically directing a digital worker to execute complex business logic, allowing you to version, scale, and automate workflows that were previously manual.
Ready to delegate? Let's get Ivy working for you in three simple steps.
First, add the .do SDK to your project using your preferred package manager.
npm install @do/sdk
In your application file, import the Agent class and initialize Ivy. It's as simple as creating a new object.
import { Agent } from '@do/sdk';
// Initialize the Ivy agent
const ivy = new Agent('ivy');
Now for the magic. Use the ivy.do() method to assign a task. This method takes a high-level objective described in natural language and a context object containing any necessary data or resources.
Let's use the example from the ivy.do homepage. We'll ask Ivy to summarize a meeting transcript and draft a follow-up email.
import { Agent } from '@do/sdk';
// Initialize the Ivy agent
const ivy = new Agent('ivy');
// Assign a task to Ivy
const { result } = await ivy.do({
task: 'Summarize the attached meeting transcript and draft a follow-up email to the attendees.',
context: {
transcript: 'file://./meeting_notes.txt',
attendees: ['[email protected]', '[email protected]']
}
});
// Ivy returns a structured result
console.log(result.emailDraft);
Let's break that down:
That's it. You've just delegated a multi-step cognitive task to an autonomous AI agent.
The true power of Ivy is unlocked when you integrate her into your existing applications to automate entire workflows.
Imagine a cron job that runs every Monday morning. Instead of a complex script for data processing and visualization, you simply command Ivy.
// report_generator.ts
import { Agent } from '@do/sdk';
const ivy = new Agent('ivy');
async function generateWeeklyReport() {
console.log('Asking Ivy to generate the weekly sales report...');
const { result } = await ivy.do({
task: 'Analyze the attached sales data CSV. Identify the top 5 performing products, calculate week-over-week revenue growth, and generate a 1-page PDF summary. Email the final PDF to the sales leadership team.',
context: {
salesData: 'file://./data/latest_sales.csv',
salesLeadership: ['[email protected]', '[email protected]']
}
});
console.log(`Report generation complete. Task ID: ${result.taskId}`);
}
generateWeeklyReport();
Integrate Ivy with your helpdesk webhook. When a new high-priority ticket arrives, Ivy can handle the initial analysis and communication.
// triggered on new support ticket via API
import { Agent } from '@do/sdk';
const ivy = new Agent('ivy');
export async function handleNewTicket(ticket) {
const { result } = await ivy.do({
task: 'Analyze this support ticket. If it mentions "critical outage" or "system down", immediately escalate it to the on-call engineer and draft a high-priority holding email to the customer acknowledging the urgency. Otherwise, categorize its topic and draft a standard first-reply.',
context: {
ticketDetails: ticket,
onCallEngineer: '[email protected]'
}
});
if (result.escalated) {
// Logic to page the on-call engineer using result.escalationMessage
} else {
// Logic to post result.emailDraft back to the helpdesk
}
}
By integrating Ivy into your stack, you're not just adding a tool—you're adding a teammate. The .do SDK is your direct line to an autonomous digital worker ready to take on the repetitive, time-consuming tasks that stand between you and your next great feature.
Stop wrestling with tedious chores. Delegate to Ivy, and get back to building what matters most.
Ready to build your AI-powered team? Visit ivy.do to get your API key and start delegating today!