Skip to content

DATABRICKS 2026-07-28

Read original ↗

How Databricks manages its own coding agent spend with Unity AI Gateway Budgets

Summary

Databricks shares how they manage internal coding agent spend (Claude Code, Codex, Cursor, Gemini CLI) using Unity AI Gateway Budgets. The core insight: a single monthly spend limit creates friction for normal users while failing to catch runaway automation. They split the problem into two distinct budgets — a small daily limit for runaway protection (self-serve acknowledgment to unblock) and a high monthly limit for extraordinary spend (manager approval, time-limited). Both budgets are enforced through one control point (Unity AI Gateway) because all agent traffic routes through it regardless of tool or model.

Key takeaways

  1. Single limits fail at two jobs. A monthly cap set low enough to catch runaway automation constantly interrupts legitimate heavy users. At Databricks' scale, 500–1,000 engineers hit the limit monthly, generating hundreds of tickets and interrupted work sessions.

  2. Dual-budget architecture separates concerns. A daily "runaway" budget catches short-term waste (accidental automation loops); a monthly budget governs long-term extraordinary spend. The two are coupled via a fixed ratio — smooth monthly spend never trips the daily limit.

  3. Effective limit = min(monthly_max, month_to_date + daily_increment). At any moment, a user is capped at whichever limit is lower. This formula determines which unblock path applies.

  4. Self-serve acknowledgment replaces approval queues. When daily limit is hit, users get a Slack notification with context and a single button to acknowledge intentional spend. No cap on daily acknowledgments. The key insight: an unattended automation loop cannot click a Slack button.

  5. Proactive promotion avoids blocking. At ~90% of daily limit, users become eligible for a raise before being blocked. A scheduled job also promotes users proactively when spend approaches their ceiling (at most once/day).

  6. Tiered overrides, not arbitrary limits. Both budgets use fixed tiers implemented as gateway group membership, not floating per-user values. Daily tiers auto-promote on acknowledgment, auto-reset monthly. Monthly tiers require manager approval, are time-scoped to a project, then revert.

  7. Single control point is the architectural prerequisite. All agent traffic (Claude, GPT, Gemini, open-source models) flows through Unity AI Gateway with user-identity attribution. Without this, a single budget policy across all tools would be unenforceable.

  8. Observability for free via Unity Catalog. Usage data lands in Lakehouse tables — same place their internal coding agent benchmark data lives. Managers see team-level spend; finance sees one bill.

  9. Principles-first design. Two explicit principles drove the architecture: (a) allow engineers to spend unimpeded by default, (b) intervene only for short-term waste (accidental) and long-term waste (inefficient technique).

  10. Result: interrupt queue eliminated. Under the new model, only a handful of heaviest users hit the daily limit monthly, each resolved with a single acknowledgment click. Monthly limit increases went from recurring chores to rare project-scoped decisions.

Operational numbers

Metric Value
Engineers using coding agents daily Thousands
Engineers hitting old monthly limit per month 500–1,000
Daily limit reset Every evening at lowest-usage hour + full reset at month start
Monthly tiers ~4 (base, 2×, 5×, effectively unlimited)
Monthly tier duration 1, 3, or 6 months (project-scoped)
Proactive promotion frequency At most once/day
Pre-block notification threshold ~90% of daily limit

Architecture

┌─────────────────────────────────────────────────────┐
│  Engineer (Claude Code / Codex / Cursor / Gemini)   │
└─────────────────────┬───────────────────────────────┘
                      │ every request
┌─────────────────────────────────────────────────────┐
│         Unity AI Gateway (single control point)      │
│  ┌───────────────┐  ┌────────────────────────────┐  │
│  │ User Identity │  │ Budget Enforcement Engine   │  │
│  │ Attribution   │  │  • Daily budget (runaway)   │  │
│  └───────────────┘  │  • Monthly budget (cap)     │  │
│                     │  • Effective = min(both)    │  │
│                     └────────────────────────────┘  │
│  ┌───────────────────────────────────────────────┐  │
│  │ Tier Groups (daily tiers + monthly tiers)     │  │
│  │  • Auto-promote daily on ack / proactive      │  │
│  │  • Manager-approve monthly, time-limited      │  │
│  └───────────────────────────────────────────────┘  │
└─────────────────────┬───────────────────────────────┘
                      │ usage data
┌─────────────────────────────────────────────────────┐
│  Unity Catalog (Lakehouse tables)                    │
│  • Team spend dashboards                             │
│  • Finance single-bill view                          │
│  • Coding agent benchmarks                           │
└─────────────────────────────────────────────────────┘

Caveats

  • Dollar figures in the post are illustrative, not actual Databricks internal numbers.
  • The post does not disclose the exact daily/monthly ratio or increment sizes.
  • Model routing (efficient model for routine tasks, frontier for complex) is cited as future work to reduce the need for high limits in the first place.

Source

Last updated · 602 distilled / 1,824 read