Empower your applications by seamlessly connecting with the .do platform and leveraging its agentic workflow capabilities through our powerful Software Development Kit.
The .do platform is designed to help you build custom solutions, automate workflows, and connect your services with ease. At the heart of this transformative capability is the .do SDK (Software Development Kit). This SDK serves as your key to unlocking the platform's full potential, allowing you to programmatically interact with its core services and integrate your applications seamlessly.
This blog post acts as a quick reference, a "cheat sheet," for developers looking to get started or needing a quick reminder of the basics when working with the .do SDK.
The .do SDK is your toolkit for integrating and extending .do platform capabilities. It provides a simplified and structured way to interact with the platform's APIs, enabling you to:
Think of the SDK as a convenient wrapper around the .do platform's API, making it easier to write code and manage interactions without having to deal directly with low-level HTTP requests.
Getting started with the .do SDK is straightforward. You can install it using standard Node.js package managers like npm or yarn.
npm install @do/sdk
or
yarn add @do/sdk
Once installed, you can import the SDK into your project.
import { DoSDK } from '@do/sdk';
To interact with the .do platform, you'll need to initialize the SDK with your API key. This key authenticates your requests and ensures you have the necessary permissions.
const sdk = new DoSDK({
apiKey: 'YOUR_API_KEY', // Replace with your actual API key
});
Note: Always store your API key securely and avoid exposing it in client-side code.
Here are some quick examples of common operations you can perform using the .do SDK.
Agents are the building blocks of agentic workflows on the .do platform. You can retrieve a list of available agents using the SDK.
async function listAgents() {
try {
const agents = await sdk.agents.list();
console.log('Available Agents:', agents);
} catch (error) {
console.error('Error listing agents:', error);
}
}
listAgents();
The real power of the .do platform lies in its agentic workflows. You can trigger and manage these workflows programmatically. (Specific methods and parameters will depend on your workflow configuration).
async function executeWorkflow() {
try {
// Example: Execute a workflow with specific parameters
const result = await sdk.workflows.execute('workflow-id', {
input: {
// Your workflow input data
},
});
console.log('Workflow Execution Result:', result);
} catch (error) {
console.error('Error executing workflow:', error);
}
}
// Replace 'workflow-id' with the actual ID of your workflow
// executeWorkflow();
The .do platform allows you to expose "services as software." The SDK lets you interact with these services. (Specific methods will depend on the service you are interacting with).
async function callService() {
try {
// Example: Call a specific service endpoint
const serviceResponse = await sdk.services.call('service-name', 'endpoint-name', {
// Request payload for the service endpoint
});
console.log('Service Response:', serviceResponse);
} catch (error) {
console.error('Error calling service:', error);
}
}
// Replace 'service-name' and 'endpoint-name' with your service details
// callService();
The .do SDK is designed to make development as easy as possible. With clear method names, intuitive object structures, and comprehensive documentation on our developer portal, you can quickly integrate the .do platform into your applications.
The .do SDK is a powerful tool for developers looking to leverage the full capabilities of the .do platform. By providing a simple and structured way to interact with the platform's APIs, the SDK empowers you to build custom solutions, automate workflows, and connect your services with ease. This cheat sheet provides a quick reference to help you get started. For more detailed information and advanced use cases, be sure to consult our comprehensive developer documentation. Start building with the .do SDK today and unlock the potential of agentic AI and business as code!