Key Takeaways

  • Clay originally built Sculptor as an Anthropic Claude 3.5 Sonnet tool loop, but discrete JSON function definitions broke down as data workflows expanded beyond single columns.
  • Frontier models perform far better inside terminal environments because labs spend hundreds of millions training them on bash execution, Python scripts, and error logs.
  • Clay discarded its custom tool loop, released a public CLI, and rebuilt Sculptor on top of Pi so the agent can write and run scripts in a sandbox.
  • Moving to a coding agent architecture turns complex multi-step data operations into inspectable code instead of fragile chains of proprietary API calls.

The Method

When Clay first launched Sculptor to help users construct outbound sales pipelines, the team relied on standard function calling. They hooked Claude 3.5 Sonnet to an agent loop with discrete tools designed to query, create, and modify tables.

“Sculptor ended up being, you know, we had a bunch of different tool interfaces to, you know, access, read, update the clay platform and we basically gave it to a model in a loop and, you know, we spent a lot of time on sort of system prop optimization and tool definition optimization,” (play from 22:14) Jeff Barg said.

The setup worked for simple requests like adding an enrichment column. But the moment a customer asked Sculptor to coordinate a sequence across multiple data sources, the tool loop stalled. The model struggled to track state across dozens of discrete API calls, hallucinated arguments, and bloated the context window.

Clay stopped tuning system prompts and changed the execution model entirely. They realized that frontier lab post-training concentrates heavily on software engineering benchmarks. Frontier models are trained to write syntax, run shell scripts, read stack traces, and debug their own errors.

“It turns out coding agents are really good like the models are really good at you know operating in coding agents,” (play from 24:55) Barg explained. “The coding agents are really good at using things like bash or using things like Python to actually write scripts and do things.” (play from 25:00)

Instead of exposing custom API tools through prompt schemas, Clay launched a public command-line interface. Then they rebuilt Sculptor as an autonomous coding agent on top of Pi, a lightweight agent scaffolding. “Our agent harness is built on top of Pi and so you know we're starting with Pi and you know it's it's somewhat more you know built out and customized on top of it,” (play from 53:58) Barg said.

Now, “Sculptor is the thing that's actually building those workflows to you know coordinate these clients together.” (play from 21:25) Instead of firing off six separate tool calls that might fail halfway through, the agent sits in a secure sandbox, writes a Python script that talks to the Clay CLI, executes it, inspects the terminal output, and fixes any errors before showing the user the result.

Where This Breaks Down

Turning your product into a coding agent requires real engineering investment in sandboxing. If an agent executes arbitrary Python and bash, you have to run isolated virtual machines or containers with strict network isolation, quick cold starts, and per-tenant access controls. That infrastructure costs money and adds operational overhead that simple API tool loops avoid.

This setup also shifts latency. A quick tool call returns in milliseconds; booting an environment, running a script, and inspecting standard output can take seconds. For quick, one-click interface updates, a terminal-based coding agent is excessive. It shines on high-context, multi-step pipeline creation, not low-latency autocomplete.

What to Do With This

Look at your product's agent architecture this week. If you are maintaining more than four custom tool definitions in a system prompt, stop rewriting the descriptions. Package your internal API as a simple command-line binary, spin up a secure execution sandbox, and let the model write Python scripts against that CLI instead.