Uber’s AI infra, from the inside

The Pragmatic Engineer • • 1h34 → 4 min • #107
Uber’s AI infra, from the inside
Watch on YouTube

Summary

  • This episode provides an inside look at how Uber’s engineering organization has evolved its internal developer tooling from pre-AI foundations to a comprehensive AI-native development platform, as explained by Udai Kira Mendesi, a 10-year Uber veteran who now leads agentic AI initiatives across the company.

Uber’s engineering evolution and pre-AI foundations

  • Uber grew from ~600 engineers in 2015 to thousands across 12 global tech sites, while consolidating from thousands of microservices to ~4,500-5,000 well-sized services despite 10x business growth.
  • Early scaling challenges forced Uber to build custom infrastructure because off-the-shelf solutions couldn’t handle their scale, city-based sharding, and two/three-sided marketplace complexity.
  • RT API / Edge Gateway: Unified mobile protocol (replacing 4-second polling with push), abstracts internal services, handles highest QPS traffic, rewritten in Go.
  • M3DB: Custom metrics database built ~2015-2016 to handle 500M+ metrics/second with high cardinality; later open-sourced and spawned companies.
  • Michelangelo: End-to-end ML platform for hundreds of models (feature engineering, training, serving, monitoring); recently open-sourced deep learning components.
  • Cadence: Durable workflow engine for multi-day workflows (driver onboarding, CRM campaigns); inspired Temporal.
  • Morpheus: Integrated experimentation/feature flag platform with city-level granularity, switchback experiments, auto-generated analysis.
  • Dev Pods (2017): Cloud developer environments per monorepo (Go, Java, iOS, Android) with pre-warmed build caches, standardized Bazel builds; later unified into “mega dev pod” for cross-repo agent work.
  • You Own: Service ownership registry for on-call routing and asset accountability.
  • Jäger (Jaeger): Distributed tracing with baggage propagation enabling request routing across service mesh — foundation for later testing tools.

AI foundations: model- and harness-agnostic building blocks

  • Model Gateway (late 2023): Single OpenAI/Anthropic-compatible API for all models (open/closed weight) across vendors; built on Michelangelo GenAI foundations; provides security/policy guards, observability, per-project attribution, spend tiers, audit logging, session traces.
  • AI Guard: Middleware in Model Gateway running 5+ fine-tuned safety/policy models on every request/response with strict latency guardrails; enforces consistent baselines across all projects.
  • AIX (AI Foundations): Wrapper around all coding harnesses (Claude Code, Codex, OpenCode) with persona-based default plugins/skills; settings synced across environments; status line shows spend tracking and tips.
  • Spend tiers: Default tier per engineer; manager approval to increase; separate tiers for interactive vs. background agents; cost-check plugin gives personalized efficiency tips.
  • MCP Gateway (April 2025): Single gateway for all tools (internal services + vendor tools like Google/Slack/Jira); auto-generates MCP specs from Thrift/Protobuf IDL registry; LLM-optimized descriptions; CLI projection for token efficiency; no code changes needed to enable.
  • Skills monorepo: Centralized, versioned plugins/skills portable across harnesses; auto-installed via AIX; quality gates and eval pipelines; ~30K skill executions/day; CLI pattern adoption reduced context load significantly.
  • Context Graph (late 2024): Knowledge graph with 100+ node types, 130+ edge types (people, services, PRs, design docs, incidents, tables, queries, on-call, config changes); built by graph platform team; powers “Cortana” AI assistant for cross-org question answering, RCA, health reports; respects existing permissions (break-glass flow).

Current AI-native development workflow

  • Planning: Unified PRD/ERD system with Jira/Linear links; all design docs, approvals, execution tracking in one place; feeds Context Graph.
  • Minion (background coding agent): ~15% of production PRs; accessible via web/Slack; uses mega dev pod for full repo access; plan mode or direct execution; self-validates via web/mobile/backend testing; Slack integration for bug-fix loops in support channels.
  • Self-healing CI / FX Validate: Moved simple CI jobs to inner loop (linters, coverage, build, templates); visual validation via emulators/staging; self-healing CI auto-fixes failures; reduced P50/P90 cycle times.
  • Code Inbox: Unified review dashboard showing AI review results, sanity test screenshots/videos, build checks, risk scores, blast radius; engineers focus review effort where signals indicate risk.
  • Slate (sanity testing): Per-branch staging environments with test-account pinning; routes pinned accounts through service mesh via Jäger baggage to the Slate instance; supports multi-service tests; agents deploy Slate and run AB browser tests with before/after reports.
  • Capri (Capture Replay): Middleware captures production traffic (inbound + all downstream calls) with dimension tagging; generates “MatchGuard” combinatorial test matrix for pre-deploy validation; agents can replay specific sessions on Slate for bug reproduction/fix verification.
  • Edge Gateway reliability: Capture replay for entire service graph; auto-tags required vs optional dependencies; aids both human and agent debugging.
  • Shepherd / Fox (large-scale code maintenance): Shepherd runs deterministic (OpenRewrite) or agentic migrations across monorepo modules as tracked campaigns (e.g., JUnit 4→5); Fox runs weekly automated improvement loops (dead code cleanup, performance, noisy logs) on opted-in services via skill enrollment.
  • Wisdom (employee bug reporting): Dogfood bug capture with full logs/telemetry/network/feature flags; “Debug Assist” agent analyzes for root cause + impact timeline; hands off to Minion for PR creation; device simulation replays exact network responses for reproduction verification.

How engineering work is changing

  • Mental model shift: “Never been this much change to how I work” — hands-on definition evolved from writing code to context engineering, multitasking across agent sessions, rapid verification.
  • New primitives: Context engineering (setting up environment/specs/constraints for agents), multitasking across parallel agent sessions, rapid verification/course-correction, designing systems that automate workflows rather than executing manually.
  • Example — Customer support policy automation: Runbook → policy conversion → API discovery → config → manual evals → continuous evals (weeks) → now: agentic policy generation + synthetic evals + automated config (days).
  • Productivity metrics shifting: From diff velocity to feature velocity; PR tagging by category (feature/bug/maintenance/test/docs) shows feature % rising, maintenance % falling; AI clustering to measure end-to-end P50 feature cycle time by complexity; identifying bottlenecks in PRD/launch/rollout phases.

Why pre-AI platform investment compounds with AI

  • Dev Pods (2017) → reused for Minion cloud agents with zero adaptation.
  • Jäger tracing + service mesh routing → enabled Slate/Capri request pinning and replay.
  • Monorepo + standardized Bazel → agents use same build/test commands via AGENTS.md.
  • Michelangelo → became Model Gateway foundation.
  • API Gateway team → built MCP Gateway in weeks.
  • Graph platform team → built Context Graph on existing billion-node infrastructure.
  • Key insight: Companies with mature pre-AI developer platforms (cloud envs, tracing, standardized build/test, service ownership, experimentation) can retrofit AI agents as tool consumers far more easily than those starting from scratch.
Back to The Pragmatic Engineer