# "Inside Clay's GTM agent rebuild"
<!--
ref: @content/youtube/langchain/inside-clays-gtm-agent-rebuild
tags: [go-to-market agents, coding agent harness, Pi, CLI design, agent evals, memory, sandboxes, approvals, pricing, model routing]
version: 2
updated_at: 2026-11-22T09:50:26.369Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=efBlbQahwng)**

# Inside Clay's GTM agent rebuild

*Synthesized from Jeff Bargh, head of AI at Clay, in conversation on LangChain, 2026-11-19.*

Jeff Bargh (name as captioned), head of AI at the go-to-market platform Clay, is interviewed on an agent-building podcast hosted by an unnamed LangChain interviewer; the captions garble the show's name and some product names.

## Core Thesis
Jeff argues that Clay rebuilt its agent around a coding agent with a command line interface because such agents generalize surprisingly well, and that most of the improvement came from simple harness engineering rather than model training. He says there is no secret ingredient: tight control of orchestration, memory and approvals, plus honest evals, is what makes an agent usable for real go-to-market work.

## Key Insights
- **From tasks to outcomes.** A 2025 product, Sculptor, did single tasks well (such as finding phone numbers for a list) but not multi-step goals like launching an outbound campaign. The new agent, called Clay, is the "front door" of the product: a full-screen text box that creates artifacts (workflows, audience segments) and schedules follow-up checks. Jeff rates Sculptor about 3 of 10 on delegating results and the new agent about 7 of 10.
- **Why a coding agent.** Bash is Turing complete, so agents write 100-plus-line scripts with loops and conditionals chaining CLI commands, which Jeff says he would not type himself. Customers had already begun using Claude Code for go-to-market work, which pushed Clay to open a CLI and rework campaigns, workflows and audiences to be agent-friendly over about six months.
- **Training experiment.** Clay tried post-training its own model; results approached Sonnet or Opus level but were not a step change, so the lesson was to squeeze more from simple engineering.
- **Pi base.** The agent was built on the open-source Pi coding agent as a plugin rather than a fork, chosen for being lighter, more extensible and cheaper in latency and cost than heavier tools. It runs about 20 skills and 8 to 10 tools, with 85 percent or more of calls being bash and roughly 5 percent reads and writes.
- **Why own the agent.** Parity between the internal agent and the CLI means improvements flow to external agents too. A first-party agent allows event-triggered orchestration (react quickly when a prospect replies), cost control over fleets of sub-agents where good and bad designs differ by orders of magnitude, and pre-loading skills instead of reading skill files, which he says is less slow.
- **Durability.** Agents run 30 minutes or more, so they were built to survive host failures and deployments, using BullMQ as the job queue.
- **Search DSL.** Clay replaced structured filter output with a SQL-like search query language over about 900 million contacts and 40 million companies, because models know SQL well and long-tail queries failed under the filter approach.
- **Evals.** They moved from capability-level groupings to milestone groupings (alpha, beta) and back toward user-journey groupings; the milestone version was useful for scheduling but its percentages were hard to interpret. Evals run in one environment with a development workspace and fake data, and long multi-turn cases and compaction are hard to simulate.
- **Trace analysis.** Pasting a very long trace into a coding agent and asking what went wrong works badly; asking it first to summarize each bash command works better. He suggests failure-mode clustering with quantification so teams do not fix issues that affect only 2 percent of runs.
- **Memory.** Memory work began before the agent. A company-level Knowledge Center (auto-populated, admin-approved) plus per-user agent memory shared across threads; an update proposing European B2B SaaS as the ideal customer profile appeared about a week after launch. Multiplayer agents in Slack are a high priority.
- **Safety.** The agent runs outside an isolated Firecracker sandbox hosted by Daytona and sends bash commands in. For risky CLI commands an approval tool returns an approval object that the user confirms.
- **Pricing and routing.** He thinks any agent pricing will be wrong and likes charging for tokens as a unit of work. Clay is exploring a post-training model router targeting similar quality at about half the cost.

## Actionable Takeaways
1. Make your product agent-friendly first (CLI plus clear primitives), then build the first-party agent on the same interface.
2. Start from a lightweight open-source coding harness and customize through plugins before considering a fork or fine-tune.
3. Expose a SQL-like query language rather than a custom filter schema when models must query your data.
4. Gate irreversible actions (sending campaigns or emails) through an approval layer rather than prompt rules.
5. Cluster failure modes in traces and quantify them before choosing which changes to invest in.
6. Require admin approval for automatic memory updates at first.

## Notable Quotes
> "I don't think there's any secret ingredient here." — Jeff Bargh

> "I think there's something quite nice about charging for tokens." — Jeff Bargh

> "Bash is a Turing complete language." — Jeff Bargh

---

*Related: `@protocol/memento` · `@content/youtube/yifan-bth/openai-codex-revolutionary-workflow-or-200-mistake` · `@content/youtube/yifan-bth/windsurf-vs-cursor-in-depth-ai-code-editor-comparison` · `@content/youtube/starter-story/why-i-ditched-subscriptions-for-a-lifetime-deal-100k-challenge` · `@content/youtube/nate-herk/how-anthropic-engineers-actually-prompt-fable-5`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*