Home › Agent Harness › Agent frameworks
AI · Agent Harness
When to use an agent SDK or framework, and when to write the loop yourself
The loop is small: build the messages, call the model, run the tool, repeat. A framework does not sell you the loop. It sells you what surrounds it: keeping the context under control on long runs, surviving a restart, waiting days for a person, and replaying a run. So the choice is one question: do you need the surroundings?
Written 20 November 2026. The method is from our own framework research notes. Product facts were checked against public reports on that date, several of them secondary, and these products change fast. The last section says what to verify.
The mind map: six questions
Work round it in order. Most teams answer the first two and stop; the last four are where choices go wrong a year later.
Five positions, not two
"No framework" and "framework" hide five different things. Most simple agents belong in position 1 or 2 and never need more.
The options side by side
One row per option, with a verdict. Scroll sideways on a small screen.
| Option | Position | What it gives you | What you still own | Models | Cloud | Exit cost | Choose it when | Avoid it when | Verdict |
|---|---|---|---|---|---|---|---|---|---|
| Plain loop (your own code) | 1 | Nothing you did not write | All of it | Any | Any | None: it is yours | Short stateless runs (3 to 8 tool calls, under a minute); you are learning; another system already owns durability; your control flow is unusual and you can name what a framework forbids. | Runs that last hours, wait for people, or must be replayed. You will end up writing a framework with one maintainer. | Default for short, simple agents. Also right when you must own the stop rules. |
| Provider tool-runner (for example Anthropic's tool runner, OpenAI's chat tools) | 2 | The loop over your tools, with hooks | Context, durability, delegation, everything else | One vendor's models (some adapters exist) | Any | Days: it is thin | A simple agent that only needs tools and a few hooks, and you are happy with one model family. | You need long runs, saved state or several model vendors. | Often overlooked and often enough. Try it before a framework. |
| Claude Agent SDK | 3 | Loop, context compaction, permissions, hooks, sessions, built-in file and shell tools, sandboxing, MCP | Durability past a session, identity, evaluation, cost limits | Claude models only (also via Bedrock and Vertex) | Any; Claude is reachable from the big three clouds | Weeks; the model family is a business decision | An autonomous worker that needs a computer: code, data, document or operations work where the path is not known in advance. | A plain conversational service, or a case where you need another vendor's model. | Pick it for autonomous workers on Claude. Keep state and traces yours. |
| OpenAI Agents SDK | 2 to 3 | Agents, handoffs between them, guardrails, tools, tracing, newer sandbox and sub-agent support | Durable state, human approval flows, identity, cost limits | Built around OpenAI's API; other models through adapters, check first | Any; hosted agent products are separate and deeper | 1 to 3 weeks for the SDK; months if you adopt the hosted runtime | A conversational service that routes to specialists: handoffs match the problem. | Long-running work that must survive restarts or wait days for a decision. | Pick it for conversational routing on OpenAI models. |
| LangGraph | 4 | Graph control flow, checkpointed state, waits for a person, replay, model-agnostic | Context policy, sandboxing, safety rules, identity | Any model | Any | 4 to 8 weeks to re-platform; run history stays in your database | Long-horizon processes: reconciliations, migrations, multi-day approvals, where durability and human steps are the point. | A short stateless agent: you carry weight you do not use. Past a week of waiting, pair it with a workflow engine. | Pick it for long-running, auditable, multi-model work. |
| Microsoft Agent Framework (Azure) | 4 | Agents, graph workflows, multi-agent patterns, .NET and Python, successor to Semantic Kernel and AutoGen (1.0 reported April 2026); hosting in Foundry | Context policy, evaluation, identity mapping, cost limits | Many models; strongest with Azure's | Azure first, not Azure only | Weeks; deeper if you use Foundry hosted agents | You are an Azure and .NET shop, or you already run Semantic Kernel or AutoGen and are migrating. | You are not on Azure and have no .NET code: a lighter choice may cost less. | Pick it on Azure, especially for .NET teams. |
| Google ADK (GCP) | 4 | Agent building blocks, graph workflows in version 2, Python, Go, TypeScript and Java, runs locally or on Google's managed agent runtime | Context policy, evaluation, identity mapping, cost limits | Many models; strongest with Gemini | Google Cloud first, runs anywhere | Weeks; deeper with the managed runtime | You are on Google Cloud or use Gemini and want Google's runtime and protocols (such as A2A). | Another cloud is the home of your data and identity. | Pick it on Google Cloud. Note the platform was renamed in 2026: check current names. |
| AWS: Strands Agents and Bedrock AgentCore | 3 to 5 | Open-source agent SDK; AgentCore adds a managed runtime, gateway, memory and identity | Context policy, evaluation, the loop's stop rules if you want them yours | Many models; strongest with Bedrock | AWS first | Weeks; months if you adopt the managed runtime fully | You are on AWS and want the platform's identity, gateway and runtime. | You need to own the loop's stop rules, or must stay portable across clouds. | Pick on AWS if you accept the runtime lock; otherwise use it only for gateway and identity. |
| Managed agent products (Foundry hosted agents, Bedrock agents, Google's runtime) | 5 | Hosting, scaling, tracing, sometimes memory and identity | Very little | Per product | That cloud | Highest of all | A small team, one cloud, no wish to operate infrastructure, and a use case the product fits. | You need your own stop rules, portability or full trace ownership. | Use for speed; plan the exit on day one. |
A decision path in four steps
Six situations where a plain loop wins
- Short, stateless runs. This is the commonest case and the one where adopting a framework is most often reflex, not reasoning.
- You are learning the mechanics. Build it once by hand and the concerns stop being a list.
- Something else owns durability. One durability system per run.
- The control flow is unusual. If you cannot name what the framework forbids, you do not have this case.
- You must own the stop rules. Step budget, repeat detection and cost ceiling live in the only place that sees the whole trajectory. We keep the loop ourselves for this reason and adopt everything around it.
- Auditability. The exact bytes sent to the model must be yours.
Where we landed, and why
How to run the choice
- Mark the concerns first. Take the list of fourteen concerns and mark each Must, Should or Won't. At most five Musts. The Won'ts are the most useful marks, because they let you reject a capable product cleanly.
- Count what you would still build. For each candidate, list the Musts it scores low on. That is your build list. Identity, evaluation and cost limits are supplied by none of them.
- Pilot two tasks. One representative real task, and one that breaks things: a long run, an approval, a tool failing halfway, an adversarial user. Every framework demos well on the first. Differences show only in failure.
- Write the decision down with the alternatives, what you accepted, the exit cost and the trigger to revisit.
Check before you rely on this
- Names and versions move. The Microsoft framework merged Semantic Kernel and AutoGen (reported 1.0 in April 2026). Google's agent platform was renamed during 2026 and reports disagree on ADK version dates. The Claude Agent SDK was formerly the Claude Code SDK.
- Model support. Whether the OpenAI SDK works well with non-OpenAI models, and which models each cloud's framework supports, should be tested on your own task.
- Hosted runtimes. Features, regions and exit paths differ by cloud and change; read the vendor's current documentation.
- Sources used for the product facts (mostly secondary reports; confirm against vendor pages): Visual Studio Magazine on Microsoft Agent Framework 1.0, InfoQ on the Agent Framework harness, Google Developers Blog on ADK and Agent Engine, Rubin Lake radar on Google ADK, Claude Agent SDK vs OpenAI Agents SDK, Claude Agent SDK vs OpenAI Agents SDK vs LangGraph.
Where to go next
- Agent harness architecture map: what fills each concern on each cloud.
- Agent Harness: the course.
- AI gateways: which one to use.
- Agent guardrails.