Type =AGENT("...") in any cell. Watch an AI agent fetch live data,
write formulas, style cells, draw charts, and build entire dashboards — autonomously.
This entire comparison was generated from a single prompt. Every bar chart, every score, every styled row — written by an AI agent inside a spreadsheet cell.
git clone https://github.com/arthi-arumugam-git/gnani.git
cd gnani && pnpm install
echo "ANTHROPIC_API_KEY=sk-ant-..." > apps/web/.env.local
pnpm dev # → http://localhost:3000Open a sheet. Type in any cell:
=AGENT("build a sales dashboard with revenue, customers, and churn rate")
The agent writes 50+ styled cells, sizes columns, draws charts, and builds KPI cards — in seconds.
A1: =AGENT("build a sales dashboard with KPI cards, sparkline trends, and progress bars")
dispatching agent...
model: sonnet (auto-detected: complex dashboard)
set_layout → 8 columns, custom row heights
write_cells → 47 cells with styling, charts, card backgrounds
spawning sub-agent → trend charts (rows 17–22)
write_cells → 12 chart cells with column spanning
done — dashboard built in 3.2s
CELLS: 59 | TOOLS: 4 | TOKENS: 1,247 | MODEL: sonnet
B1: =AGENT("what's the weather in tokyo?")
dispatching agent...
model: haiku (auto-detected: simple lookup)
fetch → wttr.in/tokyo?format=j1
done in 0.8s
CELLS: 1 | TOOLS: 1 | TOKENS: 312 | MODEL: haiku
gnani auto-routes to the right model: Haiku for simple lookups (fast, cheap), Sonnet for complex dashboards (powerful, detailed).
The agent has 5 tools it calls autonomously based on your prompt:
| Tool | What it does |
|---|---|
| write_cells | Values, formulas, styles, inline charts, checkboxes, card backgrounds |
| set_layout | Column widths (30–600px), row heights (20–200px) |
| fetch | GET any public API — CoinGecko, weather, Yahoo Finance (SSRF-protected) |
| scrape | Extract web pages as markdown with JS rendering |
| eval_code | Sandboxed JavaScript for data transforms and calculations |
When a prompt is complex, the agent becomes an orchestrator — it spawns sub-agents that each build a section of the sheet in parallel:
=AGENT("build a market research report with crypto prices, tech news, and competitor analysis")
Orchestrator (A1):
set_layout → 8 columns sized for report
write_cells → title bar (row 1)
spawn sub-agent A3: "fetch crypto prices... ZONE: rows 3–9"
spawn sub-agent A11: "scrape tech news... ZONE: rows 11–19"
spawn sub-agent A21: "compare competitors... ZONE: rows 21–30"
Sub-agents inherit the parent's design system automatically.
Result: a cohesive multi-section report — all from one prompt.
gnani is a real spreadsheet, not just an AI wrapper:
| Feature | ||
|---|---|---|
| Formulas | 400+ functions — SUM, VLOOKUP, COUNTIF, IF — full HyperFormula engine | |
| Charts | Sparklines, horizontal bars, vertical bars, donut charts — rendered inside cells | |
| Styling | Bold, italic, colors, font sizes, alignment, column spanning, card backgrounds | |
| Checkboxes | Clickable toggles that work with formulas — perfect for trackers | |
| Streaming | Watch cells appear in real-time as the agent writes | |
| Undo | Full history stack — undo entire agent runs with one keystroke | |
| Export | CSV download (toolbar or Ctrl+Shift+E) |
|
| Paste | Paste from Excel / Google Sheets | |
| Find | Ctrl+F search across all cells |
|
| Freeze | Lock columns while scrolling | |
| Scheduling | =AGENT("price", "every 6h") — cells that auto-refresh |
|
| Templates | 8 built-in: Sales, Habits, Budget, OKR, and more | |
| Auto-save | localStorage persistence — never lose work | |
| Status bar | SUM, AVG, COUNT, MIN, MAX for selected range |
gnani/
├── apps/web/ Next.js 16 · React 19 · Tailwind 4
├── packages/engine/ HyperFormula + AGENT() custom function
├── packages/runner/ LLM orchestration · streaming SSE · smart model routing
├── packages/tools/ fetch · scrape · write_cells · eval_code · set_layout
└── packages/shared/ TypeScript types
| Layer | Technology |
|---|---|
| Formula engine | HyperFormula — 400+ functions, dependency graph |
| Grid | glide-data-grid — Canvas-based, 60fps |
| Frontend | Next.js 16, React 19, Tailwind 4 |
| AI | Vercel AI SDK with tool-use loop |
| Models | Claude Sonnet 4 + Claude Haiku 4.5 — auto-routed by prompt complexity |
| Monorepo | pnpm workspaces + Turborepo |
| Tests | Vitest — 157 tests across engine, runner, and tools |
Node.js
git clone https://github.com/arthi-arumugam-git/gnani.git
cd gnani && pnpm install && pnpm build
echo "ANTHROPIC_API_KEY=sk-ant-..." > apps/web/.env.local
cd apps/web && pnpm startDocker
docker build -t gnani .
docker run -p 3000:3000 -e ANTHROPIC_API_KEY=sk-ant-... gnani| Variable | Required | Default | Description |
|---|---|---|---|
ANTHROPIC_API_KEY |
Yes | — | Your Anthropic API key |
GNANI_SMART_MODEL |
No | claude-sonnet-4-20250514 |
Model for complex dashboards |
GNANI_FAST_MODEL |
No | claude-haiku-4-5-20251001 |
Model for simple lookups |
FIRECRAWL_API_KEY |
No | — | Firecrawl instead of Jina Reader for scraping |
git clone https://github.com/arthi-arumugam-git/gnani.git
cd gnani && pnpm install
pnpm test # 157 tests across 3 packages
pnpm typecheck # type-check all packages
pnpm dev # start dev serverSee CONTRIBUTING.md.
| Concern | Status |
|---|---|
| SSRF protection | DNS validation blocks private IPs |
| Code sandbox | eval_code uses Node.js vm — not a hard security boundary |
| Authentication | None by default — add Supabase / NextAuth for production |
| Rate limiting | None by default — add middleware for production |
| Prompt injection | Agents have internet access — treat output as untrusted |


