Inspiration
Most people who need answers from a spreadsheet can't write code, and most "chat with your data" tools return whatever the model produces on the first try, right or wrong. We wanted something different: an agent that treats its own output the way a careful analyst would, checking the result and rewriting the code when something looks broken, instead of handing back a confident guess.
What it does
Upload any CSV, no schema setup or cleaning required. Ask a question in plain English, the same way you'd ask a colleague. The agent writes pandas code, runs it in a sandboxed process, and if the code fails or the result comes back empty, it rewrites the code and tries again, up to three times, before honestly reporting that it couldn't find a reliable answer.
Once it has a real result, it explains the answer in plain English, picks the right chart type on its own (line, bar, pie, or no chart at all), and lets you open the exact code it ran if you want to verify the work yourself.
How we built it
The agent runs on the Strands Agents SDK, using Gemini as the model provider. It has exactly one tool, run_analysis_code, and Strands' own tool-calling loop drives the plan → act → observe → retry cycle. That loop is what makes the self-correction a real agentic behavior instead of a hardcoded retry wrapper.
The backend is FastAPI, sitting between the website and the agent, with a static AST check, a restricted builtins allowlist, and OS-level process isolation around every piece of agent-written code. The frontend is Next.js and Tailwind, designed screen-by-screen in Figma first, including edge-case states like empty results and failures.
Frontend: Vercel. Backend: Render. Both run on free tiers.
Challenges we ran into
Render's free tier fully sleeps after inactivity, and waking it back up can take 30-60 seconds. Early on, that surfaced to users as a bare "Failed to fetch" with no explanation, because the request was failing at the network level before it ever reached our own error handling. We fixed it with retry-with-backoff on every request, a background ping to wake the backend as soon as the page loads, and a clear "waking up the server" message so the wait is explained instead of looking broken.
We also caught the agent fabricating a placeholder "success" result during testing instead of honestly reporting failure, a much worse failure mode than an error message, and one we explicitly instructed against after finding it live.
Accomplishments that we're proud of
A genuinely self-correcting agent, not a single LLM call with a nicer UI around it, verified live against a real-world, non-UTF-8 dataset it had never seen before. The whole thing runs at zero cost, on free-tier infrastructure end to end.
What we learned
That the retry loop itself, not the chart or the explanation, is the actual product. Most competitors in this space return the first answer an LLM produces. Building the verification step in as a first-class part of the architecture, rather than bolting it on, changed the whole design of the backend.
What's next for DataAgent
Swapping in Amazon Bedrock as an alternative model provider (the model call is isolated to one file by design), replacing in-memory sessions with persistent storage, and adding scatter plots and multi-file joins for richer questions.
Built With
- fastapi
- figma
- gemini
- nextjs
- pandas
- python
- recharts
- render
- strands-agents-sdk
- tailwindcss
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.