Clay aims for comparable results between its native agent and external LLM harnesses
Synthesized by Helena Ross, Strategic Think-Tank Desk
- Clay’s stack runs on a custom BullMQ system, avoiding newer orchestration frameworks.
- Scoring all 40 million firms with a TypeSafe classifier would cost roughly $1,500 in inference fees.
- An automatic router will select models for most users while preserving manual control for power users.
Jeff Barg says Clay is building a sandboxed agent so users get similar outcomes whether they run Clay’s own agent or an outside LLM such as Claude Code.
«How Clay Builds GTM Agents — Jeff Barg, Head of AI»
Summary and commentary by Aura-V. Facts, figures and opinions belong to the original.
Usage is already split close to 50/50 between the two, a balance the team did not anticipate. In a recent conversation, Jeff Barg, Head of AI at Clay, detailed the engineering choices that made this parity possible and why the company is now shipping a sandboxed agent that works with any of its tools Latent Space interview.
From a Single Engineer to a Coding Agent Stack
When Barg took the AI lead, a lone engineer handled all agent work. After that engineer left, the team launched Sculptor in September 2025 on Sonnet 3.5-era models. Sculptor ran a loop of tools guided by a heavily tuned system prompt.
Three lessons emerged: (1) coding agents excel at Bash and Python; (2) limited toolsets hinder composability; and (3) agents need direct access to CRM and campaign data. Clay responded by rebuilding Sculptor as a coding agent on the Pi harness, running the Clay CLI inside a cloud sandbox. A new data layer called Audiences now merges records from the CRM and Gong, giving the agent a unified view of prospect information.
Post-Training Timing and Cost Discipline
For the first eighteen months, Clay explored training its own models but only found the effort viable in the last few months. Barg warns that many firms err by (a) trying to out-compete frontier models in a single domain—a task still “really hard”—and (b) starting post-training before inference spend reaches a meaningful scale. He places that threshold somewhere between $10 million and $100 million in inference spend.
Scoring the Entire Market for $1,500
Clay’s database holds roughly 40 million companies. A LinkedIn page averages about a thousand tokens; an ideal customer profile adds another 500 tokens. Running a classifier such as TypeSafe’s Jev on every record would cost around $1,500 in total inference fees.
Barg notes that qualification is “close to solved.” Models have been scoring at the top of Clay’s internal evaluations for roughly a year, and any model from the past year can retrieve a company’s latest funding round. Frontier models still add value for deep prospect research and orchestration, where the best plays can be “ten to a hundred times as effective as an average one.”
Hiding the Model Selector Behind an Automatic Router
Customers complain when they see Clay’s model selector because they cannot re-evaluate every new model for their use case. Clay is preparing an automatic router that assigns the optimal model to each task without user intervention. The selector will remain for agency owners and power users, while the majority of users will rely on the auto-mode. Trust in the router will be essential before broader adoption.
A Home-Grown Agent Stack Without Temporal or LangGraph
Clay’s production stack is built on BullMQ for job orchestration, Postgres and ClickHouse for product data, and Snowflake for analytics. The team has not adopted newer orchestration frameworks such as Temporal or LangGraph, citing sufficient performance at current scale. Scaling challenges have emerged: launching an agent per row can cause sudden spikes when processing large tables (e.g., 50,000 companies). Clay integrated LangSmith to monitor these spikes, added request throttling, and implemented pause-resume logic for provider outages or rate limits.
Extending the Agent to Any LLM Harness
Clay plans to release a sandboxed agent that is free to use any of its tools and building blocks, ensuring parity between the native agent and external harnesses. This internal demand helped justify the first-party agent, even as many customers prefer to stay within the Clay UI.
The company’s resilience was tested when OpenAI postponed a planned ChatGPT-apps launch two days before release.
When Clay first showed customers Workflows, they were confused and some were upset. Over time agency owners embraced them, and a growing share of work that previously ran in tables now runs in Workflows. Most workflows are built with the CLI or the agent. CEO Kareem Amin spent five years building Clay when almost nothing was working; Barg says that persistence remains evident today.
Agents Still Can’t Debug Agents
Barg wants a model that can read a long agent trace and pinpoint where a run went wrong. Current models tend to flag the longest step even when the error lies elsewhere. Clay would like to pull traces from bad runs, have an agent review them, and use the findings to improve the agent automatically, but that capability does not yet work. Models still make basic mistakes, such as retrying the same CLI command with identical inputs. Nevertheless, when Barg asked the agent how many YC companies use Clay, the answer arrived in about a minute—a task that a year ago would have required manual Snowflake queries.
Clay – the go-to-market platform where Jeff is Head of AI.
Clay acquires Avenue (January 2025) to help growth teams act on intent signals.
How Clay Scales GTM Agents – Jeff’s LangChain Interrupt talk on running Clay’s agents in production.
Clay Agent Plugin (CLI & API) – the CLI and API that let Claude Code and Codex work directly with Clay.
Inside Clay Workflows – how Workflows was built, including the table view customers asked to get back.
Interested in implementing this technology inside your company?
Our studio designs custom agent meshes, data pipelines, and outbound GTM systems for forward-looking enterprises.