Scaling AI Agents in Production for B2B Growth and Outreach

clay · Tech · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: B2B growth and outbound automation

Clay needed to scale AI agents for finding, closing, and growing customers from early chat-completion wrappers to hundreds of millions of monthly agent runs while preserving quality, throughput, cost visibility, model flexibility, and debuggability across customer-specific workflows.

Constraints:

Architecture

Clay evolved into a software-plus-agent platform with agents for prospect search, account reasoning, outbound messaging, lead enrichment, routing, and customer growth. The production stack uses an internal agent harness on the Vercel AI SDK, LangSmith for traces, evaluations, production profiling, cost reconciliation, and debugging, a metaprompter for model routing, and customer/engineering/support access to traces for diagnosing quality and cost issues.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["Clay users"] --> B["Clay agent products"]
  B --> C["Agent harness"]
  C --> D["Web and database research"]
  C --> E["Metaprompter"]
  C --> F["LangSmith"]
  B --> G["Customer workflows"]
  F --> H["Engineering and support teams"]
  H --> B
  G --> A
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Clay users Growth teams entering natural-language tasks for finding, qualifying, messaging, and growing customers. Clay agent products
Clay agent products Agentic search, account agents, lead enrichment, routing, outbound messaging, and growth workflows. Agent harness, Customer workflows
Agent harness Internal Vercel AI SDK-based execution layer for multi-step agents. Web and database research, Metaprompter, LangSmith
Web and database research Searches the web, crawls pages, uses Clay's database, and synthesizes company/person data. Agent harness
Metaprompter Maps prompts and user workflows to model providers based on task profile and evaluation results. Agent harness
LangSmith Observability, tracing, offline evaluation, production profiling, cost reconciliation, debugging, and trace export layer. Engineering and support teams
Customer workflows Outbound campaigns, native sequencer, lead enrichment, lead routing, CRM account workflows, and recommendations. Clay users
Engineering and support teams Teams using traces to debug agent quality, errors, costs, and customer-reported issues. Clay agent products

Data flow

Customers enter natural-language research or go-to-market tasks. Clay agents search the web and Clay's company/person database, crawl pages, synthesize documents, produce qualification or outbound recommendations, and send results into sequencers, lead routing, enrichment, or CRM workflows. LangSmith receives traces from the agent harness, supports offline and online evaluation, exposes production traffic patterns, and exports data for analysis and cost reconciliation.

3 supporting quotes
“an agentic search product to actually do TAM sourcing and find your best customers to actually search through the web or search through our database of companies and people”transcript, stated
“Somewhere between, I would say 10 to 30 steps on average doing a mix of, you know, synthesizing, web documents, actually searching the web, crawling different pages”transcript, stated
“it was actually, I think more or less a one line change to get traces exported to LangSmith.”transcript, stated

Why this architecture

Clay's scale makes manual inspection impossible, so trace visibility, offline evaluation, online profiling, and cost reconciliation became core platform capabilities. The agent harness remains model-agnostic because users prefer different providers and model profiles, and the metaprompter uses evaluations to map prompts to suitable models.

3 supporting quotes
“as soon as you go into, you know, hundreds of thousands or millions of agent runs, you can't actually understand the ground truth”transcript, stated
“I think Clay's position really is we we're model agnostic in some ways.”transcript, stated
“For us, LangSmith is we really think about it in two ways. One is just profiling production traffic”transcript, stated

Models used: OpenAI models · Anthropic models · LLMs · LLM-as-judge

Scale

Alternatives considered (roads not taken)

Manual inspection of agent behavior at scale

Rejected because: Once agent runs reach hundreds of thousands or millions, manual inspection and customer-by-customer conversations break down.

“you might be able to get away with it, without having this, when you're in more of a zero to one phase and just building out your initial product.”transcript, stated

One fixed model provider

Rejected because: Different users prefer different providers and models behave differently by writing style and task profile.

“we do allow users to select their preference of, you know, model provider”transcript, stated

Build observability entirely in-house

Rejected because: LangSmith's agent-framework orientation, nested trace support, and fast integration fit Clay's needs.

“I think LangSmith feels like a platform that was built by people who have built an agent framework.”transcript, stated

Patterns

observability-tracing (observability)

Clay exports traces from its agent harness to LangSmith from day zero, using them for production profiling, nested subagent visibility, debugging, and support investigations.

“It's day zero. Yeah. So we're it's almost always one of the first things that we do”transcript, stated
“get sort of quick stats or be able to see traces in a way that is able to understand the nesting of different subagents or different LLM paths as part of tool calls.”transcript, stated

eval-driven-development (evaluation)

Clay uses offline evaluations, ground-truth comparisons, online evaluators, and production trace analysis to benchmark quality against cost and throughput.

“we've used tools like LangSmith to really, do offline evaluations of where we are in quality and benchmark those against kind of where we are in a cost throughput, position.”transcript, stated
“being able to have online evaluators for understanding what behavior of agents is happening, at scale.”transcript, stated

llm-as-judge (evaluation)

Clay uses LLM-as-judge for research-and-synthesis outputs where deterministic checks are insufficient.

“for some of these we do use LLM-as-a-judge.”transcript, stated
“customers will also use these agents for combining both research and then actually synthesizing that research into a recommendation”transcript, stated

model-routing (model-ops)

Clay maps prompts to model providers through a metaprompter based on workflow profile and evaluation results.

“we have a metaprompter tool that basically automatically maps prompts to different models based on the profile that we think is best for that underlying question.”transcript, stated
“we use kind of evals to understand where we should be mapping those things and for what use cases those models are best for.”transcript, stated

tool-use-orchestration (orchestration)

Clay agents combine web search, crawling, database search, synthesis, recommendations, outbound messaging, lead enrichment, and routing in multi-step workflows.

“search through the web or search through our database of companies and people to find your best accounts”transcript, stated
“through a native sequencer or actually, you know, sending outbound messaging.”transcript, stated

Tradeoffs

Model strategy

Chose model-agnostic routing and user model choice over one default provider for all workflows.

Rationale: Different models have different writing styles and task profiles, and users develop provider preferences.

“they do have different writing styles, profiles of the actual work that they can do”transcript, stated
“we have users that really prefer Anthropic models and users that really prefer OpenAI models for different things.”transcript, stated

Observability platform

Chose LangSmith over Clay-only in-house tracing and evaluation tooling.

Rationale: LangSmith understood nested agent traces, integrated quickly with the Vercel AI SDK, and supported both production profiling and zero-to-one agent building.

“it was actually, I think more or less a one line change to get traces exported to LangSmith.”transcript, stated
“The second part is zero to one agent building.”transcript, stated

Evaluation mode

Chose a mix of deterministic matches and LLM-as-judge over only deterministic ground-truth matching.

Rationale: Some agent outputs are factual and structured, while research synthesis and recommendations need judgment-based scoring.

“Some of the evals that we have are just purely factual, right?”transcript, stated
“for some of these we do use LLM-as-a-judge.”transcript, stated

Gotchas (what bit them)

At high run volume, ground truth becomes unknowable without observability.

Root cause: Customers use blank text boxes for broad tasks, creating too many behaviors to inspect manually.

Resolution: Clay uses production profiling, online evaluators, and trace analysis to understand behavior at scale.

“it's usually a blank text box and people can put anything in a blank text box.”transcript, stated
“you can't actually understand the ground truth or you can't actually understand what everyone is doing with agents at all times.”transcript, stated

Customer reports do not identify the failing layer by themselves.

Root cause: A bad answer can come from a tool problem, an inference problem, or another layer in the stack.

Resolution: Clay uses LangSmith traces to inspect where the failure occurred.

“hey a customer reports this, but here's what actually happened.”transcript, stated
“was that a tool problem? Was that an inference problem, just kind of where in the stack that actually fell down.”transcript, stated

Inference cost accounting can drift from provider bills.

Root cause: Multiple inference providers and high run volume made spending opaque before LangSmith reconciliation.

Resolution: Clay reconciles LangSmith data against provider bills at roughly 99 to 99.5% coverage.

“we, really didn't have a good sense of where we were spending money on different inference providers.”transcript, stated
“99.5% reconciliation rate between the LangSmith data and our actual bills that we get from inference providers.”transcript, stated

Evaluation

Clay evaluates agents through deterministic ground-truth checks, LLM-as-judge for synthesized outputs, offline quality benchmarks against cost and throughput, online evaluators for production behavior, and LangSmith traces for debugging and cost reconciliation.

Metrics: Correct data quality · Throughput · Cost · Ground-truth factual matches · LLM-as-judge scores for recommendations · Latency and errors · 99 to 99.5% provider-bill reconciliation

3 supporting quotes
“We think about three things at Clay. So we think about the quality of the agent runs”transcript, stated
“But we think about quality, we think about throughput. So how many of these can we run in an efficient way? And we care about cost.”transcript, stated
“With LangSmith, we now have, I think it's around like a 99 maybe like 99.5% reconciliation rate”transcript, stated

Outcomes

Clay operates about 300 million agent runs per month, with 10 to 30 steps per run, 25 to 50 LangSmith users, and 99 to 99.5% cost reconciliation coverage.

“today we're running around 300 million agent runs a month.”transcript, stated
“some folks on our customer support team have started to use LangSmith for debugging, customer traces”transcript, stated