AI agent deployment: what breaks between prototype and production

Alexandra Kane - VP, Revenue
by Alexandra Kane

Three infrastructure failures that stall agents, none of which a better prompt fixes.

November 17, 2026

TL;DR

AI agent deployment is the work of moving an agent from a development environment into production, where it runs against live data, real credentials, and real consequences. Agents that stall between prototype and production usually hit the same three infrastructure failures: the agent reads stale values, the runtime cannot pass security review, and the evals that cleared it ran against data production never served. None of the three is a model problem, so a better prompt does not clear them.

Say a trust and safety agent opens an investigation on a flagged account. It pulls the device history, finds two logins from one country, writes a short summary, and closes the case as benign. A third login from a different country had landed eleven minutes earlier. The value was sitting in the operational database the whole time. The agent had queried a table last rebuilt at 3am, and every step after the first one, the summary, the disposition, the note written back to the case file, inherited the gap.

Nothing in that trajectory errored. The reasoning was sound at each step, which is what makes it expensive to find.

Most AI agent deployment advice starts at the framework layer: which orchestration library, how to structure the handoff, where to put the retry. The failures that actually stall a deploy sit underneath that layer, which is why a team can follow all of it and still not ship.

Why does an agent read the wrong data in production?

Because development reads a snapshot and production reads a system that is still moving. An agent built against training exports, offline datasets, or recorded API responses is reasoning about values that were true when someone generated the fixture. Prices changed. Sessions went active. A chargeback posted.

The agent version of this is worse than the model version, and the difference is compounding. A model makes one prediction on one set of inputs, and a wrong input produces one wrong answer. An agent makes a sequence of decisions where each step shapes what the next step retrieves, so one stale read early in a trajectory produces a confident, well-formed, wrong conclusion several steps later, with plausible intermediate work supporting it.

The failure is also quiet. Eval output looks correct, live output degrades, and nothing raises an exception. Detection usually happens weeks later, in an aggregate metric, by someone who was not looking for it.

What closes it is a layer that computes values at request time from the systems of record, with one definition serving both the offline and the online path. Chalk's feature store works this way, computing at query time instead of serving a precomputed row, and recomputing features as they would have been at inference time. The same substrate is what an agent needs for its context, which is the argument in what is a context engine. A second implementation written only for the serving path is the thing that drifts out of agreement with the first, and nothing in the stack will tell you when it has.

What are the security challenges in AI agent deployment?

The questions a security review actually asks are narrow, and they are about the runtime, not the model. Agents execute generated code and reach external services, and in development that happens in Docker or on a laptop where nobody minds. In production the same execution has to sit inside the corporate cloud boundary with its actions recorded.

Enterprise AI agent deployment reviews tend to converge on the same requirements.

  • In-boundary execution. Generated code runs inside the company's own cloud account. A third-party code-execution service that takes sensitive data outside that boundary is a recurring reason an otherwise finished agent does not ship. Chalk's isolation model is documented at sandbox isolation.
  • Workload identity in place of embedded keys. The sandbox carries its own identity and a mounted token instead of a client ID and secret living in agent code. In Chalk this is opt-in per workload, set with chalk_identity=True, and it covers sandboxes, scaling groups and functions alike. Code inside the container calls Chalk APIs with no client ID and no secret. The identities are OIDC-compliant, so an internal secrets manager or model registry can be configured to trust the Chalk identity provider directly instead of holding another copy of a credential. Chalk mounts a short-lived identity token into the container, and you map its subject claim to a role in your own cloud IAM, so your IAM decides what that agent may read. The reference is workload identity, and this demo compares an allowed read against a denied impersonation attempt.
  • An audit trail that names the agent. Every tool call, data access, and policy decision recorded, so that during an incident someone can establish what ran, what context it saw, and whose permissions applied.

Teams usually meet these by hand-rolling them. Auth, audit logging, and network policy get built once per agent, and that work is what blocks the deploy. Then the second agent triggers the same review, because nothing from the first one was reusable.

The outcome worth engineering toward is an execution pattern that security signs off on once and later agent projects inherit, which turns InfoSec from a per-project gate into a one-time one. The agent sandboxes workflow describes that pattern, and a coding agent working against a real repository shows it running.

Why do agent evals pass when production fails?

Because the eval read a static export and production computes its values on demand. The scores were real measurements of a world that was never live.

Chalk's time-correct evaluation demo puts a number on the gap. A dispute-review agent is replayed over 36 disputes twice. Given only the evidence available when each dispute opened, it matches the fraud team's eventual finding 81% of the time. Given the investigation's later findings as well, the same agent on the same disputes scores 100%. Nothing about the agent changed. The second number is the one a team would have shipped on.

This is why an agent that worked in testing fails in production without anything about the agent changing. It is also a different failure from the first one, and the distinction decides the fix. Failure one is the agent getting bad data while it runs. This one is the eval handing you false confidence before it ever runs. Both trace to the same root, which is a data pipeline that offers no point-in-time guarantee.

A time-consistent eval means replaying an agent against the exact values production held at a chosen past timestamp, including the tool calls that leave your system. Chalk Evaluations replays decisions with the data, context and tools as they stood at decision time, and testing agents against production data covers the mechanics. Most teams cannot do this today, because their feature infrastructure cannot answer a query at an arbitrary historical moment, and the usual approximation is an export, which reintroduces the problem it was meant to test for.

Failure

What you see

What closes it

Stale reads at runtime

Live quality degrades, nothing errors, aggregate metrics catch it late

Request-time computation from systems of record, one definition shared by training and serving

Security review

A finished agent sits unshipped for a quarter

In-boundary execution, workload identity, audit telemetry, approved once and reused

Evals that mislead

Good scores, different production behavior

Point-in-time replay across the whole trajectory, tool calls included

What does production-ready agent infrastructure require?

Enterprise AI agent deployment converges on one system that executes inside the customer's cloud, reads production data without a copy step, and leaves an auditable record you can replay against a past timestamp. Close two of those three and the remaining failure stays open.

The usual response is to assemble it from parts. A sandbox vendor, a compute vendor, a feature store, an eval framework, a secrets manager, a tracing backend. Each piece is defensible alone, and the total is a standing platform commitment: environment images, credentials, network policy, data connectors, observability, incident response, upgrades. All of it owned permanently by a team that wanted to improve agent behavior.

The costs that arrive are not the ones in the plan. Configuration drift turns an agent quality question into an infrastructure investigation, because the execution context differs between two developers. Governance shows up late and gets retrofitted onto agents already touching production data. Agent loops run on one job system and retrains on another, and the team operates each layer separately.

The market is converging on this from opposite sides. Sandbox runtimes such as E2B and Daytona solve isolated execution well, and they have no relationship with your data layer. Data platforms came from the data and are adding execution beside it. Which side a vendor started on is a fair predictor of which failure it closes first and which one it still hands back to you.

AI agent deployment best practices

Compute values at request time from the systems of record, with one definition shared by training and serving. Settle on a single execution pattern that security approves once and later agents inherit. Issue one service token per agent so the audit log can name it. Replay evals against point-in-time history instead of exports.

Chalk came from the data side.

Chalk Sandboxes runs agents and generated code in isolated environments inside your own cloud account, next to the data layer that already holds production values. A sandbox can be scoped to reach one host and nothing else, and it can be detached and reattached later while a long-running agent keeps working.

Tool access is a separate product. The Chalk MCP Gateway registers the backends an agent may reach, including MCP servers, HTTP APIs described by OpenAPI, and Chalk functions, and it manages their credentials. The agent authenticates to the gateway and never holds the upstream secret, so it can leak its own token without exposing the credential behind it.

The gateway's authorization model is worth understanding before a security review reaches it. Policies are written in Rego and they are deny-only: a request proceeds when no rule matches it, so a policy enumerates what to refuse and an allow rule has no effect. Decisions can read the caller, the backend, the tool, and the arguments themselves. Each refusal message a rule produces becomes one of the decision's reasons, and those reasons land in the audit log, so a denied call explains itself. The documented practice is one service token per agent, which makes the audit log name the agent behind every call and means revoking a token disconnects that agent alone. The reference is the gateway docs, how a sandbox authenticates to it is at sandboxes and the MCP Gateway, and a live Rego demo runs a policy over seven days of device telemetry.

Underneath both, Chalk Functions is the primitive that runs retrains, agent loops, queued batch jobs, and autoscaling replicas, documented at functions and scaling groups. One job layer to operate instead of a separate one per workload type.

When do you not need any of this?

An agent that reads a static corpus, runs at low concurrency against non-sensitive data, with a person approving every consequential output, needs none of it. A hardened agent sandbox is overkill when the users are trusted and the workloads are short-lived, because a container is adequate isolation there. A fixture file is a faithful test environment when the underlying data genuinely does not move.

A team already running a mature internal platform, prepared to own agent execution as a long-term product instead of a side effect, can also reasonably build this. That is a real choice as long as it gets made deliberately instead of discovered two quarters in.

The calculus changes when an agent acts without a person reviewing each action, on data that moves between the test and the run, inside a company where someone will eventually ask what the agent did and why.

Conclusion

Agent reliability in production is mostly decided by infrastructure that has nothing to do with the agent. The data path, the execution pattern, and the eval environment each fail independently, and each one fails quietly enough that the team will spend a while blaming the prompt.

The Chalk demo library has live examples of each piece, including an agent investigating an incident inside a sandbox and a language model called from inside a SQL WHERE clause. Every demo ships source code you can deploy in your own cloud, and you can create a Chalk account to run one against your own.

Want to stay up-to-date with Chalk?

Subscribe for updates on what we’re building (and shipping!) at Chalk