In today's fast-paced development world, the pressure is on to build smarter, more efficient applications. Automating simple, repetitive tasks is one thing, but what about complex, multi-step business processes? Things like analyzing user feedback, generating market research reports, or summarizing legal documents often require human-level cognition. Until now.
Meet Lexi, your autonomous AI digital worker from lexi.do. Lexi is designed to execute these complex business workflows autonomously, turning intricate processes into simple, on-demand services you can call with an API.
This developer's guide will walk you through hiring Lexi and putting her to work. Follow our step-by-step tutorial using the .do SDK to integrate powerful Agentic Workflow capabilities directly into your existing applications—all in about 10 minutes.
Think of Lexi not just as a tool, but as a hireable team member. Lexi is an advanced Autonomous Worker available on the .do platform. She is designed to understand high-level goals, break them down into steps, use tools, and execute tasks to completion.
Instead of chaining together multiple API calls to different services (LLM, search, data analysis), you can simply assign a task to your Digital Worker in natural language. Lexi handles the rest, delivering a structured result. This is Business Automation evolved.
Let's get our hands dirty and integrate Lexi into a simple Node.js application.
First, create a new directory for your project and initialize a package.json file.
mkdir lexi-integration
cd lexi-integration
npm init -y
Now, install the .do SDK. This package gives you everything you need to communicate with the platform.
npm install @do-inc/sdk
Create a file named index.js and open it in your editor. We'll use the code example below to hire Lexi and assign her a task.
For security, we'll store our API key in an environment variable. Create a file named .env and add your key:
DO_API_KEY="your_api_key_here"
(Don't forget to add .env to your .gitignore file!)
Now, add the following code to index.js:
// Ensure you have a way to load environment variables, like using 'dotenv' package
require('dotenv').config();
import { Do } from '@do-inc/sdk';
async function main() {
// Initialize the platform client with your secret API key
const secret = new Do(process.env.DO_API_KEY);
// Hire Lexi, the autonomous digital worker
const lexi = secret.agent('lexi');
console.log("Assigning task to Lexi...");
// Assign a task to Lexi with a specific goal and necessary files
const result = await lexi.run({
task: "Analyze the attached user feedback logs, categorize them by sentiment (Positive, Negative, Neutral), identify key themes, and generate a summary report in markdown format.",
attachments: ["user-feedback-Q3.csv"]
});
// Get the structured output from Lexi
console.log("Task complete! Here is the result:");
console.log(result);
// Example of accessing a specific part of the result
// The actual structure of `result` will depend on the task.
if (result.reportUrl) {
console.log(`\nView the generated report here: ${result.reportUrl}`);
}
}
main().catch(console.error);
Make sure you have a sample user-feedback-Q3.csv file in your project directory. Then, run the script from your terminal:
node index.js
You'll see a confirmation that the task has been assigned, and after a short wait while Lexi works, the resulting JSON object will be printed to your console.
This was a simple example, but the possibilities are vast. Because Lexi is an Agentic Workflow powerhouse, you can assign her a wide range of knowledge-based tasks:
Best of all, Lexi is designed for integration. She can be configured to securely access your cloud applications, databases, and internal APIs, allowing her to work with your existing toolset seamlessly.
We know that giving an AI access to your data requires trust. Security is a core principle of the .do platform. All data processed by Lexi is handled within a secure, isolated environment, ensuring your sensitive company information remains confidential and protected at all times.
You've just seen how easy it is to integrate a powerful, autonomous AI Agent into your application. By turning complex services into software you can call via an API, Lexi empowers you to build next-generation applications faster than ever.
Ready to automate more than just tasks?
Visit lexi.do to get your API key and explore the full capabilities of your new digital worker.