Teaching AI Agents to Master Spreadsheets
Nuno Campos of Witan Labs discusses teaching AI agents to master spreadsheets using a REPL approach, improving accuracy and efficiency.
6 min read

Visual TL;DR
Focus on structured interaction for AI spreadsheet mastery
From the article 3 mentionsThe Witan Labs team iterated on their approach, changing tools four times over four months, yet found that "domain knowledge improved results on every one of them." This underscored the critical role of understanding the specific domain, in this case, financial analysis, in guiding the AI's interactions with the spreadsheet.
LLMs see spreadsheets as flat data, not structured tables
From the article 9+ mentionsNuno Campos, CTO & Co-Founder of Witan Labs, delivered a compelling presentation on "Teaching Coding Agents to do Spreadsheets" at AI Engineer Europe.
Humans grasp tables/summaries, AI lacks inherent structural understanding
From the article 2 mentionsCampos highlighted the fundamental difference in how humans and AI agents perceive spreadsheets.
Interactive execution environment for AI agents
From the article 5 mentionsA significant breakthrough came with the adoption of a persistent Node.js REPL (Read-Eval-Print Loop) combined with a spreadsheet API.
REPL enables better calculation and data identification
From the article 2 mentionsThis not only simplified the agent's workflow but also improved its ability to reason about the interdependencies between different parts of the spreadsheet.
Faster and more reliable spreadsheet task completion
Insights for teaching AI agents complex data tasks
From the articleThe insights gained from this process, particularly the value of REPLs and domain knowledge, offer valuable lessons for the broader AI development community.
© 2026 StartupHub.ai. All rights reserved. Do not enter, scrape, copy, reproduce, or republish this article in whole or in part. Use as input to AI training, fine-tuning, retrieval-augmented generation, or any machine-learning system is prohibited without written license. Substantially-similar derivative works will be pursued to the fullest extent of applicable copyright, database, and computer-misuse laws. See our terms.

