Skip to content

Connect Consulti to AI Agents: Automate Prospecting and Verification

Nidhi KN Nidhi KN 10 min read

Connect Consulti to AI Agents using Truto's /tools endpoint and SDKs. Fetch standardized tools, bind them to LangChain or other frameworks, and execute complex autonomous prospecting and verification workflows.

  1. 01

    Initialize the Truto SDK

  2. 02

    Fetch Consulti Tools Dynamically

  3. 03

    Bind Tools to the LLM

  4. 04

    Execute the Agent Loop

  5. 05

    Implement Rate Limit Backoff

Through Truto. One API and MCP tools.

Use Consulti in your own Elaichi, from the team behind Truto, free for 14 days. Try Elaichi

You want to connect Consulti to an AI agent so your system can autonomously discover B2B leads, enrich social profiles, verify catch-all mailboxes, and execute high-volume prospecting workflows. Here is exactly how to do it using Truto's /tools endpoint and SDK, bypassing the need to build and maintain a custom REST API integration from scratch.

Giving a Large Language Model (LLM) read and write access to a specialized data provider like Consulti is an engineering challenge. You either spend sprints building, hosting, and maintaining a custom connector to handle their specific credit economies and filter endpoints, or you use a managed infrastructure layer that handles the boilerplate for you. If your team uses ChatGPT, check out our guide on connecting Consulti to ChatGPT, or if you are building on Anthropic's models, read our guide on connecting Consulti to Claude. For developers building custom autonomous workflows, you need a programmatic way to fetch these tools and bind them to your agent framework.

This guide breaks down exactly how to fetch AI-ready tools for Consulti, bind them natively to an LLM using frameworks like LangChain, LangGraph, CrewAI, or the Vercel AI SDK, and execute complex revenue operations workflows. For a deeper look at the architecture behind this approach, refer to our research on Architecting AI Agents: LangGraph, LangChain, and the SaaS Integration Bottleneck.

Why a Unified Tool Layer Matters for Agent Safety

Before writing a line of integration code, you must decide what layer your agent talks to. This architectural choice determines how predictable and safe your production system will be.

Direct API tools - writing one Python or Node.js function per raw Consulti endpoint - look convenient in a prototype but push provider-specific quirks directly into the LLM's context window. The model has to remember that Consulti requires canonical string IDs for industry filters, that catch-all verification endpoints operate differently than standard SMTP checks, and that credit balances must be checked before triggering large pagination loops. Every one of those required context rules is a hallucination waiting to happen.

A unified tool layer abstracts the underlying API quirks. Your agent sees standardized functions with strict JSON schemas. That gives you concrete safety wins:

  1. Smaller attack surface for hallucination. The LLM only ever chooses from a stable list of function names with strongly typed inputs.
  2. Deterministic input validation. Every tool has a strict JSON schema. Invalid arguments are rejected before they ever hit the Consulti API, so a broken tool call fails fast.
  3. Separation of concerns. Your prompt engineering focuses entirely on business logic - who to prospect and how to qualify them - instead of teaching the model how to format HTTP payloads.

The Engineering Reality of the Consulti API

Giving an LLM access to external data sounds trivial. You write a fetch request and wrap it in an @tool decorator. In production against specialized B2B data systems, this approach collapses.

The Consulti API introduces specific integration challenges that break standard REST assumptions. If you hardcode these interactions into your agent, you will spend your time writing defensive integration code instead of improving your model's reasoning.

The Immutable Credit Economy

Unlike standard SaaS APIs where the primary penalty for an agent hallucinating a loop is a temporary rate limit, Consulti operates on a strict credit system. Executing a search costs lead credits. Running an SMTP verification costs verification credits. Running a deep catch-all verification costs five times as much.

If you hand raw API access to an agent and it decides to loop through 500 pages of search results to "be thorough," it will drain your production credit balance in minutes. You cannot afford to let an agent guess when it is allowed to execute a call. You must orchestrate pre-flight balance checks and strictly bound the pagination depth available to the LLM.

Enum Filter Validation

Consulti maintains highly structured data. If you want to search for leads in the software space, you cannot pass "Software" or "Tech" as a query parameter. The API expects a canonical slug, which changes depending on the filter type (e.g., industries, technologies, states).

Standard LLMs will routinely guess these strings based on common sense. When they do, the Consulti API will reject the request with a 400 error. The agent must first query the metadata endpoints to retrieve the snapshot-cached canonical list, parse it, and map its desired criteria to the exact required string before executing the actual lead search.

Asynchronous and Long-Running Verifications

Basic email verification happens fast via SMTP checks. However, Consulti offers a specialized engine to verify mailboxes on catch-all domains. This process actively probes the destination ESP and can take up to 300 seconds to resolve.

Standard HTTP clients and LLM tool executors usually time out after 30 to 60 seconds. If your agent is waiting on a catch-all verification, the connection will drop, the agent will throw an unhandled exception, and the chain will die - even though Consulti is still processing the request on the backend.

Generating AI-Ready Tools for Consulti

Truto solves this by providing a unified schema layer over the raw APIs. Every integration on Truto is a comprehensive JSON object that represents how the underlying product's API behaves.

Integrations have Resources that map to the underlying endpoints. Every Resource has Methods defined on them - standard CRUD operations alongside custom actions. These Methods act as Proxy APIs where Truto handles the boilerplate of authentication and query parameter processing.

Truto provides a set of tools for your LLM frameworks by offering a description and schema for all Methods defined on the Resources for an integration. By calling the /tools endpoint, you retrieve these Proxy APIs with their descriptions and strict JSON schemas, creating deterministic Tools that LLM frameworks can consume instantly via .bindTools().

Hero Tools for Consulti AI Agents

When connecting Consulti to your AI agent, do not dump the entire API spec into the context window. Provide only the high-leverage tools required for the specific prospecting or verification task.

Here are the hero tools you should expose to your agent for revenue operations workflows.

list_all_consulti_credit_balances

This is a critical pre-flight tool. It returns the authenticated API user's current lead and verification credit balances. Because this tool is free to call, agents should be instructed to check this balance before initiating any batch enrichment or search loops to prevent transaction failures.

"Check our current Consulti credit balances. If we have more than 500 lead credits, proceed with the account expansion workflow."

get_single_consulti_filter_value_by_id

This tool returns the canonical list of values accepted by a given enum filter (such as industries, technologies, or states). Agents must use this to map their semantic intent to Consulti's exact database structure. It utilizes a 1-hour edge cache, ensuring fast retrieval without exhausting API limits.

"Fetch the canonical industry values for Consulti and find the exact slug for enterprise software development."

list_all_consulti_leads

This tool executes a search against the B2B lead database. It accepts filters for title, industry, location, and company size. The results strictly contain leads with a verified email label. When calling this tool with excludeListId, agents must be instructed to only fetch page 1, set a strict limit, and avoid infinite pagination loops.

"Search for VP of Sales leads in the technology industry located in Texas. Return a maximum of 25 results."

consulti_leads_enrich

Given an email address, this tool returns the full enriched B2B lead profile. Crucially, when the lead is linked to a company, it also returns the full company object - including funding data, web traffic, headquarters location, and specialties. This turns a simple email into a comprehensive data asset for personalized outreach.

"Enrich the profile for sarah.j@example.com and summarize the recent funding history of her company."

consulti_email_verifications_verify

This tool executes a standard SMTP check to verify if an email address is valid and deliverable. Agents can use the boolean flags alongside the status field to accurately route follow-up logic. It costs 1 verification credit per successful check.

"Run a standard verification on this list of five emails. Drop any that return an invalid status."

consulti_catch_all_verifications_verify

For mailboxes on domains configured as catch-alls, standard SMTP checks are insufficient. This tool uses Consulti's specialized ESP verification engine to probe actual mailbox existence. It costs 5 verification credits and agents must handle the fact that it can take up to 300 seconds to return.

"The domain example.com is a catch-all. Run a deep verification on jsmith@example.com to confirm the mailbox exists."

To view the complete inventory of available Consulti tools, strict JSON schemas, and parameter requirements, visit the Consulti integration page.

Workflows in Action

When you provide an agent with these standardized tools, you transition from rigid scripts to autonomous data orchestration. Here are two concrete examples of how an agent sequences Consulti tools in production.

1. Autonomous ICP Targeting and Enrichment

Sales teams need fresh, highly targeted accounts that match their Ideal Customer Profile (ICP), but building these lists manually is tedious.

"We need to target marketing executives in the retail sector in New York. Ensure we have at least 100 lead credits. If we do, find the correct industry slug, run the search for 25 leads, and enrich their profiles."

  1. The agent calls list_all_consulti_credit_balances to verify there is sufficient budget for the operation.
  2. The agent calls get_single_consulti_filter_value_by_id passing industries to find the exact Consulti slug for retail.
  3. The agent calls list_all_consulti_leads using the discovered slug, the "New York" location, and "marketing" titles.
  4. The agent iterates over the results, calling consulti_leads_enrich on each email to pull down the full company funding and traffic data.
  5. The agent compiles the enriched data into a structured JSON payload ready for your CRM.
flowchart TD
    A["Agent Loop<br>Initiated"] --> B["Call list_all_consulti_credit_balances"]
    B --> C{"Sufficient<br>Credits?"}
    C -- "Yes" --> D["Call get_single_consulti_filter_value_by_id"]
    C -- "No" --> E["Halt execution<br>Alert user"]
    D --> F["Call list_all_consulti_leads"]
    F --> G["Call consulti_leads_enrich<br>for each result"]
    G --> H["Return enriched<br>payload"]

2. Multi-Stage Email Verification Routing

Data hygiene is critical before launching outbound campaigns. Instead of treating all emails equally, an agent can intelligently route verifications based on domain configurations.

"Take this raw list of 50 imported prospects. Run standard verification on all of them. If any are marked as catch-all domains, escalate those specific emails to the deep verification engine."

  1. The agent calls consulti_email_verifications_verify on the list of prospects.
  2. The agent parses the returned statuses. Valid emails are approved, invalid emails are discarded.
  3. For emails returning a catch-all status, the agent dynamically routes them to consulti_catch_all_verifications_verify.
  4. The agent waits for the deep ESP engine to resolve the actual mailbox existence, ensuring maximum deliverability without wasting credits on standard domains.

Building Multi-Step Workflows

To build these workflows in code, you need to connect your agent framework to Truto's /tools endpoint. Truto's SDKs act as the bridge between the unified schema and the LLM's function-calling interface.

This approach works natively with any modern framework, including LangChain, LangGraph, CrewAI, and the Vercel AI SDK.

Here is how you fetch the tools programmatically and bind them to a LangChain agent using the @trutohq/truto-langchainjs-toolset:

import { ChatOpenAI } from "@langchain/openai";
import { TrutoToolManager } from "@trutohq/truto-langchainjs-toolset";
import { AgentExecutor, createToolCallingAgent } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
 
async function runConsultiAgent() {
  // 1. Initialize the Truto Tool Manager with your Integrated Account ID
  const toolManager = new TrutoToolManager({
    trutoApiKey: process.env.TRUTO_API_KEY,
    integratedAccountId: "consulti_account_xyz789",
  });
 
  // 2. Fetch the tools dynamically from the Consulti integration
  const tools = await toolManager.getTools();
 
  // 3. Initialize your preferred LLM
  const llm = new ChatOpenAI({
    model: "gpt-4o",
    temperature: 0,
  });
 
  // 4. Bind the Consulti schemas directly to the LLM
  const llmWithTools = llm.bindTools(tools);
 
  // 5. Create the prompt and agent executor
  const prompt = ChatPromptTemplate.fromMessages([
    ["system", "You are a revenue operations assistant. Always check credit balances before executing searches."],
    ["human", "{input}"],
    ["placeholder", "{agent_scratchpad}"],
  ]);
 
  const agent = createToolCallingAgent({
    llm: llmWithTools,
    tools,
    prompt,
  });
 
  const executor = new AgentExecutor({
    agent,
    tools,
  });
 
  // 6. Execute the autonomous loop
  const result = await executor.invoke({
    input: "Check our Consulti credit balance. If we have credits, find the industry slug for manufacturing and search for 5 leads."
  });
 
  console.log(result.output);
}

Handling API Rate Limits

When writing autonomous agent loops, you must defensively handle API rate limits.

It is a factual requirement to understand how Truto handles these errors: Truto does not retry, throttle, or apply backoff on rate limit errors.

When the upstream Consulti API returns an HTTP 429 Too Many Requests error, Truto passes that exact error directly through to the caller. However, Truto does normalize the upstream rate limit information into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset).

Your agent framework or application logic is entirely responsible for reading these headers and implementing its own retry or backoff mechanism. If your agent hits a 429, you must catch the error, parse the ratelimit-reset header, and pause execution until the window clears.

sequenceDiagram
    participant Agent as Agent Execution Loop
    participant Truto as Truto Proxy Layer
    participant Consulti as Consulti API

    Agent->>Truto: Call list_all_consulti_leads
    Truto->>Consulti: GET /leads/search
    Consulti-->>Truto: HTTP 429 Too Many Requests
    Note right of Truto: Truto normalizes IETF headers<br>but does NOT retry.
    Truto-->>Agent: HTTP 429 + ratelimit-reset header
    Note left of Agent: Agent catches 429,<br>applies backoff,<br>and retries later.

Wrap Up

Connecting Consulti to AI agents manually requires you to write defensive code to handle rigid enums, credit economies, and long-running verification checks. By using a unified API layer to map Proxy APIs into strict JSON schemas, you eliminate the integration boilerplate and drastically reduce the hallucination surface area for your models.

Your agent interacts with stable, deterministic tools, while the infrastructure handles the translation layer. You can stop maintaining point-to-point connector code and focus entirely on engineering better autonomous workflows for your revenue teams.

FAQ

How do I connect Consulti to an AI agent framework like LangChain?
You can connect Consulti to LangChain using Truto's `/tools` endpoint. Truto translates Consulti's raw endpoints into Proxy APIs with strict JSON schemas, which can be fetched via the SDK and passed into LangChain's `.bindTools()` method.
How does Truto handle Consulti rate limits for AI agents?
Truto does not retry, throttle, or apply backoff on rate limit errors. If Consulti returns an HTTP 429, Truto passes the error to the caller while normalizing the rate limit data into IETF standard headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). The caller is responsible for retries.
Can my AI agent check Consulti credit balances autonomously?
Yes. By providing the `list_all_consulti_credit_balances` tool to your agent, it can autonomously check your lead and verification credit limits before initiating large, credit-consuming batch operations.
How do agents handle Consulti's long-running catch-all verifications?
The `consulti_catch_all_verifications_verify` tool utilizes a deep ESP verification engine that can take up to 300 seconds. Your agent execution framework must be configured to handle long timeouts or implement asynchronous polling to prevent connection drops.

Two ways in

Two ways to put Consulti to work

Elaichifrom the team behind Truto

For you and your team

Use Consulti in yourself

Connect Consulti once, add Elaichi to ChatGPT or Claude, and ask. Every call is checked against your own permissions and logged.

Start free, 14 days No credit card required

For product teams

Give your agent Consulti tools

Your customers connect their own Consulti accounts. Your product gets one API and MCP tools for Consulti, through Truto.

Consulti ConsultiAI agent tools Start free

Blog

More from our Blog