# Inside Clay’s GTM agent rebuild <!-- ref: @content/youtube/langchain/2026-11-19-inside-clay-s-gtm-agent-rebuild tags: [coding agents, go-to-market, agent harness, CLI design, durability, sandboxes, memory, evals, pricing, model routing] version: 2 updated_at: 2026-11-21T06:25:41.708Z --> **[Watch on YouTube](https://www.youtube.com/watch?v=efBlbQahwng)** *Synthesized from Jeff Bargh, head of AI at Clay, in conversation with the host of the Max Agency podcast on LangChain, 2026-11-19.* Jeff Bargh is head of AI at Clay, a go-to-market platform. He is interviewed on LangChain's Max Agency podcast by a host whose name is not stated in the transcript. ## Core Thesis Jeff Bargh argues that Clay's new agent, called Clay, works best when built around a general-purpose coding agent (bash plus a CLI) instead of a bespoke tool-calling harness. Clay's earlier agent, Sculptor, handled single tasks well but could not own go-to-market outcomes. Most of the gain came from simple harness engineering, agent-friendly platform primitives, safety design and cost control, not from fine-tuning or a secret technique. ## Key Insights - **Result-oriented versus task-oriented.** Sculptor, launched in 2025, could do individual jobs such as finding phone numbers for a list. It could not run a multi-step objective such as launching an outbound campaign: identify best-fit customers, build the list, create the campaign, and follow up. That work touches five or six parts of Clay. Jeff rates Sculptor about 3/10 on delegating outcomes and the new agent about 7/10. - **UX.** The Clay home screen is becoming a large text box, with the resource list shrinking. The agent creates "artifacts" (workflows, audience segments and so on), threads group them together, and it schedules follow-up runs to check results. Clay deliberately did not go fully proactive and "behind the scenes". It stays task-oriented, with budgets (for example, spend this many credits) and permissions. The long-term model is a RevOps team: a shared task list that agents add to and pick from. - **Open Claw influence.** Account Agents, launched early summer, are background agents that suggest next-best actions per account. - **Agent-friendly primitives came first.** Clay spent about six months making campaigns, workflows and audiences usable by agents, then shipped a CLI in the summer. Jeff was surprised by how much go-to-market and RevOps teams liked the CLI. The first-party agent uses that same CLI, so the evals built for the agent feed back into the CLI. - **Why still build a first-party agent.** - It enables in-product features such as artifacts, switching between manual and agent creation, and resource-level budgeting. - It supports event-driven orchestration, such as reacting to a campaign reply immediately. - It allows cost control: the difference between a good and bad outbound design (research, qualify and write copy per lead) can span several orders of magnitude. - It allows custom memory, and latency tuning such as preloading skills into the system prompt instead of reading skill files. Users report that the CLI inside Claude Code works but is slow. - **Why a coding agent.** Bash is Turing complete. Agents write 100+ line bash commands with conditionals and loops that an engineer would not type by hand. Clay trained its own model at the end of last year and saw it approach Sonnet or Opus performance, but not a step-function gain. The lesson was that simple harness engineering gave the headroom. - **Search DSL.** Clay replaced a structured-filter output with a SQL-like search query language over about 900 million contacts and 40 million companies. Filters handled simple cases but not long-tail queries. Models know SQL, and SQL is composable and modular. - **Harness stack.** Clay started from the open-source coding agent Pi, chosen for being lighter and cheaper than Claude Code or Codex. It builds mostly through the plugin system and has not forked it. Jeff says he sometimes prefers Pi to Codex for coding, which weakens the argument that labs will always have the best harness for their own models. The agent has about 20 skills and roughly 8–10 tools. Over 85% of tool calls are bash and about 5% are read/write. It also writes Python files and bash scripts and post-processes CLI output. - **Plugins** cover UX integration (for example navigating to an artifact as a workflow is built) and deterministic permissions and approvals. - **Durability.** Agent runs of 30+ minutes must survive host failures and deploys. Clay built durability on BullMQ, which also underpins many of its other high-scale agents. - **Sandbox and security.** The agent runs outside the sandbox. Only bash and read commands execute in an isolated Firecracker sandbox, provided by Daytona. Clay wanted full parity with coding agents, so it chose a real sandbox over emulators such as QuickJS-based ones. Provider choice depends mainly on which security team you trust most, with price secondary. - **Approvals.** Some CLI commands, such as sending a campaign or real emails, need human approval. - The bash tool can return an approval object to the agent, which presents it to the user. The approval tool then unlocks the action. - Clay did not adopt suspend-and-resume of bash with elevated privileges, finding code-mode solutions too early. - If the command fails, control falls back to the agent to retry. - Parsing hundreds of lines of bash to know which CLI commands will run is a real technical challenge. - **Memory.** Clay thought about memory before the agent. A Knowledge Center is a wiki-like, auto-populated company profile that admins must approve updates to. Within about a week of launch it proposed an ICP update (European B2B SaaS), reflecting expansion to Europe that historical data would not have implied. There is also agent-level memory scoped to a user and shared across their threads. A process promotes user memories into workspace-level knowledge. The team started conservatively because many people have had bad experiences with agent memory. - **Multiplayer.** This is a high priority: shared context in Slack or iMessage, with a single "Clay in the world" persona and per-user permissions. Jeff's favorite design question for his designers is what the agent would look like if it lived in Slack. - **Evals.** They evolved from capability suites (create, run, edit campaigns), to orchestration-level milestone suites (alpha, beta, conference launch), to user-journey suites such as inbound lead routing. The milestone suites were useful for launch confidence but the metrics (for example "80%") were nearly meaningless. Evals deploy a dev Clay workspace with fake data. Gaps remain in simulated users, long conversations, compaction, and long-horizon workflow editing. - **Production monitoring.** The agent had been live about three weeks, with a gap between intended and actual use. Clay combines trace review, customer conversations and online-eval categorization. LangSmith's Engine flags real issues with little noise. Dropping a huge trace into a coding agent and asking what went wrong works badly, though first summarizing each bash command works much better. Jeff wants failure-mode clustering with quantification (for example, workflow creation fails 20% of the time, mostly at validation) so teams do not chase changes that affect 2% of runs. - **Fine-tuning.** Two goals: peak performance in a narrow domain (Harvey's approach), or cost reduction on a well-defined, saturated problem (Opus-level quality at Haiku-level prices). Jeff thinks the second is easier. Clay is starting with a model router, built on its own evals of what users do, aiming for similar quality at about 50% of the cost. An auto mode is coming. Routing should avoid mid-conversation model switches that cause cache misses. - **Pricing.** Jeff thinks any chosen pricing will be wrong, either too cheap or too expensive, and aims for too cheap relative to results. He does not plan to charge per outcome. He prefers token-based pricing as a proxy for units of work, so customers keep the upside. - **Obstacles to an autonomous growth agent.** Growth needs ideas from people on the ground and is partly a choice about what company to build. Single-metric optimization such as ARR is risky, and the agent needs guardrails and judgment about when to persist. Jeff is optimistic about vertical companies using skills on top of models, not waiting for a future model like GPT-7. Infrastructure and harness are becoming more tightly coupled through files, orchestration and planning. ## Actionable Takeaways 1. Make your product agent-friendly first: expose campaigns, workflows and audiences through a CLI. Have your own agent use the same CLI so first-party evals improve the external interface. 2. Start from a lightweight, extensible coding-agent harness such as Pi and extend it by plugin instead of forking. Give the agent bash, a small read/write toolset (roughly 8–10 tools) and about 20 skills. 3. If your domain has a bespoke query model, replace it with a SQL-like DSL so models can generate long-tail queries. 4. Run agents outside the sandbox and execute only bash and read commands inside an isolated sandbox. Clay uses Firecracker via Daytona. 5. Put an approval layer on top of the CLI so the bash tool returns an approval object for risky actions, such as sending emails. Let the agent re-invoke after approval. 6. Use a durable job system (Clay uses BullMQ) so 30+ minute runs survive deploys and host failures. 7. Make memory conservative at first: admin-approved company-level updates plus a per-user read/write agent memory. 8. Organize evals around user journeys, and treat milestone percentages cautiously. Add simulated users and long-conversation tests for compaction. 9. Cluster failure modes and quantify them before investing in big changes. Summarize bash commands before asking a model to analyze a long trace. 10. Once you know what users do, build a model router to cut cost, targeting similar quality at about 50% of the cost. Price on tokens as a unit of work. ## Notable Quotes > "I don't think there's any secret ingredient here." — Jeff Bargh > "I think whatever pricing structure we choose for this agent will be wrong." — Jeff Bargh > "There's a lot of juice we can squeeze out of simple engineering." — Jeff Bargh > "We actually started thinking about the memory part before we started thinking about the agent part." — Jeff Bargh --- *Related: `@content/web/huggingface/2026-11-23-cua-see-self-evolving-evals` · `@protocol/memento` · `@content/youtube/yifan-bth/openai-codex-revolutionary-workflow-or-200-mistake` · `@content/youtube/yifan-bth/claude-code-beat-cursor-4-2-heres-why-im-still-using-both` · `@content/youtube/yifan-bth/windsurf-vs-cursor-in-depth-ai-code-editor-comparison`* --- *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).*