Connect Demandbase to AI Agents: Manage Bulk Export & Import Jobs
Give your AI agent Demandbase tools.
Connect Demandbase to AI Agents using Truto's /tools endpoint. Expose ABM endpoints as secure JSON schemas to LLMs to automate bulk jobs, intent searches, and lead enrichment workflows.
In this guide
- 01Connect a Demandbase account
- 02Fetch Demandbase Tools
- 03Bind Tools to the LLM Framework
- 04Implement Rate Limit Handling
- 05Execute Multi-Step Workflows
The guide
Learn how to connect Demandbase to AI Agents using Truto's /tools endpoint. Build autonomous ABM workflows, handle async bulk jobs, and manage rate limits.
You want to connect Demandbase to AI Agents so your internal systems can autonomously trigger bulk data exports, enrich lead contacts, retrieve real-time company intent signals, and orchestrate complex Account-Based Marketing (ABM) workflows. Here is exactly how to do it using Truto's /tools endpoint and SDK, bypassing the need to maintain a custom Demandbase integration from scratch.
Giving a Large Language Model (LLM) read and write access to your core ABM platform is a high-stakes engineering challenge. You either spend months building, deploying, and maintaining a custom API connector, or you utilize a managed infrastructure layer that provides agent-ready schemas out of the box. If your team uses ChatGPT, check out our guide on connecting Demandbase to ChatGPT, or if you are building on Anthropic's models, read our guide on connecting Demandbase to Claude. For developers building custom autonomous workflows, you need a programmatic way to fetch these tools and bind them natively to your agent framework.
This guide details exactly how to fetch AI-ready tools for Demandbase, bind them to an LLM using frameworks like LangChain, LangGraph, CrewAI, or the Vercel AI SDK, and execute autonomous marketing and revenue operations workflows. For a deeper look at the architecture behind this approach, refer to our research on architecting AI agents and the SaaS integration bottleneck.
Why a Unified Tool Layer Matters for Agent Safety
Before writing integration code for your AI agent, you must decide what layer the agent will interact with. This architectural choice determines the reliability and safety of your production system.
Direct API tools - mapping one tool directly to a raw Demandbase endpoint - seem straightforward, but they push provider-specific quirks directly into the LLM's context window. The model has to remember exactly how Demandbase formats dates, how it expects nested JSON arrays for keyword filters, and how it paginates results. Every one of those vendor-specific quirks is a hallucination waiting to happen.
Instead, Truto abstracts this complexity. Every integration on Truto maps underlying product APIs into a REST-based CRUD API using standard Resources and Methods. These Methods (List, Get, Create, Update, Delete, or custom operations) act as Proxy APIs. Truto handles the pagination, authentication, and query parameter processing, returning data in a predefined, stable format.
We then surface descriptions and schemas for all these Methods via the /integrated-account/:id/tools endpoint, creating native Tools that your LLM framework can digest instantly.
This architecture gives you three concrete safety wins:
- Deterministic input validation: Every tool has a strict JSON schema. Invalid arguments generated by the LLM are rejected before they ever hit the Demandbase API.
- Reduced hallucination surface: The LLM only sees stable, normalized function names and schemas. It never has to invent raw HTTP payloads.
- Real-time schema updates: Tool definitions update automatically as soon as changes are made in the Truto integration UI, ensuring your agent never uses stale schemas.
The Engineering Reality of the Demandbase API
Connecting an LLM to external data sounds simple in a prototype context. You write a fetch request, wrap it in a function, and hand it to the model. But when connecting to enterprise systems like Demandbase, this naive approach collapses.
Demandbase is an enterprise-grade ABM platform designed to handle millions of data points across companies, contacts, intent signals, and historical activities. If you hardcode these interactions into your agent, you will spend all your development cycles writing defensive state-management code.
The Asynchronous Bulk Job Trap
Standard LLMs are trained to expect synchronous, immediate responses. When an agent wants to extract a list of 10,000 target companies, it naturally attempts to call a search endpoint and wait for the response.
Demandbase's API enforces asynchronous processing for large data volumes via its Bulk Jobs API. If your agent requests a massive dataset synchronously, the request will fail or time out. Your system must be taught the asynchronous polling pattern: submit the job, capture the returned jobId, and repeatedly query the Job Status endpoint until the state registers as complete, at which point the system must parse a signed resultsUrl to download the CSV payload. Truto's tools expose these specific job-creation and job-polling endpoints cleanly so your agent can loop through this state machine.
Intent Filter Complexity
The company intent search API in Demandbase is incredibly powerful but strictly typed. To retrieve intent signals, you cannot just pass a loose string like "who is looking for security software?" The API requires at least one of companyIds, keywordSetIds, or keywords, paired with strict startDate and endDate parameters. Requests that include only a date range will return a 400-218 error. Furthermore, multiple filters are combined using strict AND logic. Your agent must understand these constraints, which is exactly why providing a rigid, pre-defined JSON schema via Truto's tools is mandatory to prevent the LLM from generating invalid filter states.
Rate Limiting and Backoff
AI agents are notoriously aggressive. An agent traversing a list of 500 contacts to enrich their profiles will likely trigger Demandbase's rate limits.
It is critical to understand a factual note on Truto's architecture: Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Demandbase API returns an HTTP 429 Too Many Requests, Truto passes that error directly back to the caller. However, Truto normalizes the upstream rate limit information into standardized headers per the IETF specification (ratelimit-limit, ratelimit-remaining, ratelimit-reset).
Your application layer - the system managing the agent - is strictly responsible for intercepting these 429 responses, reading the ratelimit-reset header, pausing execution, and retrying the tool call. Do not assume the integration layer will magically absorb agent-induced API spam.
Available Demandbase Tools for AI Agents
To safely expose Demandbase to your LLM, you fetch the available tools dynamically. Below are the highest-leverage hero tools exposed by Truto for Demandbase workflows.
1. Create a Bulk Data Retrieval Job
Tool Name: create_a_demandbase_bulk_job
This is the entry point for large-scale data extraction. It initiates an asynchronous bulk job to retrieve company or contact data using entity IDs or search filters, outputting a CSV file. It handles up to 10,000 entity IDs per request and returns a jobId for tracking.
"I need to export a list of companies matching our ICP criteria. Initiate a bulk job named 'Q4_Cybersecurity_Targets' filtering for companies in the software industry with over 500 employees."
2. Get Bulk Job Status
Tool Name: get_single_demandbase_bulk_job_by_id
This tool is required to complete the async loop. It checks the status of a bulk job (Company Fetch, Contact Fetch, or Match) using the unique jobId. Once successful, the agent receives a signed resultsUrl to access the data.
"Check the status of bulk job ID 948274. If it is finished, retrieve the download link so we can parse the CSV."
3. Retrieve Company Intent Data
Tool Name: demandbase_company_intent_search
Returns intent signals filtered by company IDs, keyword sets, or specific keywords within a required date range. This tool is essential for agents that score leads based on recent research behavior.
"Pull the intent data for company ID 10482 from the last 7 days targeting the keywords 'cloud security' and 'data loss prevention'."
4. Search Contacts
Tool Name: demandbase_contacts_search
Allows the agent to search for specific individuals at target companies. It supports filtering by job title, job level, job function, location, and validation status, enabling the agent to autonomously build routing lists.
"Find the VP of Information Security or CISO at Acme Corp, and ensure the returned contact has a validated email address."
5. Match Companies and Contacts
Tool Name: create_a_demandbase_match
This endpoint matches raw or incomplete company and contact records against Demandbase's authoritative database based on provided firmographic details. It accepts an array of match requests for batch processing.
"Take this list of three raw conference leads and run them through the Demandbase match endpoint to get their canonical company IDs and revenue data."
6. List Subscription Alerts
Tool Name: list_all_demandbase_subscription_alerts
Retrieves a paginated list of alerts generated for a specific subscription ID (e.g., changes to target accounts, family tree updates, or news events).
"Fetch the latest subscription alerts for our Tier 1 account monitoring list and summarize any leadership changes or acquisitions."
For the complete inventory of available Demandbase tools, including custom source mapping, import jobs, and user management endpoints, refer to the Demandbase integration page.
Building Multi-Step Workflows
Building an agent that can chain multiple Demandbase tool calls requires a framework-agnostic approach to tool binding and strict error handling. Truto provides SDKs, such as the TrutoToolManager in our truto-langchainjs-toolset, that map Truto's /tools endpoint directly into your agent's framework.
When dealing with rate limits in a multi-step workflow, you must implement logic to read the standardized IETF headers. Below is a conceptual TypeScript example of binding tools to a LangChain agent while handling the 429 rate limit reality.
import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor, createOpenAIToolsAgent } from "langchain/agents";
import { TrutoToolManager } from "@trutohq/truto-langchainjs-toolset";
import { pull } from "langchain/hub";
import { ChatPromptTemplate } from "@langchain/core/prompts";
async function runDemandbaseAgent(promptText: string) {
// 1. Initialize the LLM
const llm = new ChatOpenAI({
modelName: "gpt-4o",
temperature: 0,
});
// 2. Fetch Demandbase tools from Truto for the specific integrated account
const toolManager = new TrutoToolManager({
trutoApiKey: process.env.TRUTO_API_KEY,
integratedAccountId: "demandbase_account_xyz789",
});
const tools = await toolManager.getTools();
// 3. Bind tools to the prompt
const prompt = await pull<ChatPromptTemplate>("hwchase17/openai-tools-agent");
const agent = await createOpenAIToolsAgent({
llm,
tools,
prompt,
});
const executor = new AgentExecutor({
agent,
tools,
});
// 4. Execute the agent loop with rate limit catching
try {
const result = await executor.invoke({
input: promptText,
});
console.log("Agent Result:", result.output);
} catch (error: any) {
// The caller is responsible for handling 429s based on IETF headers
if (error.response && error.response.status === 429) {
const resetTime = error.response.headers['ratelimit-reset'];
console.warn(`Rate limit hit. Must back off until timestamp: ${resetTime}`);
// Implement your custom sleep/retry logic here
} else {
console.error("Agent execution failed:", error);
}
}
}
runDemandbaseAgent("Run a bulk match job for Apple and Microsoft, then check the job status.");This architecture guarantees that your LLM sees a clean, hallucination-resistant list of JSON schemas. If you modify a tool's description in the Truto UI to improve the LLM's understanding, the getTools() function pulls the updated schema instantly.
Workflows in Action
Once the tool layer is bound to your LLM, you can construct complex, domain-specific workflows that operate autonomously.
Scenario 1: The Automated Intent & Enrichment Loop
Persona: Demand Gen Marketer / RevOps Engineer
Instead of manually checking accounts and routing them to sales, an agent is scheduled to run every morning to identify surging accounts, enrich them, and output a clean target list.
"Find all company intent data from the last 3 days for the keyword 'compliance management'. For any company showing high intent strength, run a contact search to find their VP of IT or CISO. Return a summary report of the contacts."
Execution Steps:
- The agent calls
demandbase_company_intent_search, supplying the requiredstartDate,endDate, andkeywordsarray. - The agent parses the returned payload to extract the
companyIdsthat meet the threshold. - For each identified company, the agent calls
demandbase_contacts_searchwith filters forjobLevel(VP, C-Suite) andjobFunction(IT, Security). - The agent formats the combined data into a structured summary for the user.
sequenceDiagram
participant User
participant Agent as AI Agent
participant Truto as Truto Tools API
participant Upstream as Demandbase API
User->>Agent: "Find high intent accounts and their IT leaders."
Agent->>Truto: Call demandbase_company_intent_search
Truto->>Upstream: Forward normalized request
Upstream-->>Truto: Return intent signals
Truto-->>Agent: Return intent JSON
Agent->>Truto: Call demandbase_contacts_search (Loop per company)
Truto->>Upstream: Forward normalized request
Upstream-->>Truto: Return contact records
Truto-->>Agent: Return contact JSON
Agent-->>User: Present enriched target listScenario 2: Asynchronous Bulk Data Export
Persona: Data Engineer / Marketing Analyst
An agent is tasked with handling large data migrations that exceed synchronous HTTP limits, requiring it to manage an asynchronous state machine.
"We need to refresh our CRM data. Create a bulk job to export our entire 'Enterprise Tier 1' account list. Poll the job status every 30 seconds. When it completes, give me the download URL."
Execution Steps:
- The agent calls
create_a_demandbase_export_account_list_job, passing the requiredjobNameand criteria. - The agent receives a
jobIdin the response. - The agent enters a loop, calling
get_single_demandbase_export_job_by_idwith thejobId. - If the status is pending, the agent waits (respecting rate limits). When the status is complete, it extracts the signed
resultsUrland provides it to the user.
Unblocking Agentic Workflows
Connecting Demandbase to AI Agents is not about writing a clever LLM prompt; it is about building a secure, reliable infrastructure layer that manages schemas, abstracts authentication, and standardizes rate limits.
By routing your LLM through Truto's Proxy APIs and /tools endpoint, you remove the integration maintenance burden from your engineering team. Your agent interacts with a stable, normalized set of tools, dramatically reducing hallucination risk and ensuring that bad LLM payloads never touch your production ABM environment.
FAQ
- How does Truto handle Demandbase rate limits for AI agents?
- Truto does not retry, throttle, or apply backoff on rate limit errors. It passes the HTTP 429 error to the caller and normalizes upstream rate limit info into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller is responsible for implementing retry/backoff.
- Can I use these Demandbase tools with LangChain or CrewAI?
- Yes. Truto's tools are framework-agnostic. Using our SDKs (like TrutoToolManager for Langchain.js), you can fetch the API schemas and bind them to any framework, including LangChain, LangGraph, CrewAI, and the Vercel AI SDK.
- How do AI agents handle Demandbase bulk export jobs?
- Demandbase enforces asynchronous processing for large datasets. Agents must be designed to call the job creation tool, capture the jobId, and repeatedly poll the job status tool until complete, retrieving the final download URL.
- Why shouldn't I give an LLM direct API access to Demandbase?
- Direct API access pushes provider-specific quirks (like nested JSON structures and strict date filtering logic) into the LLM context, leading to hallucinations. Truto's tools abstract these endpoints into stable, validated JSON schemas.