Skip to content

Connect Clari to AI Agents: Automate Call Logging and Deal Flows

Nidhi KN Nidhi KN 9 min read AI & Agents
TrutoFor teams building AI agents

Give your AI agent Clari tools.

Connect Clari to AI agents using Truto's /tools endpoint. Bypass custom integration builds, fetch Clari API capabilities as LLM-ready schemas, and build autonomous workflows for Revenue Ops.

In this guide

  1. 01Connect a Clari Account
  2. 02Fetch Clari Tools
  3. 03Bind Tools to the LLM
  4. 04Execute Workflows
  5. 05Implement Rate Limit Backoff

The guide

A step-by-step engineering guide to connecting Clari Copilot and CRM to AI agents. Learn how to fetch tools, handle rate limits, and automate deal flows.

You want to connect Clari to an AI agent so your system can independently log calls, analyze transcripts, update deal stages, and orchestrate revenue workflows based on historical context. Here is exactly how to do it using Truto's /tools endpoint and SDK, bypassing the need to build and maintain a custom Clari integration from scratch.

Giving a Large Language Model (LLM) read and write access to your Clari Copilot and CRM instances is a complex engineering challenge. You either spend weeks building, hosting, and maintaining a custom connector, or you use a managed infrastructure layer that handles the authentication and schema normalization for you. If your team uses ChatGPT, check out our guide on connecting Clari to ChatGPT, or if you are building on Anthropic's models, read our guide on connecting Clari 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 Clari, bind them natively to an LLM using LangChain (or any framework like LangGraph, CrewAI, or Vercel AI SDK), and execute complex revenue operations workflows. We will use the approach detailed in our research on [architecting AI agents and the SaaS integration bottleneck](/architecting-ai-agents-langgraph-langchain-and-the-saas-integration-bottleneck/).

Why a Unified Tool Layer Matters for Agent Safety

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

Exposing raw Clari API endpoints directly to an LLM pushes vendor-specific quirks into the model's context window. The agent has to understand exactly how Clari paginates massive call transcripts, how its internal Deal IDs map to CRM sync IDs, and how to structure deeply nested scorecard payloads. Every one of these quirks increases the probability of a hallucination.

By leveraging Proxy APIs mapped as standard resources, you collapse these complexities behind a consistent schema. Your agent interacts with predictable tools like list_all_clari_calls and clari_deals_bulk_update.

This approach yields strict safety advantages:

  1. Deterministic input validation. Every tool features a strict JSON schema. Invalid arguments are rejected before they touch the Clari API, causing the tool call to fail fast and prompting the LLM to correct itself.
  2. Reduced hallucination surface. The model selects from stable function names and predictable arguments rather than inventing raw HTTP request bodies.
  3. Isolated authentication. Your agent never handles API keys, OAuth tokens, or refresh cycles. The integration layer manages the secure transport.

The Engineering Reality of the Clari API

Giving an LLM access to a revenue operations platform is not just about executing basic CRUD operations. Clari sits at the intersection of conversational intelligence (Copilot) and pipeline management (CRM). The Clari API presents specific architectural hurdles that will stall an agent if not properly abstracted.

Transcript Blobs and Token Limits

Clari Copilot handles massive audio and video files, generating highly detailed transcripts, summaries, and speaker diarization data. When an agent requests a call record, the resulting JSON payload can be enormous. If you simply pass raw Clari responses back to the LLM, you will instantly blow out your context window. Your tooling layer must provide targeted proxy methods that return specific metadata arrays (like competitor_sentiments or metrics) rather than dumping the entire raw JSON graph into the prompt.

Separated Object Hierarchies

Clari maintains a distinct separation between Copilot data (calls, scorecards, keyword topics) and CRM data (accounts, contacts, deals). To update a deal based on a call transcript, an agent must traverse multiple resource relationships. If the LLM has to guess the foreign key constraints between a source_id in a Copilot call and a crm_id on a Deal, it will fail. Providing discrete, well-defined proxy tools allows the agent to chain these operations logically without needing to memorize the underlying relational database structure.

Rate Limit Reality

When building autonomous agents that scrape massive amounts of historical deal data or process dozens of call transcripts in parallel, you will hit Clari's rate limits.

Factual note on rate limits: Truto does not retry, throttle, or apply backoff on rate limit errors. When an upstream API like Clari returns an HTTP 429, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification.

Your agent execution loop is strictly responsible for inspecting these headers and applying a backoff strategy. Do not rely on the integration layer to absorb these limits magically - your code must pause and retry.

Clari AI Agent Hero Tools

Truto provides a comprehensive set of Clari tools out of the box via the /tools endpoint. Instead of building HTTP clients for each route, you can expose these directly to your agent. Here are the highest-leverage tools for automating Revenue Ops.

1. get_single_clari_call_by_id

This tool retrieves the complete details of a specific Clari Copilot call. It returns critical context including the transcript, AI-generated summary, identified competitor sentiments, and the live deal stage at the time of the call.

Contextual usage notes: Use this tool when the agent needs deep intelligence on a specific meeting. Because the return payload includes large text fields (like transcript), ensure your agent parses the summary and metrics arrays first before scanning the raw text to save tokens.

"Retrieve the details for the Clari call with ID 'call_89234' and extract the competitor sentiments and the bot_not_join_reason if the recording failed."

2. list_all_clari_calls

This tool allows the agent to search and filter historical Clari Copilot calls based on attendees, topics, status, time ranges, or duration.

Contextual usage notes: This tool is heavily paginated (max 100 calls per page). It returns lightweight metadata (title, users, time, status). The agent should use this tool to build a list of relevant call_ids, and then iterate over them using the single call tool to fetch transcripts.

"Find all Clari calls from the last 7 days where John Doe was an external participant and the call duration was over 30 minutes."

3. list_all_clari_scorecards

This tool fetches Clari scorecards, filtering by time range, specific sales reps, or the scorer.

Contextual usage notes: Ideal for AI agents built for sales coaching. The agent can aggregate questions_score and total_score across multiple calls for a specific rep to identify trends in their pitch delivery.

"List all scorecards for the rep 'sarah@example.com' from this month, and highlight any calls where the total_score was below 70."

4. clari_deals_bulk_update

This tool allows the agent to write updates back to the Clari CRM. It accepts arrays of deal updates, modifying fields like amount, stage, and close_date.

Contextual usage notes: Use this tool at the end of an agentic workflow after the LLM has analyzed a call transcript and determined that a deal is at risk or has advanced to a new stage. Always require the agent to fetch the current deal state before initiating a bulk update.

"Update the Clari deal with crm_id 'deal_554' to change its stage to 'Negotiation' and update the close_date to the end of this month."

5. create_a_clari_call

This tool enables the creation of a new call in Clari Copilot by submitting an external audio recording for transcription and analysis.

Contextual usage notes: Highly useful for data migration or ingesting calls from unsupported PBX systems. The tool processes one call per request. Your agent must iterate over a list of audio_urls and provide the required source_id, type, and call_time.

"Upload the call recording located at 'https://storage.example/call.mp3' to Clari as a new call, setting the call_time to yesterday at 2 PM."

6. clari_contacts_bulk_update

This tool updates contact records in Clari's CRM, modifying details like job titles, phone numbers, email addresses, and custom fields.

Contextual usage notes: Perfect for CRM hygiene workflows. If an agent detects a job title change mentioned in a call transcript, it can immediately use this tool to update the contact record.

"Update the contact with crm_id 'cont_992' in Clari to change their job_title to 'VP of Engineering' and add their new phone number."

To view the complete inventory of available Clari tools, including their required arguments and strict JSON schemas, visit the Clari integration page.

Workflows in Action

When you provide an AI agent with this unified toolset, it can chain operations together to automate tedious Revenue Ops tasks. Here are two concrete examples of how an agent navigates the Clari API.

Scenario 1: Autonomous Deal Risk Assessment

Persona: Revenue Operations Manager automating weekly pipeline reviews.

"Review all Clari calls from yesterday related to deals in the 'Negotiation' stage. If any call transcripts indicate negative competitor sentiment, update the associated Clari Deal to reduce the probability by 15% and output a summary of the risk."

Execution Steps:

  1. The agent calls list_all_clari_deals filtering for deals in the "Negotiation" stage.
  2. The agent calls list_all_clari_calls for the past 24 hours, cross-referencing attendees with the contacts on the fetched deals.
  3. The agent iterates through the matches, calling get_single_clari_call_by_id to read the competitor_sentiments and summary.
  4. Upon finding negative sentiment, the agent calculates the new probability.
  5. The agent calls clari_deals_bulk_update to push the adjusted probability back to the CRM.

Result: The agent returns a concise text summary of the deals it updated and the specific competitor threats identified in the transcripts. The CRM is updated instantly without human intervention.

Scenario 2: Automated Sales Coaching Aggregation

Persona: Sales Enablement Coach monitoring new hire performance.

"Find all scorecards for our new SDRs from the past two weeks. Identify the questions where they consistently score the lowest, and extract quotes from the related call transcripts that highlight the mistakes."

Execution Steps:

  1. The agent calls list_all_clari_users to get the internal IDs of the SDR cohort.
  2. The agent calls list_all_clari_scorecards filtered by those specific reps and the two-week time range.
  3. The agent analyzes the questions_score arrays across the results to find the lowest averages.
  4. The agent extracts the call_id for the lowest scoring records.
  5. The agent calls get_single_clari_call_by_id for those calls to read the transcript and pull specific text segments.

Result: The coach receives a structured report showing the weakest areas of the pitch (e.g., "Budget Qualification"), backed by direct quotes from the SDRs' calls, enabling targeted training.

Building Multi-Step Workflows

To build these multi-step workflows, you must fetch the tools from the API and bind them to your agent. This implementation is framework-agnostic. Whether you use LangChain, LangGraph, CrewAI, or the Vercel AI SDK, the core concept remains the same: retrieve the JSON schemas, inject them into the LLM, and manage the execution loop - including strict rate limit backoffs.

Here is how the architecture flows:

flowchart TD
    A["Agent Framework<br>(LangChain, CrewAI)"] -->|"Action Request"| B["Truto /tools API"]
    B -->|"Proxy Request"| C["Clari Copilot / CRM API"]
    C -->|"HTTP 429 Rate Limit"| B
    B -->|"Standard IETF Headers"| A
    A -->|"Retry Logic & Backoff"| B

Below is a TypeScript example demonstrating how to initialize an agent using the truto-langchainjs-toolset, handle the LLM binding, and implement defensive rate limit error handling.

import { ChatOpenAI } from "@langchain/openai";
import { AgentExecutor, createToolCallingAgent } from "langchain/agents";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { TrutoToolManager } from "truto-langchainjs-toolset";
 
async function runClariAgent() {
  // 1. Initialize the Tool Manager with your Clari Integrated Account ID
  const toolManager = new TrutoToolManager({
    trutoApiKey: process.env.TRUTO_API_KEY,
    integratedAccountId: "clari_acc_88f92a1", 
  });
 
  // 2. Fetch the tools from the Truto API
  const tools = await toolManager.getTools();
 
  // 3. Initialize the LLM and bind the Clari tools
  const llm = new ChatOpenAI({
    modelName: "gpt-4-turbo",
    temperature: 0,
  }).bindTools(tools);
 
  const prompt = ChatPromptTemplate.fromMessages([
    ["system", "You are a Revenue Operations AI assistant. Use the provided tools to interact with Clari. If a tool fails, explain the error."],
    ["human", "{input}"],
    ["placeholder", "{agent_scratchpad}"],
  ]);
 
  const agent = createToolCallingAgent({ llm, tools, prompt });
  const agentExecutor = new AgentExecutor({
    agent,
    tools,
    maxIterations: 10,
  });
 
  // 4. Custom Execution Loop to handle strict HTTP 429 Rate Limits
  const userInput = "Review calls from yesterday and update deals at risk based on competitor mentions.";
  let attempt = 0;
  const maxAttempts = 3;
 
  while (attempt < maxAttempts) {
    try {
      const result = await agentExecutor.invoke({
        input: userInput,
      });
      console.log("Agent Workflow Complete:", result.output);
      break;
    } catch (error: any) {
      if (error.status === 429) {
        // Truto passes the HTTP 429 from Clari along with standardized IETF headers.
        // You MUST handle the backoff here.
        const resetTime = error.headers['ratelimit-reset'];
        const waitSeconds = resetTime ? parseInt(resetTime, 10) : 10;
        
        console.warn(`Rate limit hit. Backing off for ${waitSeconds} seconds...`);
        await new Promise(resolve => setTimeout(resolve, waitSeconds * 1000));
        attempt++;
      } else {
        console.error("Workflow failed:", error);
        break;
      }
    }
  }
}
 
runClariAgent();

By controlling the execution loop, you ensure your agent respects the upstream API's constraints without relying on black-box retry mechanisms. You define the tools, you define the logic, and Truto normalizes the transport layer.

Building AI agents that reliably execute Revenue Ops workflows requires a stable foundation. Stop writing manual API wrappers and hardcoding CRM object schemas. Leverage unified proxy APIs to collapse the integration bottleneck, and keep your engineering cycles focused on improving your agent's reasoning.

Two ways to put Clari to work

Truto

For product teams

Give your agent Clari tools

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

FAQ

How do AI agents access Clari API tools?
AI agents access Clari tools by calling Truto's /tools endpoint, which returns fully documented JSON schemas representing Clari's API resources and methods. These schemas can be bound directly to the LLM using standard framework methods like .bindTools().
Does Truto handle rate limit retries for the Clari API?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. When Clari returns an HTTP 429, Truto passes the error back to the caller along with normalized IETF-compliant headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your agent application must handle the backoff logic.
Is this approach limited to the Model Context Protocol (MCP)?
No. While MCP is an option, Truto's /tools API is entirely framework-agnostic. You can inject these tools directly into LangChain, LangGraph, CrewAI, or the Vercel AI SDK without relying on a dedicated MCP server.
Clari ClariAI agent tools Get a sandbox

More from our Blog