Part 11 of 15 · The House That Diligence BuiltNext: The Window Is How People Work With the Agent. Build It to Make Them Smarter. →

Host the Agent Once, So Nobody Needs Their Own Setup

An agent that needs a personal API key and a local install only serves the people who set it up. Put one hosted instance over everyone, and know what it costs.

Clint JohnsonPublished 8 min read

The roof is what lets everyone move in. For an agent, it's one hosted instance that covers everybody, so using it doesn't start with "first, get your own model account and install this."

Most internal agents start on one laptop. An engineer wires up a model key, a few tools and a CLI, and it works well for them. A second engineer copies the setup, then a third, on a different model version, with a prompt they edited last week. By the time someone outside engineering wants to try it, the answer is a setup document with eleven steps, two of which need an admin.

That agent doesn't have a roof. It has a row of tents.

What one install per person costs you

Every install drifts. Each person has their own copy of the prompts, skills and tool config. A fix you made on Tuesday reaches the people who pulled on Tuesday, and nobody can say which version produced yesterday's bad answer.

Every install carries its own credentials: personal model keys, cloud profiles, tokens for the systems the agent touches. You can't see who spends what, you can't revoke access in one place, and when someone leaves, their key keeps working until someone remembers it.

And the people who would get the most out of the agent never get it. A support lead or an operations person isn't going to install a CLI and open a model account. If the agent only exists on engineers' laptops, it only serves engineers.

An agent is a web service

The good news is that hosting an agent isn't a new discipline. Most of what made web services scale carries over: stateless handlers, an auth layer in front, state in a database, a deploy pipeline, logs and alarms. Treat the agent like any other service and most of the decisions make themselves.

One deployment per environment, staging and production, each with one version of the prompts and tools. A fix ships once and everyone has it.

The service runs under one identity per environment, not under anyone's personal credentials: a single cloud role or service account that holds model access and the tool credentials. People sign in as themselves through your identity provider, and the service decides what each person can do. Nobody holds a model key. Revoking someone is one change in one place.

I hold my own projects to the same rule. My bots run on one shared machine on a schedule, under one fleet identity, instead of on whichever laptop I started them from. When I change a skill file, every bot picks it up on its next pass. When one stops reporting in, a dead-man check notices, because there's one place to look.

Let people bring their own client: remote MCP

A hosted agent doesn't have to mean a new app. The cleanest roof I've built is a remote MCP server.

Early MCP servers ran over standard IO on the same machine as the client. That's fine for one person. To serve everyone, the server moves behind a URL: streamable HTTP, a gateway with an authorizer in front, and a session store if you need one.

Graphite Atlas has a hosted MCP endpoint. Anyone can point Claude Desktop, ChatGPT, Claude Code or Cursor at it, sign in, and get the tools. The person keeps the client they already like. Three choices made that work:

  • It's stateless. Each request carries what it needs, so the server scales like any web route and survives restarts. When work spans steps, the state lives in the database, not in a process. Serialize it, resume from it.
  • It has OAuth discovery. The server publishes the standard well-known metadata, so a client can find out how to sign in without a setup document.
  • It serves a smaller tool list on request. Hosted clients load every tool definition on every turn, so the server offers a slim profile through a URL parameter.

The tool list is the part that grows quietly. One large agent at a cloud provider manages thousands of tools, far too many for any context window. They store the tool descriptions in a search index and, for each task, retrieve only the few that matter. You probably don't have thousands, but the rule holds at forty: the roof shouldn't charge every user, on every turn, for tools they'll never call.

The same pattern works for an internal agent. Put it behind a remote MCP endpoint and your engineers use it from their editor, while a chat front end serves everyone else, both talking to one instance.

One command for the local edition

Some people will want the CLI, usually the engineers building on it. Give them one command to install it, pinned to a release, not a setup guide. The release goes through a gate: the evals pass and a person approves it. No automation approves its own release.

The local edition calls the hosted services for anything that needs credentials. The laptop holds a sign-in, not a key ring.

Outside users bring their own model

Once people outside your company want in, whose model account pays becomes a real question. My answer is bring your own model: their key or their account, your server and tools.

That keeps cost on their bill, so you don't need a pricing model before you have a product. It keeps their prompts in a model account they chose and signed terms for. You still run the tools, and the tools still enforce what each user can reach.

Where it runs, and what that costs

Most agents sit on a model API, and that boundary is a good one. Nobody needs to hold the whole stack in their head. But open-weight models and open serving software have improved enough that self-hosting is now a real option for some workloads. If you're deciding, you need to know the GPU about as well as you know a database index: enough to use the fast path, not enough to build one.

Three facts carry most of the decision.

GPUs trade latency for throughput. A GPU runs tens of thousands of threads at once and switches between them every cycle. It's built to finish a lot of work per second, not to return one request fast. Design around batches where your users can wait. A live voice product can't wait to batch; a nightly classification job can.

Prompt processing fits the hardware; generation mostly doesn't. Reading a long input does lots of math per weight loaded. Generating one token at a time reloads all the weights for very little math. For an 8-billion-parameter model at 8-bit precision, that's about 8 GB moved per token. Long inputs with short outputs (classification, extraction, embeddings, routing) are where self-hosting pays first.

Extra samples are nearly free on your own GPU. Because generation leaves most of the matrix hardware idle, producing many samples of the same prompt costs little more than producing one. Pair that with a verifier, a test that says pass or fail, and a small model can compete with a large one. A published result reproduced in a day: an 8B open model with about 100 samples per problem, filtered by unit tests, matched a frontier model on coding tasks.

The fine print matters. "Free" means free on hardware you already run. On a paid API, a hundred samples cost a hundred times the output tokens. And the trick only works where you have a reliable verifier. Code with tests has one. Open-ended writing or triage mostly doesn't, and a weak verifier just picks a confident wrong answer.

My rule: start on an API. Move a workload to self-hosted only when it's high-volume, input-heavy or verifiable, and when a benchmark on your own data says the small model clears your quality bar. Use low precision; the headline throughput numbers assume it.

Sign off on security and cost before you open the door

Hosting changes the risk. On a laptop, a mistake reaches one person's data. On a shared instance, it reaches everyone's. Before the hosted version opens to anyone new, I want two short documents signed by someone other than me.

Security. Who can sign in, and what each role can reach. Which tools send data out, and which need an approver. Where credentials live and who can read them. What gets logged. On a hosted server, tool arguments are customer text, so log tool names, durations, IDs and outcomes, not full arguments.

Cost. Calls per active user per day, the price per call (API or GPU-hour), and the monthly number at ten times today's usage. Per-user and per-tenant rate limits. A budget alarm that pages someone before the invoice does.

Neither needs to be long. Both need to exist before the first person outside the original team logs in. The platform layers underneath are in Building a GenAI Platform That Doesn't Collapse Under Its Own Weight.

Build the roof last

The roof goes on after the foundation, framing and wiring. A hosted instance of an agent that produces work you'd send back just produces more of it, for more people, faster. But once the inside is sound, the roof is what turns a tool a few engineers use into something the whole company relies on.

How you know it's working

  • People use it who never installed anything. Count weekly users who reached it only through chat or a remote MCP client.
  • Minutes from "I want to try it" to the first answer. Time it with a new hire. If a setup document is involved, it's too long.
  • Zero personal credentials. Nobody needs a model key, cloud profile or tool token in local config.
  • One version per environment. Every answer traces to a release.
  • Cost per active user per week, on a chart someone looks at, with the self-host decision revisited when a workload's volume changes.
Next in The House That Diligence Built · Part 12 of 15The Window Is How People Work With the Agent. Build It to Make Them Smarter. →