AI Agent Hosting: Cloud vs Self-Hosted Infrastructure

We worked through four managed agent hosting price lists and two open-source model servers, then priced 1,000 agent sessions a day.

AI Agent Hosting: Cloud vs Self-Hosted Infrastructure

Most of an agent’s life is spent waiting. It waits on the model, on a tool call or on a database. So the hosting question comes down to who pays for that waiting, and who guards the data while it happens.

Managed cloud hosting is the better default for most teams. Amazon Bedrock AgentCore, Google’s Agent Runtime, Microsoft Foundry Agent Service and LangGraph’s Agent Server all handle scaling for you. They bill by the second or the hour. Self-hosting on Docker or Kubernetes makes sense in two cases. Either data must stay in your network, or you run open models at volume with vLLM or Ollama.

We worked through the pricing pages of the four managed services and the docs of two open-source model servers. Then we priced one day of agent traffic on the published rates. In our original research, one billing detail mattered more than the headline rates. That detail is what the meter does while the agent waits.

Managed AI Agent Hosting Rates Side by Side

We compiled this table from each provider’s official pricing page. Also, model tokens are billed separately on every platform, so these rates cover only the agent’s own compute and memory.

ServiceComputeMemoryBilling detail
Amazon Bedrock AgentCore Runtime (v2, consumption)$0.1276 per vCPU-hour$0.0169 per GB-hourPer second; CPU is not charged during I/O wait
Amazon Bedrock AgentCore Runtime (v1)$0.0895 per vCPU-hour$0.00945 per GB-hourPer second, 1-second minimum
Google Agent Runtime (Agent Engine)$0.085 per vCPU-hour$0.009 per GiB-hourRounded to the second; idle time between turns is not billed
LangGraph Agent Server (LangSmith Deployment)0.0675 LSU per vCPU-hour0.009 LSU per GiB-hour1 LSU = $1; database compute and memory billed while live
Microsoft Foundry Agent ServiceHosted agents billed per vCPU-hourBilled per GiB-hourNo added charge for Foundry-native prompt and workflow agents

Microsoft publishes its hosted-agent rates through the Azure pricing calculator, since they vary by region and agreement. For the model side of the bill, see our breakdown of AI agent token consumption.

Cloud Platforms That Host AI Agents for You

Each managed service runs your agent code in an isolated environment and adds memory, tools and identity around it. They differ most in how they bill idle time and which cloud they tie you to.

Amazon Bedrock AgentCore Runtime

aws.amazon.com
Amazon Bedrock AgentCore Pricing website screenshot
Amazon Bedrock AgentCore Pricing

AgentCore Runtime runs each session in a microVM with hardware-enforced isolation. Billing is per second on actual CPU and memory use. In practice, CPU drops to zero while the agent waits on an LLM call, a tool or a database query. However, memory is billed for the whole session, and in v2 idle memory is reclaimed after 120 seconds.

Several other AgentCore services carry their own prices. Gateway costs $0.005 per 1,000 tool invocations. Long-term memory costs $0.75 per 1,000 records a month on the built-in option, and retrieval costs $0.50 per 1,000. Identity costs $0.010 per 1,000 tokens or API keys for non-AWS resources, and nothing extra through Runtime or Gateway.

There is also a Runtime Instances option for long jobs. You pay the EC2 instance cost plus a management fee, and sessions can persist up to 14 days. In addition, new AWS customers get up to $200 in Free Tier credits.

Google Agent Runtime (Vertex AI Agent Engine)

Google’s pricing page now lists this service as Agent Runtime. It charges $0.085 per vCPU-hour and $0.009 per GiB-hour at list price, rounded to the nearest second. Also, idle time while the agent waits for the next prompt between turns is not billed.

Commitments lower the rate. A one-year flexible savings plan cuts compute to $0.0765 per vCPU-hour, and a three-year plan cuts it to $0.068. Next, Sessions and Memory Bank storage cost $0.30 per GiB a month from September 1, 2026. Code Execution and Computer Use sandboxes bill on the same compute and memory meters.

We would pick it for teams building with Google’s Agent Development Kit. Our Google ADK review covers that framework.

Microsoft Foundry Agent Service

Foundry Agent Service has an unusual split. Microsoft adds no charge for creating or running Foundry-native agents built from prompts and workflows. You pay for the models and tools they use.

Hosted agents, where you bring your own container, bill per hour on vCPU and GiB of memory. Built-in tools bill on their own meters. File Search charges for vector storage per GB per day, with 1 GB free. Code Interpreter charges per session, and Web Search per 1,000 transactions. Models, Logic Apps connectors and Grounding with Bing Search all bill separately.

LangGraph Agent Server (LangSmith Deployment)

LangChain hosts LangGraph agents on its Agent Server and meters them in LangSmith Units, where one LSU equals $1. Runtime costs 0.0675 LSU per vCPU-hour and 0.009 LSU per GiB-hour. The database that saves agent state costs 0.177 LSU per vCPU-hour and 0.025 LSU per GiB-hour while it is live.

Serverless hosting scales to zero when idle, while Dedicated hosting stays on in Small, Medium or Large sizes. The Plus plan includes one small serverless Agent Server at no charge. Enterprise adds hybrid hosting, with LangChain’s control plane and your own data plane, or full self-hosting in your VPC. Our LangGraph review covers the framework itself.

Self-Hosted AI Agent Infrastructure

Self-hosting splits into two layers. First, you package the agent code in a Docker container and run it on your own servers or a Kubernetes cluster. Second, you serve the model yourself or keep calling a hosted model API.

The agent layer is ordinary software. Any framework, such as LangGraph, CrewAI or the OpenAI Agents SDK, runs in a container. However, you now own scaling, restarts, logs, secrets and saved state. Our guide to AI agent state across sessions explains what must survive a restart.

vLLM for High-Throughput Model Serving

docs.vllm.ai
vLLM Documentation website screenshot
vLLM Documentation

vLLM is an open-source model server built for throughput. It manages attention memory with PagedAttention and uses continuous batching of incoming requests. So many agent calls can share one GPU.

It also exposes an OpenAI-compatible API server. That means most agent frameworks can point at it with a base URL change. In addition, tensor and pipeline parallelism spread large models across several devices. vLLM runs on NVIDIA and AMD GPUs, Intel CPUs, Gaudi accelerators, TPUs and AWS Trainium and Inferentia. Its docs also include Docker and Kubernetes guides.

Ollama for Local and Small Deployments

docs.ollama.com
Ollama OpenAI Compatibility Docs website screenshot
Ollama OpenAI Compatibility Docs

Ollama is the lighter option. Its local server answers at localhost on port 11434 with an OpenAI-style /v1 path. The local server ignores the API key, so any non-empty string works.

Its chat completions endpoint supports streaming, JSON mode, vision and tools. The Responses endpoint works too, but only for stateless requests. So agents that rely on previous_response_id need another setup. Also, to change context size, you build a new model from a Modelfile with a num_ctx setting.

We would use Ollama for development, internal tools and single-server agents. For many users at once, vLLM is built for that load. Our list of local AI agents shows agents that run this way.

Read also: Best CrewAI Alternatives: 9 Agent Frameworks We Researched

What One Day of Agent Traffic Costs on Managed Hosting

We priced a simple workload with the published list rates. Picture 1,000 agent sessions a day. Each session lasts 60 seconds and uses 1 vCPU and 2 GB of memory. The CPU stays busy for 12 of those seconds. The rest is waiting on model and tool calls.

That workload equals 3.33 vCPU-hours of busy CPU, 16.67 vCPU-hours of wall-clock CPU and 33.33 GB-hours of memory per day. Model tokens are left out, since every platform bills them separately.

Platform and assumptionCompute cost per dayMemory cost per dayTotal per dayAbout 30 days
AgentCore v2, CPU billed only while busy$0.43$0.56$0.99$29.66
AgentCore v2, if CPU ran the full minute$2.13$0.56$2.69$80.70
Google Agent Runtime, full minute billed$1.42$0.30$1.72$51.50
Google Agent Runtime, busy seconds only$0.28$0.30$0.58$17.50

Two lessons come out of this. First, the I/O-wait rule cuts the AgentCore compute bill by 80% in this case. Second, hosting compute is small next to model tokens for most agents. So tune prompts and caching before you switch hosts. Our guide to controlling AI agent costs covers those levers.

Self-hosting changes the math. You pay for servers or GPUs even when no agent runs. So it pays off when traffic is steady and high enough to keep the hardware busy.

Security and Data Control in Cloud vs Self-Hosted Agents

Managed services give you isolation out of the box. AgentCore runs each session in its own microVM, and its Browser and Code Interpreter tools run in isolated sandboxes. AgentCore Identity also hands out OAuth tokens and API keys for outside services. So you do not build your own credential system.

Self-hosting gives you control in exchange for work. Data never leaves your network if you also serve the model locally with vLLM or Ollama. However, you must build the sandboxing, secret storage, patching and audit logs yourself.

A middle path exists too. LangGraph’s hybrid option keeps your data plane on your own servers while LangChain runs the control plane. For any setup, add approval gates on risky actions, as our guide to AI agent guardrails explains.

Latency Tradeoffs When You Host AI Agents

Agent latency is mostly model time, multiplied by the number of steps. So the biggest hosting decision for speed is where the model runs relative to the agent.

  • Keep agent and model in one region: on a managed cloud, pick the region where your model endpoint lives. Then each model call skips a long network hop.
  • Serve models close to the agent when self-hosting: vLLM or Ollama on the same cluster removes the trip to an outside API.
  • Watch cold starts: serverless options scale to zero, so the first request after a quiet spell can wait for startup. Dedicated or always-on hosting avoids that at a higher fixed cost.
  • Batch under load: vLLM’s continuous batching keeps throughput up when many sessions hit one GPU.

Pick a Hosting Model for Your Agent Workload

We would decide with four questions, in this order.

  • Must data stay inside your network? If yes, self-host, or use LangGraph Enterprise hybrid or self-hosted deployment.
  • Which cloud do you already run on? AWS teams lean toward AgentCore, Google Cloud teams toward Agent Runtime and Azure teams toward Foundry. Identity and networking already exist there.
  • Is traffic spiky or steady? Spiky traffic favors per-second managed billing. Steady, high traffic can justify your own GPUs.
  • Do you run open-weight models? If yes, vLLM on Kubernetes gives you control over batching and hardware.

Before you move an agent into production on any host, test it on a fixed dataset. Our guide to AI agent evaluation datasets shows how to build one. You can also compare platforms in our open-source vs commercial AI agent platforms post.

Agent Hosting Questions From Teams Going to Production

What Is AI Agent Hosting?

It is the infrastructure that runs your agent code, keeps its state and connects it to models and tools. Managed services run it for you, while self-hosting means you run it on your own servers.

Is Self-Hosting AI Agents Cheaper Than the Cloud?

Only with steady, heavy traffic. Managed runtimes bill per second, and AgentCore does not charge CPU while the agent waits. So light or spiky workloads often cost less in the cloud.

Can I Run an AI Agent Fully Offline?

Yes. Run the agent in a container and serve an open model locally with Ollama or vLLM. Then no request leaves your machine or network.

Do Managed Agent Platforms Include Model Costs?

No. Foundry bills models through Foundry Models, and the other platforms bill model tokens apart from runtime compute. Budget for both. More framework options sit on our agent frameworks page.

Related AI Agents

Read also: AI Agent Architecture: The 6 Layers Inside Every Agent

Explore Agent Categories

Related Articles

Joydeep Bhattacharya Avatar

Written by