(For Developers)
In today's fast-paced digital landscape, integrating intelligent automation and AI capabilities into your applications is no longer a luxury – it's a necessity. The .do platform offers a powerful solution with its innovative Agentic Workflows, allowing you to automate complex tasks, integrate AI models, and deliver services-as-software with unprecedented ease.
But how do you harness this power within your existing applications? Enter the .do SDK.
The @dot-do/sdk is your gateway to seamlessly embedding .do Agentic Workflows directly into your software. It simplifies the integration process, allowing you to focus on building rather than grappling with complex API calls.
The .do SDK empowers developers to integrate agentic workflows into their applications seamlessly. Imagine easily automating text summarization, content generation, data processing, or interacting with a myriad of AI services – all through simple API calls wrapped in an intuitive SDK.
import { Agent } from "@dot-do/sdk";
const agent = new Agent("your-api-key");
async function summarizeText(text: string) {
const response = await agent.do("summarize", { text });
console.log(response.data);
}
summarizeText("Your long text here...");
This simple TypeScript example demonstrates how effortlessly you can leverage a "summarize" workflow from your application. The Agent class handles the heavy lifting, connecting to the .do platform and executing your chosen workflow.
While the .do SDK is designed for simplicity, following best practices can significantly enhance your integration experience, improve application performance, and ensure scalability.
Your API key is the credential that authenticates your application with the .do platform. Treat it like a password.
Agentic workflows often involve network requests and computational tasks, making them inherently asynchronous.
try {
const response = await agent.do("summarize", { text });
// Process successful response
} catch (error) {
console.error("Error summarizing text:", error);
// Handle error, e.g., show a user-friendly message
}
If your application frequently calls the same .do workflow with identical inputs and the output is relatively static, consider implementing caching.
Visibility into how your application interacts with .do workflows is crucial for debugging, performance optimization, and understanding usage patterns.
While .do workflows can handle substantial data, efficiency is key.
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.
You can install the SDK using popular package managers like npm or yarn:
npm install @dot-do/sdk or yarn add @dot-do/sdk
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.
Yes, the SDK is designed to be used in both backend (Node.js) and frontend (browser) environments.
The .do SDK (sdk.do) opens up a world of possibilities for integrating sophisticated agentic workflows and AI capabilities into your applications with remarkable ease. By adhering to these best practices, you can ensure a robust, efficient, and scalable integration, empowering your applications to do more, smarter. Start building today and unlock the full potential of .do Agentic Workflows!