cloudparts

Agent frameworks

Libraries that run the agent loop for you: they call the model, execute tools, keep state between steps, and add checkpoints, streaming, human approval and tracing around it.

5 technologies on this page ↓

How it works

The agent loop itself is a few lines: call the model, run the tools it asks for, send back the results, repeat. A framework wraps that loop and the work around it, and frameworks differ mostly in who decides the next step. In a model-driven loop you hand over a model, a prompt and a list of tools, and the model plans its own steps; Strands Agents, LangChain’s create_agent and the OpenAI Agents SDK work this way. In a graph, or state machine, you declare nodes (functions or model calls) and edges between them, including conditional edges and cycles, over a shared state object; the model only decides where you let it. LangGraph and the workflows in Microsoft Agent Framework are graphs. Older chains are graphs without cycles: each call feeds the next in a fixed order. Genkit’s flows are plain functions wrapped with typed input and output schemas, streaming and traces. Around the loop, frameworks provide the same services. Tools are generated from ordinary functions, with the JSON Schema taken from type hints and docstrings. A model interface hides the differences between providers. Checkpointers save the state after every step under a thread id, so a run can resume after a crash or pause for days waiting for a person; LangChain’s human-in-the-loop middleware raises an interrupt before a listed tool runs and continues when you send back “approve” or “reject”. Stores keep long-term memory across threads. Streaming sends tokens and intermediate steps to the user as they happen, and tracing records every model and tool call so you can debug and evaluate a run afterwards.

Think of it as

The kitchen system around a gifted but forgetful chef. The ticket rail holds the state of every order, so when the chef steps out, whoever comes next carries on from the last ticket (checkpoints). Some kitchens let the chef decide the whole menu as the night goes (a model-driven loop); others fix the stations and the order of the courses and let the chef improvise only at one of them (a graph). The expediter checks a plate before it leaves the kitchen (human approval), and the order log shows afterwards what happened to every dish (tracing).

Reach for it when

  • Runs that last minutes to days and must survive a crash or wait for a person’s approval: that needs persisted state, not a variable in one process
  • Processes that mix fixed steps with model decisions, best written as a graph with branches and loops
  • You want to switch model providers without rewriting message formats, tool calling and streaming
  • You need a trace of every model and tool call to debug the agent and evaluate changes

Think twice when

  • One model call or a short loop does the job: Anthropic suggests starting with the model API directly, since many patterns take a few lines of code
  • Nobody on the team knows what the framework actually sends to the model: extra layers hide prompts and responses, and wrong assumptions about them are a common source of errors
  • Your agent doesn’t fit the framework’s built-in loop: LangChain’s own users reported its abstractions were sometimes too heavy and hard to customize, which shaped the slimmer 1.0

A real example

Clare Liguori’s team at AWS began building agents for Amazon Q Developer in early 2023, when models weren’t trained to act as agents. Each agent needed long prompt instructions on using tools, parsers for the model’s replies and orchestration code, and the team relied on several complex agent frameworks. As models gained native tool use and reasoning, those frameworks started to get in the way. So the team wrote Strands Agents, where an agent is a prompt plus a list of tools and the model plans its own steps; even multi-agent patterns such as a graph or a swarm of sub-agents are tools the model can choose. Teams that had needed months to take a new agent from prototype to production now shipped in days and weeks, and Amazon Q Developer, AWS Glue and VPC Reachability Analyzer ran Strands agents in production when AWS open-sourced it under Apache 2.0 in May 2025. The loop and the tools can also be split: the agent runs in a Fargate container and calls tools that run as Lambda functions.

Technologies

Specific products, and what each does differently.

Also used for agent frameworks

Products of other kinds that are often used this way, grouped by what they are.

What each provider calls it

AWS
Strands Agents (open source, from AWS); Amazon Bedrock AgentCore Runtime hosts agents built with any framework, including LangGraph, CrewAI, LlamaIndex, Google ADK and the OpenAI Agents SDK
Google Cloud
Agent Development Kit (ADK), in Python, TypeScript, Go, Java and Kotlin; Genkit, with flows for JavaScript, Go, Dart and Python (preview)
Azure
Microsoft Agent Framework, the successor to Semantic Kernel and AutoGen, with graph-based workflows
Open source & others
LangChain and LangGraph (MIT), OpenAI Agents SDK, LlamaIndex, Haystack, CrewAI

Who decides the next step#

The main difference between frameworks is how much of the path you write down and how much the model chooses.

StyleYou writeThe model decidesExamples
Model-driven loopA prompt and a list of toolsEvery step, until it answers in textStrands Agents, LangChain create_agent, OpenAI Agents SDK
Graph or state machineNodes, edges and a shared state, with cycles allowedOnly at the nodes and branches you give itLangGraph, Microsoft Agent Framework workflows
ChainA fixed sequence of calls, each feeding the nextNothing about the orderClassic LangChain chains
FlowA function with typed input and output schemasWhatever the code inside asks itGenkit flows
  • The styles combine: LangChain’s create_agent runs its model-driven loop on the LangGraph runtime, and Strands exposes graphs and swarms of sub-agents as tools the model can pick.

In code · python

from langchain.agents import create_agent
from langchain.agents.middleware import HumanInTheLoopMiddleware
from langchain.tools import tool
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.types import Command


@tool
def execute_sql(query: str) -> str:
    """Run a SQL statement against the orders database."""
    return "3 rows deleted"


agent = create_agent(
    model="gpt-5.5",
    tools=[execute_sql],  # schema comes from the type hints and docstring
    middleware=[
        HumanInTheLoopMiddleware(interrupt_on={"execute_sql": {"allowed_decisions": ["approve", "reject"]}}),
    ],
    checkpointer=InMemorySaver(),  # state after every step; use a Postgres checkpointer in production
)

config = {"configurable": {"thread_id": "ticket-4521"}}  # one thread = one resumable run
result = agent.invoke(
    {"messages": [{"role": "user", "content": "Delete test orders older than 30 days"}]},
    config=config,
    version="v2",
)
print(result.interrupts)  # paused before execute_sql, with the proposed query

# Later, once someone has reviewed the query: same thread id, so the run continues
agent.invoke(Command(resume={"decisions": [{"type": "approve"}]}), config=config, version="v2")

Often confused with

Where it came from2022–2025

LangChain started as Harrison Chase’s open-source side project: the first version of the Python package came out on October 24, 2022, as “a python package aimed at helping build LLM applications through composability”: a collection of pieces, combined through one interface into a single “chain”. Chains run in a fixed order, as a directed acyclic graph, which suits pipelines but not agents that loop until they are done.

In January 2024 LangChain released LangGraph to add those cycles: an agent became a state machine written as a graph, with a special END node because every cycle has to stop. Other vendors built their own. Microsoft had Semantic Kernel and AutoGen for multi-agent orchestration, Google introduced Firebase Genkit in May 2024 as an open-source JavaScript and TypeScript framework built around flows, and OpenAI turned its experimental Swarm into the Agents SDK.

As models learned to call tools natively, frameworks got thinner. AWS released Strands Agents in May 2025 because heavy orchestration had started to get in the way of better models. In October 2025 LangChain 1.0 cut the package back to the core agent loop plus middleware hooks, running on LangGraph, and promised no breaking changes until 2.0; Microsoft merged Semantic Kernel and AutoGen into Agent Framework. What frameworks still add is mostly operational: durable state, human approval, streaming and tracing.

Why it’s built this way

Graphs with cycles instead of chains
LangChain’s chains were directed acyclic graphs, like most data orchestration tools, but agents run a model in a loop that decides what to do next. LangGraph let developers write that loop as a state machine they could still constrain.
Save state as checkpoints per thread
A checkpoint after every step gives conversation continuity, recovery from failures and the ability to pause for a person. LangChain’s human-in-the-loop middleware requires a checkpointer for exactly that reason.
Let the model drive instead of hand-coded orchestration
Strands’ authors found that once models could plan and call tools natively, encoding the plan in the framework slowed teams down; a prompt and a list of tools was enough.
Middleware hooks instead of more prebuilt agent types
LangChain users wanted control over the agent loop without dropping to raw model calls. Version 1.0 added hooks around each step for things like summarizing old messages, redacting personal data and asking for approval.

Timeline

  1. 2022

    First release of the LangChain Python package (October 24)

  2. 2024

    LangGraph adds cycles: agents as state machines (January)

  3. 2024

    Google releases Firebase Genkit in beta, built around flows (May)

  4. 2025

    AWS open-sources Strands Agents, a model-driven loop (May)

  5. 2025

    LangChain 1.0 and LangGraph 1.0 (October 22)

Sources16

Improve this page on GitHub