In today's fast-paced development landscape, integrating intelligent functionalities and automating complex tasks is key to building truly innovative applications. Manually building and managing these features can be time-consuming and resource-intensive. That's where the power of Agentic Workflows comes in, and the .do SDK provides you with the seamless gateway to harness this power directly within your applications.
The .do SDK (Software Development Kit) is your developer-friendly toolkit for unlocking the capabilities of .do Agentic Workflows. It empowers you to easily incorporate AI-powered automation, integrate diverse services, and deliver sophisticated services-as-software to your users, all through simple API calls.
Before diving into the SDK, let's quickly touch on Agentic Workflows. These are intelligent, self-contained modules that can perform specific tasks, often leveraging AI, external services, or a combination of both. Think of them as digital assistants you can call upon to handle anything from summarizing text and generating content to processing data and interacting with other systems.
The @dot-do/sdk is specifically designed to make interacting with these powerful .do Agentic Workflows incredibly straightforward. It abstracts away the complexities of API communication, authentication, and response handling, allowing you to focus on integrating the workflow's functionality into your application's logic.
Installation is quick and easy using popular package managers:
npm install @dot-do/sdk
# or
yarn add @dot-do/sdk
Once installed, you can start interacting with .do workflows using the Agent class:
import { Agent } from "@dot-do/sdk";
const agent = new Agent("your-api-key"); // Replace with your actual API key
async function summarizeText(text: string) {
try {
const response = await agent.do("summarize", { text }); // Call the 'summarize' workflow
console.log("Summarized Text:", response.data);
} catch (error) {
console.error("Error summarizing text:", error);
}
}
// Example Usage
summarizeText("This is a very long and detailed text that we want to get a concise summary of using the .do 'summarize' workflow. The SDK makes this process incredibly simple and efficient for developers.");
This simple example demonstrates how to instantiate an Agent and call a hypothetical summarize workflow, passing the text you want to summarize as a parameter. The SDK handles the communication and returns the processed data.
The versatility of the @dot-do/sdk extends to both backend and frontend development environments:
What is the @dot-do/sdk?
The @dot-do/sdk is a Software Development Kit that allows you to easily integrate and interact with .do Agentic Workflows directly within your applications using simple APIs and SDKs.
How do I install the SDK?
You can install the SDK using popular package managers like npm or yarn:
npm install @dot-do/sdk or yarn add @dot-do/sdk
How do I use the SDK to interact with .do workflows?
The core of the SDK is the Agent class, which allows you to call .do workflows by name and pass in necessary parameters. The SDK handles the communication and returns the results from the workflow.
Can I use the SDK in both backend and frontend applications?
Yes, the SDK is designed to be used in both backend (Node.js) and frontend (browser) environments.
The .do SDK on sdk.do is an essential tool for developers looking to build smarter, more efficient, and feature-rich applications. By providing a simple and powerful way to integrate .do Agentic Workflows, the SDK empowers you to leverage AI, automate tasks, and deliver innovative services with minimal effort.
Start exploring the possibilities and see how the .do SDK can help you unlock the next level of application development!