Engineering brief

Stop Inventing Bad Scripting Languages with Agent Tools

AI Engineer2 min read · saves 17 min

At a glance

Relevance
Practical value
Warnings
None

A single JavaScript REPL with persistent state cut spreadsheet errors by 42 percentage points and eliminated timeouts entirely. The real bottleneck isn't model smarts—it's the interface you give it.

Shows that giving agents a real scripting language with state and feedback loops is the highest-leverage change for structured data tasks.

Summary

The breakthrough was replacing 15 sequential spreadsheet tools with a single JavaScript REPL that maintains state. This lifted accuracy from 50% to 92% on an internal financial analysis benchmark and eliminated timeouts entirely. The REPL let the agent interleave reasoning with shorter scripts, building on previous results rather than chaining many atomic calls.

Earlier attempts—multi-agent architectures, SQL, XML representations—all failed because they were too rigid, lacked context flow, or didn't align with how LLMs reason. The team discovered that when an agent makes many tool calls, it's effectively using a bad scripting language; giving it a real one proved far more efficient and easier to extend.

Equally important were high-fidelity feedback loops: a formula engine and a renderer let the agent verify and correct its work. Without them, the REPL alone would produce unreliable outputs. The verification loop's value increases with model capability, making it a durable investment even as interfaces evolve.

Domain knowledge prompts and deterministic evaluation were crucial supporting practices. The team replaced LLM judges with black-box spreadsheet comparisons where possible, reducing confounded results. And they caution that many apparent model failures are actually infrastructure bugs—teams must inspect traces before blaming the model.

Watch the video

This video is blocked due to your privacy settings. To watch this video, please accept YouTube marketing cookies.

Related breakdowns

Get TL;DW

Too Long; Didn't Watch.

A concise breakdowns of the AI and devtools videos that actually matter for engineering leaders.

Free. Weekly. No hype.

Video and thumbnails remain the property of their respective creators. tldw.news provides editorial analysis, commentary, and discovery links to original content.