answrsnow
AI Infrastructure · Explainer

What Infrastructure Do You Need to Run AI Agents in Production in 2027?

By Kory White · Updated Oct 2026 · 7 min read
Aerial view of a large data center campus with a long white-roofed building, Mayes County, Oklahoma
Direct answer

A production AI agent needs more than a model and a prompt. The layers are a model endpoint, an orchestration framework that runs the agent loop, a way to connect tools (the Model Context Protocol, MCP, is the open standard), memory and a vector store, a sandbox for any code the agent runs, tracing and evals so you can see and score what it did, guardrails with permissions and human approval for risky actions, and cost controls.

You can buy or rent almost all of it. Anthropic lists current models, such as Claude Opus 5.5, Claude Sonnet 5.5 and Claude Haiku 5.5, on its own API and through cloud platforms, and the frameworks below are free libraries. What costs money is the metered parts: tokens, vector reads and writes, sandbox seconds and trace volume. Prices below are list prices read on October 31, 2026 from each vendor's page, and vendor descriptions are labelled as vendor claims. Confirm current prices before you budget. For the spending side, see the hidden costs of running AI infrastructure.

Model access and inference

Most teams start with a hosted model API. Anthropic's models page lists the current Claude lineup, and the same models are offered on Amazon Bedrock, Google Cloud and Microsoft Foundry, which matters if your company already buys cloud capacity from one of them. All four current models list a 1M token context window.

The practical lesson is that an agent is rarely one model. A cheap, fast model can route and extract while a larger model handles the hard steps, so design the endpoint layer to switch models by step. This page does not cover self-hosting your own inference servers, because none of the sources read here give a figure for it.

Orchestration: the agent loop

The orchestration layer runs the loop of planning, calling tools and deciding when the task is done, and it is where state lives between steps. Four frameworks are common, each described here in its own words.

If you would rather not run the loop yourself, Anthropic also offers Managed Agents, described as a hosted agent harness with sessions in an Anthropic-managed cloud sandbox or a self-hosted sandbox on your own infrastructure.

Tool connectivity with MCP

Agents are only useful if they can reach your systems. MCP is described on its own site as an open-source standard for connecting AI applications to external systems: data sources such as local files and databases, tools such as search engines and calculators, and workflows such as specialized prompts. The site compares it to a USB-C port for AI applications.

Both the OpenAI Agents SDK and the Claude Agent SDK list MCP support, and the MCP site names Visual Studio Code and Cursor among supporting tools. The infrastructure implication is that each internal system gets one MCP server instead of one custom integration per framework. Treat every server as a new door into your data: the MCP site has a dedicated security best practices page, and you should read it before exposing anything that writes.

Memory and vector stores

Agents need two kinds of memory. Working memory holds the current run, and LangGraph describes short-term working memory and long-term memory across sessions. The OpenAI Agents SDK describes sessions as a persistent memory layer for working context within an agent loop. Long-term knowledge, such as documents and past tickets, usually sits in a vector database.

Vector stores are metered. Pinecone's public pricing lists storage at $0.33 per GB per month on its Standard and Enterprise plans, read units at $16 to $18 per million on Standard and $24 to $27 per million on Enterprise, and write units at $4 to $4.50 per million on Standard and $6 to $6.75 per million on Enterprise, with minimum monthly usage of $50 on Standard and $500 on Enterprise. Those are one vendor's list prices and vary by cloud and region.

Sandboxed code execution

An agent that writes and runs code or shell commands should do it away from your production systems. The OpenAI Agents SDK describes sandbox agents running specialists inside real isolated workspaces, and Anthropic's Managed Agents run in a managed cloud sandbox or a sandbox on your own infrastructure.

A long aisle between two rows of tall black server cabinets in a data center
Photo: Robert.Harker / CC BY-SA 3.0 via Wikimedia Commons

If you buy sandboxes as a service, E2B publishes its prices: a Hobby plan at $0 plus usage with a one-time $100 in credits, a Pro plan at $150 per month plus usage, $0.000014 per vCPU-second and $0.0000045 per GiB-second of RAM, with sessions up to 1 hour on Hobby and up to 24 hours on Pro. E2B's page says its sandboxes are CPU-only, so a GPU workload needs another route.

Observability, tracing and evals

Without traces you cannot debug an agent, because the failure is somewhere in a chain of model calls and tools. Arize Phoenix says tracing lets you see what happened during a single run step by step, accepts traces over OpenTelemetry, and supports evaluations that measure output quality. The OpenAI Agents SDK has built-in tracing, and LangGraph points to LangSmith for debugging.

Note the billing unit. Langfuse defines a billable unit as any tracing data point, including traces, observations and scores, so a chatty multi-step agent produces many units per user request. Evals belong in the same layer: score a fixed set of real tasks before each release, and keep the traces that failed.

Guardrails, identity and human approval

This layer decides what the agent may do. The OpenAI Agents SDK lists guardrails that validate agent inputs and outputs and built-in mechanisms for involving humans during runs. LangGraph describes inspecting and modifying agent state at any point. The Claude Agent SDK lists permissions that control which tools run automatically and which need approval, and hooks that run custom code at key points in the agent lifecycle.

Cost controls

Agents make many model calls per task, so cost control is part of the infrastructure. Anthropic's models page says batch API requests are 50% off and that prompt cache reads cost 10% of the base input price, with 5% on Claude Opus 5.5 and Claude Sonnet 5.5. The batch page says most batches finish in less than 1 hour, which suits offline evals and back-office jobs, not interactive chat.

Put a per-run budget and a per-team spend alert in your own gateway, log token use on every trace, and review the largest runs weekly. None of the sources read here describe a built-in spend cap, so build that check yourself.

Questions people ask

What is the minimum infrastructure to run an AI agent in production?

A model endpoint, an orchestration loop, the tools the agent calls, somewhere to keep state, tracing so you can see what happened, and approval rules for risky actions. Every layer can start as a hosted service or a library; this page lists what the vendors' own pages say each one does.

Do I need to self-host a model?

Not necessarily. Current Claude models are offered through the Claude API, Amazon Bedrock, Google Cloud and Microsoft Foundry according to Anthropic's models page, so a hosted endpoint is the common starting point. Self-hosting is a separate decision about data location and cost that none of the pages read here settles for you.

Which orchestration framework should I pick?

The pages read here do not rank them. LangGraph stresses durable execution and human oversight, the OpenAI Agents SDK stresses few abstractions, the Claude Agent SDK ships built-in tools and permissions, and CrewAI describes Flows and Crews. Pick on the capabilities you need and test with your own task.

What does MCP do in an agent stack?

It is an open-source standard for connecting AI applications to external systems such as databases, tools and workflows, so a tool is built once and used by many clients. It does not replace your own permission rules; the MCP site has a separate security best practices page.

Why do agents need sandboxes?

Because an agent that runs code or commands should do it in an isolated workspace. The OpenAI Agents SDK describes sandbox agents running in real isolated workspaces, and Anthropic's Managed Agents run in a managed or self-hosted sandbox. E2B publishes per-second sandbox prices.

How do I keep agent costs under control?

Measure per run, route simple steps to a smaller model, and use the discounts vendors publish. Anthropic lists a 50% discount on batch requests and cache reads at a fraction of the base input price. Add spend limits at your own gateway, since none of the pages read here describes one.

Sources

Figures and descriptions were read from the linked pages on October 31, 2026, several through a fetch tool that returns summaries, so confirm each price on the vendor's own site. Framework descriptions are the vendors' own. This page is not financial or legal advice.

Top photo: Xpda / CC BY-SA 4.0 via Wikimedia Commons

Share this page