---
title: "Connect Seamless.AI to AI Agents: Automate B2B Search and Enrichment"
slug: connect-seamless-ai-to-ai-agents-automate-b2b-search-and-enrichment
date: 2026-10-16
author: Nachi Raman
categories: ["AI & Agents"]
excerpt: Learn how to connect Seamless.AI to AI agents using Truto's /tools endpoint. Build autonomous B2B data enrichment workflows with LangChain and Vercel AI SDK.
tldr: "Connect Seamless.AI to AI agents using Truto's /tools API to automate B2B prospecting. This guide covers bypassing credit-based pagination quirks, handling async research pipelines, and implementing rate limit backoff."
canonical: https://truto.one/blog/connect-seamless-ai-to-ai-agents-automate-b2b-search-and-enrichment/
---

# Connect Seamless.AI to AI Agents: Automate B2B Search and Enrichment


You want to connect Seamless.AI to an AI agent so your system can autonomously discover target accounts, run async enrichment pipelines, and monitor job changes across key contacts. Here is exactly how to do it using Truto's `/tools` endpoint and SDK, bypassing the need to build and maintain a custom connector from scratch.

Giving a Large Language Model (LLM) read and write access to a B2B intelligence platform requires careful orchestration. The agent needs to navigate complex search filters, manage asynchronous "research" queues, and handle strict rate limits. If your team uses ChatGPT, check out our guide on [connecting Seamless.AI to ChatGPT](https://truto.one/connect-seamless-ai-to-chatgpt-prospect-research-and-sync-leads/), or if you are building on Anthropic's models, read our guide on [connecting Seamless.AI to Claude](https://truto.one/connect-seamless-ai-to-claude-find-enrich-and-export-company-data/). 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 Seamless.AI, bind them natively to an LLM using frameworks like LangChain, LangGraph, CrewAI, or the Vercel AI SDK, and execute complex prospecting workflows. For a deeper look at the architecture behind this approach, refer to our research on [architecting AI agents and the SaaS integration bottleneck](https://truto.one/architecting-ai-agents-langgraph-langchain-and-the-saas-integration-bottleneck/).

## Why a Unified Tool Layer Matters for Agent Safety

Before writing integration code, decide what layer your agent will interact with. This architectural choice determines the reliability of your production system.

Direct API tools - mapping one tool directly to raw vendor endpoints - seem simple initially. However, this approach pushes the provider's architectural quirks directly into the LLM's context window. The model has to remember exactly how to format nested bracket arrays for search filters, how to handle the vendor's specific polling implementation, and how to manage the lifecycle of an enrichment request. Every unique API quirk is a hallucination waiting to happen.

By utilizing Truto's Proxy APIs via the `/tools` endpoint, your agent interacts with [standardized CRUD operations backed by strict JSON schemas](https://truto.one/best-unified-api-for-llm-function-calling-ai-agent-tools-2026/). That gives you concrete safety wins:

1. **Deterministic input validation.** Every tool features a strict JSON schema. Invalid arguments (like sending a string instead of an array of strings for a search filter) are rejected before they ever hit the Seamless.AI API, forcing the LLM to self-correct.
2. **Reduced prompt bloat.** You do not need to waste valuable context window tokens explaining how to format URL query parameters or manage pagination cursors. The tools handle the transport layer logic automatically.
3. **Normalized error handling.** When an agent makes a mistake, the error returned needs to be readable. Truto standardizes error outputs so the agent understands exactly what went wrong and how to fix it.

## The Engineering Reality of the Seamless.AI API

Giving an LLM access to external intelligence data sounds easy in a sandbox environment. You write a fetch function and wrap it in an `@tool` decorator. In production, this approach collapses against the reality of specialized B2B data APIs.

Seamless.AI introduces several specific integration challenges that break standard REST assumptions. If you hardcode these interactions into your agent logic, you will spend your sprints writing defensive code instead of improving your model's reasoning capabilities.

### The 30-Day Date Range Constraint

When listing historical data, standard LLMs will often attempt to pull large chunks of time - for example, querying all saved contacts from the past year. 

Seamless.AI strictly enforces a maximum date range of 30 days for its list endpoints. If your agent submits a request where `endDate` is more than 30 days after `startDate`, the API rejects the request entirely with a 400 error: *"Dates times are invalid. Please provide a time range that is no more than 30 days."*

Without a schema-enforced tool layer, the LLM will repeatedly hit this error, often failing to understand how to chunk its requests. Truto's tool schemas for these endpoints explicitly define this constraint in the tool description, ensuring the agent plans its data extraction in 30-day increments.

### Credit-Driven Dynamic Pagination

Pagination is typically a straightforward exercise in cursor management. However, Seamless.AI ties its pagination directly to your organization's available credit balance. 

When querying search endpoints, the reference limit is standard (e.g., 50 or 500 records). But if your organization's credit balance cannot cover the requested limit, the API does not simply reject the request. Instead, it dynamically shortens the returned page size to match exactly what your remaining balance can afford. 

An LLM expecting 500 records might receive only 12, causing standard "next page" reasoning loops to fail or hallucinate missing data. The agent must be designed to trust the actual length of the returned array, regardless of its requested limit.

### Complex Bracket Array Query Parameters

Many modern APIs accept complex search filters as JSON payloads in POST requests. Seamless.AI requires GET requests for searches, utilizing complex bracket array syntax in the query string.

For example, searching for a specific company and industry requires the URL to format as `companyName []=Salesforce&industry []=Software`. If an LLM tries to send a standard JSON string or comma-separated list in the query parameter, the search fails or returns useless results. Truto abstracts this completely; the tool schema accepts a standard JSON array for these fields, and the proxy layer handles the translation to bracket syntax before forwarding the request to Seamless.AI.

## Hero Tools for Seamless.AI

Truto exposes the capabilities of Seamless.AI as discrete, purpose-built tools. Instead of exposing raw API paths, these tools are mapped to clear operations that AI agents can easily understand and sequence.

Here are the highest-leverage tools available for automating B2B search and enrichment.

### Search Companies

`list_all_seamless_ai_search_companies`

This tool allows the agent to query the Seamless.AI index for target accounts based on specific firmographic criteria like name, domain, location, industry, or revenue. This is typically the first step in an account-based marketing (ABM) workflow. Note that this is purely an index search; it returns basic firmographics but does not perform deep enrichment.

> "Find software companies located in California with an estimated revenue between $10M and $50M. Return their domains and Seamless.AI search result IDs."

### Queue Company Research

`create_a_seamless_ai_companies_research`

Once target companies are identified, the agent must submit them for asynchronous deep enrichment. This tool takes the `searchResultId` values from the previous search (or direct domains) and submits them to the research queue. It returns an array of Request IDs. This operation consumes credits.

> "Take the 15 company search result IDs we just found and submit them for deep company research. Give me the request IDs so we can check on them later."

### Poll Company Research Results

`list_all_seamless_ai_companies_researches`

Because deep enrichment takes time, the agent must use this tool to poll the status of previously submitted request IDs. It returns the status (queued, researching, done, error) and, if completed, the fully enriched company profile.

> "Check the status of the 15 company research request IDs we submitted. For any that are marked 'done', extract the updated annual revenue and technology stack data."

### Search Contacts

`list_all_seamless_ai_search_contacts`

This tool allows the agent to search for specific personas within target accounts. It accepts filters like job title, seniority, department, and company name. Like company search, it returns index data (names, titles, LinkedIn URLs) and costs credits based on the volume of results.

> "Search for contacts with 'VP of Sales' or 'Chief Revenue Officer' titles at the software companies we identified. Keep the limit to 50 to conserve credits."

### Queue Contact Research

`create_a_seamless_ai_contacts_research`

This tool submits contacts for deep enrichment, revealing validated email addresses, direct phone numbers, and job change alerts. It requires the `searchResultId` from the contact search tool. The agent can also set `isJobChange` to true to specifically verify if the contact has recently changed employers.

> "Submit the top 10 CROs we found for contact research. Make sure to set the job change flag to true so we know if they recently moved roles."

### Poll Contact Research Results

`list_all_seamless_ai_contacts_researches`

This tool checks the status of contact research requests. When a request is marked 'done', the agent receives the heavily enriched contact record, complete with email validation confidence scores and direct dial numbers.

> "Poll the contact research IDs. Give me a list of all contacts whose research is complete and who have an email validation confidence score above 90%."

To view the complete inventory of available tools and their exact JSON schemas, visit the [Seamless.AI integration page](https://truto.one/integrations/detail/seamlessai).

## Workflows in Action

When you provide an LLM with these standardized tools, you stop building hardcoded scripts and start building autonomous workflows. Here is how specific personas can leverage these tools in production.

### Scenario 1: The Autonomous SDR

A sales development representative needs to build a highly targeted list of decision-makers in a specific niche and verify their current employment status before outreach.

> "Find companies in the Manufacturing industry located in Texas. For the top 5 companies, find contacts with 'Operations' in their title at the Director or C-Level. Run contact research on them to get verified emails, and summarize the final list."

**Agent Execution Sequence:**
1. Calls `list_all_seamless_ai_search_companies` with `industry []=Manufacturing` and `location []=Texas`.
2. Extracts the company names/domains from the result.
3. Calls `list_all_seamless_ai_search_contacts` iterating through the companies, using `seniority []=Director, C-Level` and `department []=Operations`.
4. Collects the resulting `searchResultId`s for the contacts.
5. Calls `create_a_seamless_ai_contacts_research` passing the IDs to begin the enrichment process.
6. Enters a loop, periodically calling `list_all_seamless_ai_contacts_researches` until all statuses return 'done'.
7. Formats the final enriched data containing validated emails and direct lines.

### Scenario 2: The RevOps Data Cleaner

A Revenue Operations manager needs to cross-reference an existing list of high-value prospects to see if any have recently changed jobs, which is a massive trigger for new sales conversations.

> "I have a list of 20 past champions [provides list of names and companies]. Submit them directly for contact research with the job change tracker enabled. When done, tell me exactly who has moved to a new company and what their new title is."

**Agent Execution Sequence:**
1. Parses the provided text list into a structured array of contact objects.
2. Calls `create_a_seamless_ai_contacts_research` using the direct contacts array (bypassing the search step entirely) and setting `isJobChange = true`.
3. Receives the batch of request IDs.
4. Calls `list_all_seamless_ai_contacts_researches` to monitor the queue.
5. Once processed, evaluates the `jobChangeAlert` data within the enriched results to output a clean list of moved champions.

## Building Multi-Step Workflows

To connect Seamless.AI to AI agents, you need a framework to orchestrate the tool calling loop. Whether you use LangChain, LangGraph, CrewAI, or the Vercel AI SDK, the pattern remains identical: fetch the schemas from Truto, bind them to the LLM, and manage the execution state.

Here is how the architecture flows during a multi-step research operation:

```mermaid
sequenceDiagram
  participant Agent as AI Agent
  participant Truto as Truto /tools API
  participant Seamless as Seamless.AI API
  
  Agent->>Truto: Call list_all_seamless_ai_search_companies
  Truto->>Seamless: GET /search/companies?industry[]=Software
  Seamless-->>Truto: 200 OK (Search Results)
  Truto-->>Agent: JSON Tool Response
  
  Agent->>Truto: Call create_a_seamless_ai_companies_research (IDs)
  Truto->>Seamless: POST /research/companies
  Seamless-->>Truto: 202 Accepted (Request IDs)
  Truto-->>Agent: JSON Tool Response
  
  loop Polling
    Agent->>Truto: Call list_all_seamless_ai_companies_researches (Request IDs)
    Truto->>Seamless: GET /research/companies?requestIds=...
    Seamless-->>Truto: 200 OK (Status & Enriched Data)
    Truto-->>Agent: JSON Tool Response
  end
```

### Implementing the Tools in LangChain

Using the `@trutohq/truto-langchainjs-toolset` SDK, you can dynamically fetch the Seamless.AI tools and bind them to your model. 

```typescript
import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor, createToolCallingAgent } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { TrutoToolManager } from "@trutohq/truto-langchainjs-toolset";

async function runSeamlessAgent() {
  // 1. Initialize Truto Tool Manager with your Integrated Account ID
  const trutoManager = new TrutoToolManager({
    apiKey: process.env.TRUTO_API_KEY,
    integratedAccountId: "seamless-account-id-123",
  });

  // 2. Fetch Seamless.AI tools from Truto
  const tools = await trutoManager.getTools();

  // 3. Initialize LLM and bind the tools
  const llm = new ChatOpenAI({
    model: "gpt-4o",
    temperature: 0,
  });
  const llmWithTools = llm.bindTools(tools);

  // 4. Create the prompt and agent
  const prompt = ChatPromptTemplate.fromMessages([
    ["system", "You are a B2B data research assistant. Use the Seamless.AI tools to discover and enrich companies and contacts. Always poll research requests until the status is 'done'."],
    ["human", "{input}"],
    ["placeholder", "{agent_scratchpad}"],
  ]);

  const agent = createToolCallingAgent({
    llm: llmWithTools,
    tools,
    prompt,
  });

  const executor = new AgentExecutor({
    agent,
    tools,
    maxIterations: 15, // Allow enough iterations for polling
  });

  // 5. Execute workflow
  const result = await executor.invoke({
    input: "Find 5 tech companies in New York and run deep research on them."
  });

  console.log(result.output);
}
```

### Handling Rate Limits in Agent Workflows

When building autonomous loops that poll external APIs, [rate limits become a critical failure point](https://truto.one/best-practices-for-handling-api-rate-limits-and-retries-across-multiple-third-party-apis/). 

**A factual note on rate limits:** Truto does *not* retry, throttle, or apply automatic backoff on rate limit errors. If your agent hammers the polling endpoint and the upstream Seamless.AI API returns an HTTP 429 Too Many Requests, Truto passes that 429 error directly back to the caller.

However, Truto normalizes the upstream rate limit information into standardized headers according to the IETF specification. Regardless of how Seamless.AI formats its rate limit data, Truto will return:
* `ratelimit-limit`: The total requests allowed in the window.
* `ratelimit-remaining`: The number of requests remaining.
* `ratelimit-reset`: The time (in UTC epoch seconds) when the limit resets.

Your agent framework is responsible for catching these errors, reading the headers, and pausing execution. If you do not implement this, your agent will blindly retry, burn its execution loop budget, and fail the workflow.

Here is how you handle it conceptually within an agent loop:

```mermaid
flowchart TD
    A["Agent executes tool call"] --> B{Response Status}
    B -->|200 OK| C["Process Data"]
    B -->|429 Too Many Requests| D["Read 'ratelimit-reset' header"]
    D --> E["Agent pauses execution<br>(Sleep until reset)"]
    E --> A
```

When writing custom tools or custom agent loop handlers, you must inspect the error object. If the status is 429, extract the `ratelimit-reset` header, calculate the delta from the current time, and instruct the runtime to sleep for that duration before allowing the LLM to continue its tool calling sequence. 

## Moving from Scripts to Agents

Connecting Seamless.AI to AI agents is not about automating a single API request; it is about providing LLMs with the primitives they need to execute complex, multi-step B2B intelligence operations.

By leveraging Truto's `/tools` endpoint, you abstract away the complexities of complex query syntaxes, 30-day constraints, and dynamic credit-based pagination. You provide your agent with a stable, schema-driven environment where it can search, queue, poll, and analyze data safely and deterministically.

> Ready to connect your AI agents to Seamless.AI and 100+ other B2B platforms? Talk to us today.
>
> [Talk to us](https://truto.one/book-a-demo/)
