Sina Bolouri

Project

AgentBudget Lab

A planning workspace for estimating, comparing, and optimizing the cost, latency, and budget risk of multi-step AI workflows before deployment.

deployedNext.js 16React 19TypeScriptTailwind CSS 4Supabase/PostgreSQLZodRechartsUpstash Redis optionalGemini/OpenRouter optionalVercelVitest
Visit ProjectGitHub

AgentBudget Lab

AgentBudget Lab helps builders model AI agents, RAG pipelines, evaluation loops, embedding systems, and other multi-step LLM workflows before token usage becomes a production bill. It turns editable workload assumptions into explainable cost, latency, budget-risk, and optimization estimates; it does not claim to predict exact provider invoices.

Problem

AI workflow costs are difficult to reason about because they combine multiple model calls, input and output tokens, retries, caching, fixed charges, request volume, and latency. A simple token calculator does not show which step drives cost, how operational assumptions compound, or what changes could reduce spend without creating an unacceptable quality trade-off.

Solution

The application models a workflow as ordered steps with model, token, call-count, retry, cache, quality, and latency assumptions. A pure TypeScript estimation engine computes per-step and workflow totals, a 0-100 budget-risk score, cost-driver findings, optimization recommendations, and baseline-versus-scenario comparisons. The deterministic engine remains available without AI credentials. Optional Gemini or OpenRouter calls can structure a natural-language workflow description or explain an estimate, but their output is schema-validated and falls back safely.

User Experience

Anonymous visitors can build one browser-local demo workflow, edit its steps, run estimates, inspect cost drivers, create a what-if scenario, and compare results without an account or AI key. Authenticated users can save workflows, scenarios, estimates, custom model prices, optimization states, and report previews through Supabase. Sample workflow and budget pages provide computed examples. Dark/light themes and responsive app navigation are implemented.

Current Status

Status: deployed. The public application is available at https://agentbudget.sinabolouri.com, which returned HTTPS 200 from Vercel during the 2026-09-22 review. The deterministic demo and source implementation are complete MVP features. Production authentication, hosted database behavior, optional provider credentials, real-user usage, and operational metrics were not independently exercised during this portfolio extraction and remain Unknown.

Tech Stack

  • Frontend: Next.js 16 App Router, React 19, TypeScript, Tailwind CSS 4, Base UI/shadcn components, lucide-react, next-themes, React Hook Form, and Recharts.
  • Backend: Next.js Route Handlers, Zod validation, and pure TypeScript estimation modules.
  • Database and auth: Supabase Auth and PostgreSQL with row-level security; localStorage for the anonymous demo.
  • Optional services: Gemini or OpenRouter for structured assistance and Upstash Redis for additional rate limiting.
  • Hosting and quality: Vercel, ESLint, TypeScript, and Vitest.