explaingit

jigyasa-grover/startup-on-a-shoestring

Analysis updated 2026-05-18

1HTMLAudience · developerComplexity · 3/5Setup · moderate

TLDR

A demo that enforces strict AI token and cost budgets using Google Antigravity SDK hooks, shown as an agent trying to build a landing page on a 50-cent budget with automatic policy adjustments.

Mindmap

mindmap
  root((Startup on a Shoestring))
    What it does
      Enforces token budget
      Policy adjustments
      Halts on overspend
    Budget policies
      Context pruning 50pct
      Temperature zero 80pct
      Thinking limit 80pct
      Kill switch 100pct
    Dashboard
      Real-time metrics
      Two demo modes
      FastAPI and SSE
    Tech
      Python
      Antigravity SDK
      Gemini model
      FastAPI
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Watch an AI agent attempt to build a landing page under a strict 50-cent token budget, with automatic policy adjustments as the budget depletes.

USE CASE 2

Trigger the kill-switch demo with a 1000-token limit to see the budget guardrail halt the agent mid-build in real time.

USE CASE 3

Use budget_monitor.py as a reference for adding cost caps and lifecycle hooks to your own Google Antigravity SDK agent workflows.

USE CASE 4

Monitor per-turn token deltas, cumulative costs, latency, and runway estimates via a real-time FastAPI dashboard.

What is it built with?

PythonFastAPIGoogle Antigravity SDKGeminiHTML

How does it compare?

jigyasa-grover/startup-on-a-shoestringatypical-chai/motion-graphics-from-css-hyperframescrossrobertj/ninmidi
Stars111
LanguageHTMLHTMLHTML
Setup difficultymoderatehardeasy
Complexity3/53/51/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

The mock simulation runs without an API key, the live agent mode requires a GEMINI_API_KEY or Vertex AI credentials.

In plain English

Startup on a Shoestring is a Python demo that shows how to enforce strict cost and token budgets on an AI agent, framed as the challenge of building an MVP landing page with only fifty cents to spend. The core of the project is a budget monitor built on the Google Antigravity SDK that intercepts the agent's execution at each step and shuts it down before it overspends. The monitor plugs into lifecycle hooks provided by the SDK. Before each turn, it checks whether the cumulative spend has crossed a threshold and blocks execution if it has. After each tool call, it records what the agent produced and updates the running cost tally. Four policy rules engage automatically as the budget gets used up: at 50% spend, older conversation history gets trimmed to avoid the context growing too large, at 80%, temperature is forced to zero to stop creative reasoning loops, also at 80%, the model's reasoning budget gets restricted to conserve the final fraction of the allowance, and at 100%, execution halts immediately with an error. Costs are calculated in real time using Gemini pricing. The monitor tracks per-turn usage (the delta between this turn's total and the last checkpoint) as well as the cumulative total across the whole session. It also measures turn latency, tokens per second, and a runway estimator showing how many tokens remain. A FastAPI web dashboard shows all of this updating in real time. You can run two simulation modes from the dashboard: one with a 2500-token limit where the agent successfully ships a landing page, and one with a 1000-token limit where the budget guardrail triggers mid-build and locks the screen with an error overlay. A live mode requires a Gemini API key and connects to a real model. The project includes a detailed tutorial document alongside the code explaining the architecture and the design decisions behind the budget policy system.

Copy-paste prompts

Prompt 1
I want to add a fifth budget policy to the startup-on-a-shoestring monitor that reduces max output tokens at 90% spend. Walk me through the policy registry structure in budget_monitor.py.
Prompt 2
How does the ContextPruningPolicy decide which conversation turns to remove, and how does it avoid removing the system instruction?
Prompt 3
I want to adapt this budget monitor to work with a different AI provider instead of Gemini. Which parts of budget_monitor.py are Gemini-specific and what would I need to replace?

Frequently asked questions

What is startup-on-a-shoestring?

A demo that enforces strict AI token and cost budgets using Google Antigravity SDK hooks, shown as an agent trying to build a landing page on a 50-cent budget with automatic policy adjustments.

What language is startup-on-a-shoestring written in?

Mainly HTML. The stack also includes Python, FastAPI, Google Antigravity SDK.

How hard is startup-on-a-shoestring to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is startup-on-a-shoestring for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub jigyasa-grover on gitmyhub

Verify against the repo before relying on details.