Blank white background with no objects or features visible.

Ask TFY: Debug, Analyze, and Act on Everything Happening Inside Your AI Gateway Learn More

TrueFoundryはSeldon AIの買収を発表し、エンタープライズAI向けコントロールプレーンを拡張します。プレスリリース全文はこちら→

From Prototype to Enterprise Production: Extending Andrew Ng's Three Loops

By Boyu Wang

Published: July 29, 2026

In a late-June 2026 letter, Andrew Ng described building a typing-practice app for his daughter over a weekend — the coding agent working on its own for about an hour, even opening a browser repeatedly to check its own work — as the concrete example of his three nested loops for 0-to-1 AI product building: the agentic coding loop (minutes), the developer feedback loop (hours), and the external feedback loop (days to weeks). We wrote about the loops themselves elsewhere — their clocks, failure modes, and the telemetry each needs — in our companion on operating loops at scale. This post is about a different edge of Ng's framing, the one enterprise readers reportedly raised, per an explainx.ai chronicle of the letter: what happens to the outer loop when the product is not a weekend app but an enterprise system. Ng's letter is candid that the external loop is "friends, alpha testers, production with A/B tests." An explainx.ai chronicle reports that enterprise readers argued that, in regulated environments, the external loop should also encompass policy, governance, audit, and accountability, not only consumer experiments. That observation is the seam this post lives in. The three-loop method captures a useful distinction, and it does not stop working at the enterprise door — but the outer loop acquires requirements there that a weekend build never faces, and meeting them is the difference between a prototype that demos and a product that ships inside a company. The back half maps those requirements to documented mechanisms; the candid boundary, as always, is that infrastructure supports the method rather than replacing the judgment at its center.

Source Note and Key Takeaways
Source note. This article extends Andrew Ng’s three-loop framework with TrueFoundry’s enterprise-governance analysis. The reported reaction from enterprise readers is drawn from an explainx.ai chronicle unless a primary social post is linked directly. No endorsement of this analysis or TrueFoundry by Ng, DeepLearning.AI, explainx.ai, or other cited parties is stated or implied. TrueFoundry sells the products discussed below.

Key Takeaways

  • Ng's three loops — inner agentic coding, middle developer feedback, and outer external feedback — survive the enterprise intact; what changes is that the external loop grows a governance dimension: policy, identity, budgets, audit.
  • The inner coding loop that built the demo is unchanged; the environment now demands identity, spend control, data protection, and request-level evidence it never needed.
  • The middle loop becomes evaluation plus staged rollout: gateway telemetry feeding connected evaluators, and virtual-model weights for controlled canaries — scorer and promotion logic remain the team's workflow.
  • Human context remains a development responsibility, while execution-time approval gates can pause sensitive tool calls at consequential steps.
  • Governance is a major part of graduation but not the whole of it — conventional production engineering still applies; the control plane owns the model/tool-traffic layer.

1. The Framework Holds; the Outer Loop Changes at the Door

Start by giving Ng's framing its due, because this post depends on it being correct. The three loops describe something real: the inner agentic loop now writes and verifies code fast enough that the human's job moves up the stack to product decisions (the middle loop), and the whole thing is only as good as the external signal that validates the vision (the outer loop). Ng's weekend app is the perfect illustration precisely because it is small — the outer loop is his daughter using the app and him changing his mind about cat costumes and the parent login flow. Nothing about that is trivial to build, but the outer loop's obligations are light: no one audits the typing app, no compliance owner signs off on it, no auditor asks who approved a change. Now move the identical method into a company. The inner loop is unchanged — the agent still writes and tests code every few minutes. The middle loop is unchanged in shape — a human still steers on an hours cadence. But the outer loop transforms: "ship to users" now means shipping to customers, under policy, with accountability, and the external feedback that matters includes not just "do people like it" but "does it satisfy the constraints the business is answerable for." This is not a criticism of Ng's framing; it is the enterprise instance of it that enterprise readers, per the explainx.ai chronicle, flagged, and it is where a build stops being a build and starts being a product.

2. Graduation Is an Outer-Loop Problem

The reassuring part, for any team that has fallen for the three-loop method on a prototype, is that graduating to production does not ask you to change how you build — though governance is a major part of the transition, not the whole of it: teams still need conventional production engineering (deployment, reliability, capacity, rollback, incident response, security, application-level testing), with the control plane addressing the governance and model/tool-traffic layer of that larger system. The inner loop — spec, agentic iteration, verification gates, capped spend per run — is the same discipline whether the output is a typing app or a claims processor. What changes is everything around the loop, and it changes because the outer loop's new obligations reach inward. An agent that ran under your own credentials on your laptop now needs an identity of its own, because "who did this" must have an answer that isn't "the developer's key." An agent whose weekend spend was your personal subscription now needs a budget with an owner, because someone is accountable for the line item. An agent that saw only your test data now handles real user data, which means what enters and leaves it must be inspected. And an agent whose every action was visible in your terminal now runs somewhere others must be able to review, which means a durable record. None of these is a build-loop concern; all of them are outer-loop concerns in the enterprise sense — the policy-governance-audit dimension of the reported enterprise-governance observation — and many can be enforced through surrounding infrastructure, while the agent and application still own task design, data minimization, tool semantics, and business logic. That is a large part of why graduation is tractable. Once an application's model and registered MCP traffic is integrated through the relevant gateways, teams can centralize many traffic-level controls rather than reimplementing them independently in every agent. Integration still requires credentials, endpoints, policy attachment, agent registration, metadata, and tool routing.

Official TrueFoundry AI Gateway architecture diagram showing a graduating agent connecting through the gateway plane to the model and provider estate
Figure 1: TrueFoundry's AI Gateway architecture as documented — the plane a graduating agent's model calls cross, which is where the enterprise outer loop's requirements (identity, spend, inspection, evidence) can be applied centrally to traffic routed through the plane rather than implemented independently in each application. Source: TrueFoundry documentation (official diagram, reproduced with attribution).

3. The Three Loops, Graduated: Where TrueFoundry Fits Each

Three columns for the inner loop (managed execution: Agent Harness plan-act-observe, step traces, on-demand sandbox, with the application owning specs and verification), middle loop (evaluation and staged rollout: gateway telemetry to connected evaluators, virtual-model canary weights, deliberate rollback), and outer loop (governance: model access control and Agent Identity, budgets in enforce or warn-only mode, configured guardrails, aggregate metrics with request-level traces, approval gates), above a TrueFoundry control-plane bar governing the traffic each loop emits.
Figure 2: The three loops, graduated — what each loop becomes in enterprise production, and the layer the control plane actually owns. Scorers, specifications, and business logic remain the application’s. Original graphic.

Take Ng's loops one at a time and add the enterprise requirement each acquires, mapped to documented mechanism. The inner loop stays put — deliberately. The agentic coding loop with its verification gates and per-run spend caps is the part you keep exactly; if it runs in a managed runtime, the Agent Harness supplies orchestration, state, tool execution, and step-level observability, now visible to more than one person; the application still defines the specification, tests, verification criteria, and conditions for stopping. The middle loop becomes evaluation and staged rollout. Ng already recommends evals when the same failure repeats; in production that instinct becomes infrastructure — gateway telemetry feeding a connected online or offline evaluation system (the evaluation pattern) — with the scorer, sampling policy, calibration, regression detection, and promotion logic remaining an adjacent workflow the team implements or integrates — and virtual-model weights directing a controlled share of traffic to a candidate target, widened or restored by deliberate configuration without changing the model name callers use, the mechanics our routing analysis details. The developer's steering feedback, in other words, gets a safety rail: change the spec, ship to 5% of traffic, watch the evals, widen or revert. The outer loop acquires its governance dimension. This is where that reported governance observation becomes configuration: model-account access control governs which users, teams, and applications may call approved models, while for agent-level attribution on MCP Gateway and Agent Gateway traffic each independently governed agent presents a registered Agent Identity, with its Agent Registration and associated policies defining who may call it, whom it may act for, and which downstream resources it may reach; budgets assign spend to an owner and, when enforcement is enabled, impose a hard limit — warn-only mode provides notifications without blocking traffic; configured gateway policies can inspect model requests and responses, as well as registered MCP tool calls that traverse the relevant gateways — each MCP tool invocation is evaluated separately; this does not cover arbitrary application-side tools, and output guardrails require a completed non-streaming response — protecting the real user data the prototype never saw (guardrails docs); and the Metrics Dashboard provides aggregate visibility into spend, volume, errors, latency, routing, and guardrail outcomes, while Request Traces and Request Logs provide the request-level evidence "accountability" concretely means — logging configuration separately determines whether request and response bodies are retained and redacted; cost, token, latency, and request metadata remain recorded. Ng's context-advantage point remains a development-loop responsibility: teams encode user needs, domain constraints, compliance requirements, and product intent through specifications, prompts, datasets, evaluations, and review. Separately, Agent Harness can pause sensitive tool calls until an explicit approval decision arrives — an execution checkpoint, not a substitute for authorization or upstream context engineering. For sensitive actions that require explicit review, an approval policy creates a human checkpoint before the tool executes at the consequential step, the pattern our task-based access analysis develops. The method is unchanged; the outer loop simply grew teeth, and the teeth are documented.

End-to-end diagram: user Jane calls a planner agent through the Agent Gateway, which calls a research agent, which calls a Jira MCP server through the MCP Gateway; token cards above each hop show the user preserved as subject throughout while the actor chain grows and scope narrows to read-only by the final hop.
Figure 3: The documented identity model for multi-hop agent traffic — the user stays the subject at every hop, the actor chain grows, and scope narrows to the next callee: the “who did this, on whose behalf” record the outer loop requires. Source: TrueFoundry documentation (official image).
Official TrueFoundry Metrics Dashboard showing aggregate per-model and per-team cost, error, and guardrail-outcome views
Figure 4: The Metrics Dashboard provides aggregate spend and operational accountability across teams and models. Request-level evidence resides in Request Traces and Request Logs, subject to the configured body-retention and redaction policy. Source: TrueFoundry documentation (official image, reproduced with attribution).

The fastest way to build, govern and scale your AI

Sign Up
Table of Contents

One Gateway for Every LLM, Agent and MCP Server

Book a 30-min with our AI expert

Book a Demo

The fastest way to build, govern and scale your AI

Book Demo
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Discover More

No items found.
July 29, 2026
|
5 min read

From Prototype to Enterprise Production: Extending Andrew Ng's Three Loops

No items found.
TrueFoundry AI gateway enforces AI access control across enterprise workloads
July 28, 2026
|
5 min read

What Is AI Access Control? A Complete Enterprise Guide for 2026

No items found.
TrueFoundry LLM gateway implements automatic LLM fallback in production
July 28, 2026
|
5 min read

What Is LLM Fallback? Definition, Mechanism, and How to Implement It

No items found.
July 28, 2026
|
5 min read

LangChain Pricing in 2026: A Complete Breakdown

No items found.
No items found.

Recent Blogs

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.
Take a quick product tour
Start Product Tour
Product Tour