The promise of artificial intelligence has always been more than just generating text or answering questions. We've imagined AI that can think, reason, and, most importantly, act as an autonomous partner. What if you could deploy an AI agent that operates like an entire business unit, delivered through a single API call?
Welcome to the next leap in AI implementation. With agi.do, Autonomous General Intelligence (AGI) agents are no longer science fiction. They are powerful, accessible tools you can integrate into your applications today. These agents go beyond simple automation to achieve true orchestration, autonomously executing complex, multi-step tasks.
This guide will walk you through building your very first AGI agent using the simple and elegant .do SDK.
Before we dive into the code, it's crucial to understand the paradigm shift. Unlike models like GPT, which excel at generating content based on a prompt, an AGI Agent on the .do platform is an autonomous problem-solver.
Think of it this way:
This is the power of an Agentic Workflow: the ability to understand ambiguous goals, reason through problems, and orchestrate various services to achieve an outcome. You are essentially turning complex business logic into Business-as-Code.
Let's get hands-on. We'll build an AGI agent named MarketStrategyAI. Its objective is to analyze sales and web traffic data to create a strategic growth plan for the next quarter.
First, ensure you have the .do SDK integrated into your project. For a Node.js environment, this would typically be:
npm install @do/agi
Now, let's write the code.
Everything starts by importing the core component from the SDK. This class is your gateway to the .do platform's AGI capabilities.
import { AGIAgent } from '@do/agi';
Next, we'll instantiate our agent. This is where you define its identity and, critically, grant it access to the tools it needs to do its job.
// Initialize the AGI with access to relevant business tools
const strategyAgent = new AGIAgent({
name: 'MarketStrategyAI',
description: 'An AGI to analyze market data and formulate growth strategies.',
tools: ['SalesforceReader', 'GoogleAnalytics', 'MarketReportGenerator']
});
Let's break this down:
Here is where agi.do truly shines. You don't need to provide a sequence of precise instructions. Instead, you define a broad, ambitious goal, just as you would with a human strategist.
// Define a complex, high-level objective
const objective = `
Analyze our Q4 sales performance using Salesforce data and
correlate findings with website traffic from Google Analytics.
Generate a comprehensive strategic growth plan for the next quarter,
including three key initiatives with projected KPIs.
`;
Notice the complexity. This objective requires data correlation from multiple sources, analysis, and creative strategic thinking to produce a structured output.
With the agent configured and the objective set, a single command sets the entire workflow in motion.
// Run the agent to achieve the objective
const strategicPlan = await strategyAgent.run({ objective });
console.log(strategicPlan);
When you call .run(), you are not just querying a model. You are unleashing an autonomous agent to perform a sequence of actions:
The output in your console will be the comprehensive plan you asked for, all achieved with a single API call that encapsulated a workflow that would have previously required significant human coordination and effort.
You've just witnessed the future of Services-as-Software. Instead of stitching together dozens of API calls and writing complex business logic, you defined what you wanted, and the AGI agent handled the how.
This opens up a world of possibilities for tasks that were once too dynamic or complex to automate:
Ready to empower your applications with autonomous intelligence? Visit agi.do to explore the documentation and start building agents that don't just respond—they reason, act, and achieve.