Inspiration
AI agents can keep running even when they are stuck in a loop. Normal monitoring tools may show that everything is healthy while the cost continues to grow. We were inspired by a real incident where an AI clarification loop spent $47,000 over 11 days. We wanted to stop waste before it happened, not report it afterward.
What it does
Bursar is a cost governor for AI-agent fleets. Before an agent takes its next step, Bursar checks the cost, available budget, and whether the step is producing useful new information. If an agent keeps repeating itself, Bursar stops funding that session. Other healthy agents using the same API key continue working normally.
How we built it
We built Bursar using Next.js, React, TypeScript, Tailwind CSS, Zustand, Recharts, and Server-Sent Events. The core engine uses deterministic text embeddings to measure novelty and progress without requiring another AI call. We added session-level budgets, trust profiles, live event streaming, an optional OpenAI integration, and optional Supabase persistence. The project also runs completely offline using a deterministic simulation.
Challenges we ran into
The hardest challenge was detecting a loop without stopping useful exploration. A single low-value step does not always mean an agent is stuck. We solved this by checking several consecutive steps and combining two signals: how different the new action is and whether it moves closer to the goal. We also had to ensure that stopping one session never affected other agents sharing the same API key.
Accomplishments that we're proud of
We built a real pre-execution admission engine instead of another monitoring dashboard. Bursar stops the simulated clarification loops at step 48 while the healthy agents continue and complete their work. The governor has very low local processing overhead, works without API keys, and includes automated tests for loop detection, hard budgets, trust decay, and session isolation. We also created a cinematic 58-second demo that controls the live engine.
What we learned
We learned that system health and economic health are different. An AI service can return successful responses while producing no useful progress. We also learned that cost control should happen before commitment, and that budgets must be isolated by session instead of by a shared API key. Simple and explainable signals can be more useful than adding another expensive model call.
What's next for Bursar
Next, we want to connect Bursar to real agent frameworks and model providers. We plan to add durable distributed ledgers, tenant-level policies, signed agent identities, stronger semantic loop detection, and production analytics. We also want to support custom admission rules so teams can control cost, risk, and quality from one place.
Log in or sign up for Devpost to join the conversation.