Deterministic Infra for Non-Deterministic AI Agents - Nishant Gupta, Meta Superintelligence Labs
AI Engineer · 7 min · 118 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:03Hey everyone.
- 00:04My name is Nishant Gupta.
- 00:06I'm a software engineering tech lead at Meta, working on building the training and inference infrastructure.
- 00:12And today, we're going to be talking about building deterministic infrastructure for non-deterministic AI agents.
- 00:19So, most of the conversations around AI over the last few years has been focused on models.
- 00:23Bigger models, more parameters, better reasoning.
- 00:26But as organizations move from chatbots to autonomous agents, a different problem emerges.
- 00:31The challenge is no longer in intelligence.
- 00:33The challenge is is reliability.
- 00:36At Meta and across the industry, we are seeing agents move beyond answering questions and beginning to plan, call tool calls, coordinate workflows, and make decisions that affect production systems.
- 00:46These systems are fundamentally probabilistic.
- 00:50Infrastructure is not allowed to be.
- 00:52Today, I want to discuss this topic in more detail.
- 00:58The modern cloud infrastructure evolved around a set of assumptions.
- 01:01A request Most of the requests are short-lived.
- 01:03Services are deterministic, more or less.
- 01:06Execution paths are known.
- 01:08Failures are bounded.
- 01:09However, autonomous AI agents violate nearly every one of those assumptions.
- 01:14They're stateful.
- 01:14They're long-running.
- 01:15They make decisions dynamically.
- 01:17They may may execute different workflows for same inputs.
- 01:21This is what I call the great mismatch.
- 01:23We're trying to run autonomous systems on infrastructure that was designed for deterministic workflows.
- 01:30This is probably the most important mindshift.
- 01:32Most AI demos showcase capability.
- 01:36But can it solve a problem?
- 01:37Can it use a tool?
- 01:38Can it compete complete a workflow?
- 01:40Production systems be have a different objective.
- 01:43Can it do it reliably?
- 01:45Can it do it 10,000 times, 100,000 times, million times?
- 01:49Can it recover from failures?
- 01:50Can it operate safely?
- 01:51Can it do it in an at an acceptable cost with an acceptable latency?
- 01:55With an acceptable outcome?
- 01:57The majority of the engineering effort moves below the model layer into orchestration, monitoring, safety evaluation, and recovery systems.
- 02:06When people hear AI failures, they immediately think hallucinations.
- 02:09In reality In reality, hallucinations are often the least interesting failure mode.
- 02:14What we see instead are infrastructure failures, recursive reasoning loops, workflow dead locks, retry amplification, context corruption, memory poisoning, cost explosions.
- 02:24The model makes a mistake, but however, the infrastructure turns that mistake into an outage.
- 02:29That's the real challenge.
- 02:33So, as this slide shows a pattern that distributed system engineers will probably recognize immediately, an agent calls a tool incorrectly, the tool returns an error.
- 02:42Instead of recovering, the agent generates a slightly different, but still invalid request.
- 02:47The cycle repeats.
- 02:49Each retry consumes more compute.
- 02:51Reasoning depth increases, GPU consumption rises, eventually you get exponential resource growth.
- 02:57What started as a minor API error became a compute incident.
- 03:01This is why unco- uncontrolled retries are one of the biggest risk in agentic systems.
- 03:08This is the architecture principle I recommend most strongly.
- 03:10Never let the model directly control production systems.
- 03:13The model should generate proposals, infrastructure validates them, policy engine approves them, execution gateway enforces them.
- 03:20The model just suggests, the platform decides.
- 03:23This separation allows us to build reliable systems even when the underlying model remains probabilistic.
- 03:30As we know, containers gave rise to Kubernetes, microservices created service meshes.
- 03:35AI agents are creating something new, an agentic control plane.
- 03:38This layer becomes responsible for scheduling, memory coordination, policy enforcement, evaluation, monitoring, workload routing, which is very important.
- 03:48And think of it as an operating system for autonomous AI.
- 03:51The organizations that build this layer will have significantly more competitive advantages.
- 03:57So, traditional logs tell us what happened.
- 03:59Agentic systems require understanding why it happened.
- 04:01We need traces to capture planning decisions, tool calls, memory lookups, state transitions.
- 04:08When debugging an autonomous workflow, understanding the chain of decisions and reasoning is often more important than the final output.
- 04:15Observability becomes multi-dimensional.
- 04:19Without it, production debugging becomes nearly impossible.
- 04:23So, as you can see, memory is one of the most underestimated challenges in agentic architectures.
- 04:27Once multiple agents share state, familiar distributed system issues appear.
- 04:32Stale reads, conflicting updates, context drifts, inconsistent views.
- 04:37The challenge becomes even harder when memory itself may be probabilistic and retrieval-based.
- 04:42Many multi-agent failures are actually consistency failures masquerading as reasoning failures.
- 04:50So, safety cannot be a single component.
- 04:52It must be layered.
- 04:53Prompt level controls, tool permissions, policy validations, human approvals, audit systems.
- 04:58Each of these layers catches a different class of failures.
- 05:01Defense in depth is a well-understood security principle.
- 05:05It applies equally well to autonomous AI systems.
- 05:09Many people frame human involvement as temporarily temporary necessity.
- 05:13I don't think that's correct.
- 05:15The most successful systems are likely to remain human supervised.
- 05:18Humans became become exception handlers.
- 05:20They review ambiguous situations.
- 05:22They handle normal scenarios.
- 05:24They provide calibration signals.
- 05:27The goal is not to remove humans.
- 05:28The goal is allocating human attention where it provides the maximum value.
- 05:36So, one of the biggest infrastructure shifts is that AI workloads increasingly resemble cluster scheduling problems.
- 05:41Demand is bursting.
- 05:43Reasoning depth is and Workflows may run for minutes instead of milliseconds.
- 05:48Resource requirements vary dramatically.
- 05:51As a result, GPU efficiency, workload placement, elastic capacity management, and scheduling becomes critical.
- 05:57Inference is no longer just a model problem.
- 05:59It becomes a resource orchestration problem.
- 06:03The good news is that many of these problems are not entirely new.
- 06:07Distributed systems have solved something similar for decades.
- 06:10Circuit breakers become tool isolation.
- 06:13Rate limits become agent limits.
- 06:14Retries become control recovery.
- 06:15Resource quotas become cost governance.
- 06:18Observability becomes agent tracing.
- 06:21Instead of inventing entirely new infrastructure, we can adapt to reliability patterns for autonomous systems.
- 06:27The industry has gone through several phases.
- 06:29The initially prompts were the differentiator.
- 06:31Then the models became the differentiator.
- 06:33And both are rapid rapidly commoditizing.
- 06:36The next frontier is infrastructure.
- 06:38The organization that won't that wins is not necessarily have the best prompts.
- 06:42They'll have the most reliable systems.
- 06:44The competitive advantage is moving up the stack.
- 06:48If there's one thing I want you to remember, it's this.
- 06:53AI agents should be treated as distributed systems.
- 06:55Models are stochastic.
- 06:56Infrastructures must be deterministic.
- 06:59Reliability is increasingly an infrastructure problem.
- 07:01Observability is mandatory.
- 07:03Control planes are emerging as a foundation layer.
- 07:05And ultimately, the future of the AI AI won't be won by better prompts.
- 07:09It will be won by better systems.