All work 04 / 08 · Dockyard

One gateway for every model.

Dockyard is an internal AI platform — orchestration, prompt management, budgets, governance, a playground and observability — so product teams ship AI features without each rebuilding the plumbing.

Role
Platform architect & lead engineer
Timeline
2024 — 2025
Stack
FastAPI · Postgres · Redis · Multi-provider LLMs · OTel
Status
Internal production

01Problem

Five teams, five OpenAI keys, five retry implementations, zero visibility. Prompts lived in code, spend lived in surprise invoices, and every incident began with "which team's integration is this?" AI adoption was outpacing AI governance by quarters.

02Design

The platform bet: make the governed path the easiest path. One SDK call gets routing, retries, fallbacks, caching, budget enforcement and tracing — doing it yourself becomes the expensive option. Prompts are versioned artifacts with owners and rollout stages, not string literals. The playground runs against the same gateway as production, so what you test is what ships.

03Architecture

TEAM APPS ONE SDK GATEWAY AUTH · BUDGETS ROUTER COST · FALLBACK PROVIDER A · B · C HOSTED + SELF-HOSTED RAG SERVICE SHARED INDEXES PROMPT REGISTRY VERSIONED · STAGED TRACES OTEL · EVALS

04Engineering

  • Budgets that degrade gracefully. Teams hitting limits fall back to cheaper models with a warning — features slow down before they black out.
  • Prompt lifecycle. Draft → staged → production, with diffs, owners and instant rollback. A prompt change is a deploy, and it's treated like one.
  • Trace-per-request. Every call carries prompt version, route, tokens, latency and cost through OpenTelemetry — incidents start with evidence, not archaeology.
  • Provider abstraction that leaks on purpose. Teams can pin models when they need to; the platform routes when they don't care. Escape hatches kept adoption voluntary — and total.

05Impact

1
Gateway for all AI traffic
Per-team
Budgets, enforced at the edge
100%
Of calls traced, prompt-versioned

06Lessons

Internal platforms live or die on the default path. Nobody was forced onto Dockyard; it won because the governed way was also the lazy way. That's the whole trick, and it's harder than it sounds.