If you've ever tried using an LLM to build a financial model or a complex spreadsheet, you know the pain: they almost always hallucinate the math, create circular references, or silently break formulas.
LLMs are incredible at reasoning and structuring data, but they shouldn't be trusted with strict arithmetic. I wanted a workflow I could actually trust, so I built GridOS and open-sourced the core engine.
The Architecture: Separating Reasoning from Math
GridOS acts as a deterministic spreadsheet kernel. Here is how it splits the workload:
The Reasoning: You connect your preferred LLM (Bring Your Own Key for Gemini, Claude, Groq, etc.). The LLM handles the intent, routing, and structuring.
The Guardrail: The AI is physically blocked from writing directly to the cells.
The Execution: Every response goes through a preview step that is collision-checked, lock-aware, and guarded by a strict Python AST (Abstract Syntax Tree) backend. The deterministic Python kernel executes the actual arithmetic.
The Review: You preview the math before hitting "Apply."
Extensibility
The core is MIT licensed. It includes a drop-in plugin system—you can drop a Python script into a plugins/ folder to register custom formulas locally (like fetching live stock prices or internal database metrics).
You can clone the repo and run uvicorn main:app --reload to get a working, isolated local workbook in under 2 minutes.
Try it out (and try to break it)
I'm currently stress-testing the AST parser to see what edge cases break the engine.
GitHub Repo: https://github.com/shreydevkar/gridos_kernel
Live Beta: https://gridos.onrender.com
Architecture Docs: https://gridos.mintlify.app
If anyone wants to spin it up locally and try to break it, or contribute to the plugin system, PRs are incredibly welcome! Let me know what you think of the architecture in the comments
Top comments (0)