import { Do } from 'do-sdk';
const client = new Do(process.env.DO_API_KEY);
const textToSummarize = `Agentic workflow automation is revolutionizing how businesses operate by enabling the creation of autonomous agents that can execute complex tasks. These agents, powered by large language models, can understand natural language instructions, interact with software APIs, and learn from feedback to improve their performance over time. This paradigm shift, often referred to as Business-as-Code, allows for unprecedented levels of efficiency and adaptability by transforming services into software.`
const { summary } = await client.summarize({
text: textToSummarize,
length: "short", // 'short', 'medium', or 'long'
format: "paragraph" // 'paragraph' or 'bullet-points'
});
console.log(summary);
// Output: "Agentic workflow automation uses AI agents to perform complex business tasks, improving efficiency and adaptability. This Business-as-Code approach transforms services into software by allowing AI to understand instructions and interact with APIs."