Agent framework

An agent framework is a software library or SDK that supplies the common machinery for building AI agents, such as the loop that calls a model, tool definitions, state, handoffs between agents and tracing, so developers need not write it from scratch.

At its core an AI agent is a loop. The program sends a model the task and a list of tools it may use. If the model asks to call a tool, the program runs it and sends back the result, and this repeats until the model says it has finished. Agent frameworks package that loop together with the parts around it: defining tools and parsing the model's requests to use them, keeping state across steps, passing work between several agents, checking inputs and outputs, and recording every step so developers can see what happened.

Examples span several years. AutoGen, described in an August 2023 paper by Qingyun Wu and colleagues, is an open-source framework built around multiple agents that talk to each other to finish a task. On March 11, 2025 OpenAI released its Agents SDK, an open-source successor to its experimental Swarm project, offering handoffs between agents, guardrails that check inputs and outputs, and tracing. Anthropic's guide to building agents names its own Claude Agent SDK and AWS's Strands Agents SDK, along with visual workflow builders such as Rivet and Vellum.

Anthropic's December 2024 guide Building effective agents draws a useful line between workflows, where developer code fixes the sequence of model and tool calls, and agents, where the model decides its own steps. The guide calls both agentic systems and recommends the simplest solution that works, adding complexity only when needed.

Frameworks make starting easy, but the same guide warns that their layers of abstraction can hide the actual prompts and responses, which makes problems harder to debug and tempts developers to add complexity they do not need. It recommends starting with direct calls to a model's API, since many agent patterns take only a few lines of code, and making sure you understand the code beneath any framework you adopt.

In practice, choosing a framework is much like choosing a web framework. The questions are whether it works with several model providers, how well it shows what the agent did, how hard it would be to leave, and how actively it is maintained. OpenAI's SDK, for example, works with any provider that offers an API in the style of its Chat Completions endpoint.

Common questions

Do I need a framework to build an AI agent?

No. A basic agent is a loop of model calls and tool calls that can be written in a few lines of code against a provider's API. Frameworks save time on tracing, multi-agent handoffs and guardrails, but Anthropic's guidance is to start simple and add a framework only when it earns its place.

Which agent framework is best?

There is no single best choice. It depends on which models you use, whether you need several agents working together, how much visibility you need into each step, and your team's language and tooling. Compare how each one handles debugging and switching model providers.

What is the OpenAI Agents SDK?

It is an open-source library OpenAI released on March 11, 2025 for building single-agent and multi-agent systems. It provides agents with instructions and tools, handoffs between agents, guardrails for checking inputs and outputs, and tracing, and it replaced OpenAI's earlier experimental Swarm project.

What is the difference between an AI workflow and an AI agent?

In a workflow, the developer's code fixes the order of model calls and tool calls in advance. In an agent, the model decides which steps to take and which tools to use as it goes. Anthropic's guide recommends the simplest solution that works and adding complexity only when needed.

Finding more

Search for "agent framework comparison", "building effective agents" or the name of a specific SDK to see how the options differ. The frameworks' own documentation and code repositories are the most reliable sources for features, while engineering guides from model providers explain the underlying patterns. Comparison articles date quickly, so check when they were written.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.