top of page

Where Does the Agent Run? Four Ways to Run the Same Brain

carocsteads
7 days ago
3 min read

Agents, from the ground up · Part 6 of 7. Several "Claude" products sound alike. One question separates them cleanly: where does the agent loop actually run?

Chat app, CLI, SDK, Agent SDK, managed agents… the product names blur together fast. But remember Part 1: an agent is a model + a loop + tools. Every one of these products calls the same family of models underneath. What differs is who runs the loop, where it runs, and whose tools it uses. Answer that, and the product lineup sorts itself out.

The four places the loop can live

1. A chat app: someone else runs everything.

You type into a chat window on the web, desktop, or phone. The product team built the harness, picked the tools (web search, file uploads, and so on), and runs the loop on their servers. You don't configure anything; you just talk. That makes it the easiest option, but also the least customizable.

2. Client SDK: you build the harness.

You call the model API directly and write the loop yourself, just like the little while loop from Part 1. You define every tool, decide how results are fed back, and handle errors, retries, and context limits. You get the most control and the most work, and it's ideal when you need something very specific.

3. Agent SDK / CLI: a ready-made harness on your machine.

A pre-built harness runs locally. It executes tools on your computer (your files, your terminal, your git repo) and calls the model each turn. This is what Claude Code is: the brain is in the cloud, but the hands are on your laptop. The Agent SDK lets you build your own agents on that same harness without writing the loop from scratch.

4. Managed Agents: the harness runs on their servers.

The provider hosts the whole loop in a cloud sandbox. You call an endpoint; their infrastructure runs the agent and executes its tools in an isolated environment. Nothing touches your machine, which suits products where agents work on behalf of your users at scale.

Chat app = they built it and run it. Client SDK = you build the harness. Agent SDK/CLI = the harness runs on your machine. Managed Agents = it runs on theirs.

How to choose

  • Just want help with a task? A chat app.

  • Need your local files, terminal, and dev tools? Agent SDK or CLI.

  • Building a product where agents run in the cloud for your users? Managed Agents.

  • Need to control every single step, or you have unusual requirements? Client SDK.

Same brain, different place to put the body.

Why "where" is really a security question

Coming from security testing, this is the question I ask first about any agent, because where the loop runs decides whose permissions the agent has.

  • Local harness = your permissions. An agent running on your laptop can, in principle, do anything you can do: read your SSH keys, run any command, push to any repo you have access to. That's why good local harnesses ask before running commands, restrict which folders they can touch, and let you set allow and deny rules. Those prompts aren't friction; they're the security model.

  • Cloud sandbox = the sandbox's permissions. A managed agent works inside an isolated environment. If it gets tricked, the blast radius is that sandbox, not your machine. The question shifts to what credentials and network access you handed the sandbox.

  • Your own harness = whatever you built. With the Client SDK, every guardrail is your responsibility: input validation on tool arguments, limits on loops, logging, approval steps for risky actions.

Four questions to ask about any agent setup

  1. Whose files can it touch? Yours, a sandbox's, or a customer's?

  2. Whose credentials does it carry? Your personal tokens, a scoped service account, or nothing at all?

  3. Who can see what it did? Is there a log or transcript of every tool call?

  4. Who approves risky actions? A human, a policy in code, or no one?

If you can answer those four, you understand the deployment, whatever the product happens to be called.

Next up, Part 7 (the finale): The golden rule. The one principle that turns a flaky AI demo into a system you can actually ship.

Enjoyed this? Get every new post by email with the Subscribe to the blog form at the bottom of this page. You can also sign up as a site member (top of the page) to follow along.

Agents, from the ground up · © Carolina Steadham

Comments


Subscribe to the blog

© 2026 by Carolina Steadham. All rights reserved.

bottom of page