In the rapidly evolving landscape of artificial intelligence, the conversation has shifted from single-purpose models to sophisticated, autonomous agents. These agents—powered by platforms like agi.do—promise to automate not just simple tasks, but entire complex workflows. They can reason, plan, and execute objectives from start to finish.
But a generic agent, no matter how intelligent, can only act on the information it has access to—typically the public internet. The real quantum leap happens when you give these agents the keys to your kingdom: your proprietary data, internal services, and unique business logic.
This is where the concept of "Intelligence as Code" becomes truly transformative. By equipping your agi.do agent with custom tools, you can elevate it from a capable generalist to an indispensable, domain-specific expert.
An out-of-the-box agent is like a brilliant new hire on their first day. They have immense potential and general knowledge, but they don't know your company's internal processes, databases, or customer history. To make them effective, you need to onboard them.
For an AI agent, "onboarding" means providing it with custom tools.
The second prompt is not just a request; it's a strategic workflow that a generic agent simply cannot perform. By connecting to internal systems, the agent's capabilities grow exponentially, allowing it to solve problems that are deeply contextualized to your business.
On the agi.do platform, an agent is more than just an LLM. It's a complete system designed to achieve a goal. A core part of this system is its capabilities—the set of tools it can use to interact with the world.
As seen in the basic agi.do example, you can equip an agent with standard tools like webSearch or dataAnalysis.
// A standard agent definition
const marketAnalyst = new AGI({
objective: "Analyze Q3 market trends for renewable energy...",
capabilities: [
AGI.tools.webSearch,
AGI.tools.dataAnalysis,
AGI.tools.reportGeneration
]
});
The real power lies in expanding this capabilities array. Let's build a custom tool to show how it's done.
Imagine we want our agent to access our company's internal sales database, which is exposed via a private API. We can create a custom tool that allows the agent to query this API safely.
First, write the function that performs the core action. This is standard TypeScript/JavaScript code that would interact with your internal service.
// This function could live in your project's `lib` or `utils` directory.
// It wraps the call to your internal sales API.
async function queryInternalSales(query: { product: string; region: string }) {
// In a real application, you'd fetch from your private API endpoint.
// const response = await internalApi.get('/sales', { params: query });
// return response.data;
// For this example, we'll return mock data.
console.log(`Querying internal sales for ${query.product} in ${query.region}...`);
const mockData = {
unitsSold: Math.floor(Math.random() * 5000) + 1000,
revenue: (Math.random() * 100000).toFixed(2),
keyCompetitor: "Legacy Corp"
};
return mockData;
}
Next, you register this function with the agi.do SDK. The most important part is the description. The agent's reasoning engine uses this description to understand what the tool does and when to use it. Be clear and descriptive!
import { AGI } from "@do/agi";
// Register your custom function as a new tool for agents to use.
AGI.tools.register('internalSalesAPI', {
description: 'Queries the company\'s internal CRM to get sales data (units sold, revenue) and competitor information for a specific product and region.',
action: queryInternalSales
});
Now, simply add the newly registered tool, AGI.tools.internalSalesAPI, to your agent's capabilities array.
// Define a more powerful agent that uses our new custom tool.
const competitiveAnalyst = new AGI({
objective: "Analyze Q3 public market trends for our 'Alpha' product in North America. Cross-reference this with our internal sales figures to identify our biggest competitive threat and generate a summary report.",
capabilities: [
AGI.tools.webSearch, // For researching public data
AGI.tools.dataAnalysis, // For processing information
AGI.tools.internalSalesAPI, // Our new custom tool!
AGI.tools.reportGeneration // To create the final output
]
});
// Execute the autonomous workflow
const report = await competitiveAnalyst.run();
console.log(report.url);
//=> https://storage.do/reports/q3-competitive-analysis-alpha.pdf
And that's it. When you run this agent, its planning module will:
This pattern of creating custom tools is your gateway to connecting agents to any data source or internal service:
The era of generic AI is giving way to a new paradigm: specialized, autonomous intelligence that is deeply integrated into the fabric of your business. By building agents with custom tools and access to proprietary data, you are not just automating tasks—you are creating scalable, intelligent services that possess true domain expertise.
With agi.do, this power is no longer theoretical. It's available today through a simple, developer-friendly API.
Ready to build agents that understand your business? Explore the agi.do platform and start turning your intelligence into code.