(For Developers)
In today's rapidly evolving digital world, building intelligent, automated, and responsive applications is no longer a luxury – it's a necessity. Imagine seamlessly integrating complex AI capabilities, automating repetitive tasks, and delivering sophisticated services-as-software, all with a few lines of code. This is precisely what the .do SDK empowers you to do.
sdk.do isn't just another library; it's your gateway to unlocking the full power of .do Agentic Workflows directly within your applications.
Before diving into the SDK, let's briefly touch upon Agentic Workflows. In essence, these are intelligent, autonomous processes designed to perform specific tasks, often leveraging AI, external services, and internal logic. Think of them as highly capable digital agents ready to execute your commands and deliver results.
The .do SDK simplifies the integration of these powerful workflows, making complex interactions as straightforward as simple API calls. Here’s why it’s a game-changer for developers:
The @dot-do/sdk is incredibly easy to install and use. Let's walk through a simple example.
Installation:
You can install the SDK using popular package managers like npm or yarn:
npm install @dot-do/sdk
or
yarn add @dot-do/sdk
A Practical Example: Summarizing Text
Let's say you have a .do agentic workflow named "summarize" that takes a piece of text and returns its summary. Here's how effortlessly you can interact with it using the SDK:
import { Agent } from "@dot-do/sdk";
const agent = new Agent("your-api-key"); // Replace with your actual API key
async function summarizeText(text: string) {
const response = await agent.do("summarize", { text });
console.log(response.data); // Output: The summarized text
}
summarizeText("Your long text here...");
In this snippet, we:
It's that simple! The SDK handles all the underlying communication, authentication, and data marshaling, allowing you to focus on building your application's core logic.
Q: What is the @dot-do/sdk?
A: 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.
Q: How do I install the SDK?
A: You can install the SDK using popular package managers like npm or yarn:
npm install @dot-do/sdk or yarn add @dot-do/sdk
Q: How do I use the SDK to interact with .do workflows?
A: 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.
Q: Can I use the SDK in both backend and frontend applications?
A: Yes, the SDK is designed to be used in both backend (Node.js) and frontend (browser) environments.
The .do SDK opens up a world of possibilities for developers. Whether you're building a sophisticated backend service, an interactive web application, or a robust data processing pipeline, the SDK provides the tools you need to integrate powerful agentic workflows with ease. Start building smarter, faster, and more intelligently today with sdk.do.