# AI Agent Frameworks Compared 2026: What Each Remembers

> Source: <https://hindsight.ai/articles/ai-agent-frameworks>
> Published: 2026-11-30 00:00:00+00:00

**Recommendation:** Check each framework's memory default before shipping: swap LangGraph's InMemorySaver for SqliteSaver or PostgresSaver, and give OpenAI Agents SDK sessions a file path, or state is lost on restart.
More in the playbook "Running AI in production": <https://wpnews.pro/playbooks/production-ops>

# AI Agent Frameworks Compared 2026: What Each Remembers

Picture Maya. She ships a support agent on the OpenAI Agents SDK, with `SQLiteSession("user_123")` holding the conversation. It passes every test. Then the container restarts, and every returning customer is a stranger again, because a `SQLiteSession` with no file path lives in memory and is lost when the process ends.

You have probably read the lists that rank ten AI agent frameworks by GitHub stars and demo videos. Those lists don't tell you what happened to Maya. This page compares seven AI agent frameworks by task and by what each one remembers between sessions: LangGraph, CrewAI, the OpenAI Agents SDK, Pydantic AI, Google ADK, LlamaIndex and Microsoft Agent Framework. My answer is short. Pick the framework by the task you need to run, and read its memory default before you ship, because four of these seven lose their data when the process ends.

Here is what follows: a table of all seven, a section on each, the memory defaults side by side, what each gives you for orchestration, how to pick, and how to add long-term [AI agent memory](https://hindsight.ai/what-is-agent-memory) to any of them. Every fact comes from the framework's own docs, LICENSE file or PyPI page. I build Hindsight, so I say where a store stops and learning starts. For the wider field of memory products, see [agent memory systems compared](https://hindsight.ai/articles/best-ai-agent-memory-systems).

## What an AI agent framework does

An AI agent framework gives you the loop around a model: send the prompt, read the tool calls, run the tools, feed the results back, and keep some state between steps. You could write that loop yourself in an afternoon. The frameworks exist because the state, the retries, the handoffs between agents and the persistence take months.

Each project describes itself differently. LangGraph calls itself "a low-level orchestration framework for building, managing, and deploying long-running, stateful agents." CrewAI is a "framework for orchestrating role-playing, autonomous AI agents." The OpenAI Agents SDK is "a lightweight, powerful framework for multi-agent workflows." Pydantic AI describes "a typed, extensible agent loop." Google ADK is "an open-source, code-first Python toolkit for building, evaluating, and deploying sophisticated AI agents." Microsoft's Learn page says you can "build AI agents and multi-agent workflows in .NET, Python, and Go." LlamaIndex calls itself "the document processing platform for AI" and its README describes a framework "to build agentic applications."

None of those lines mention memory, and that is the subject of this page. The state a framework keeps decides whether your agent knows a returning user. Memory is not the first thing you test, so it is the thing that fails in production.

See how this looks in code: [the Hindsight LangGraph integration page](https://hindsight.vectorize.io/sdks/integrations/langgraph) shows a recall node and a retain node that sit inside a graph you already have.

## AI agent frameworks at a glance

This table holds the facts that matter for memory. The "lost on restart" column answers one question: if the process ends and you did nothing to configure storage, is the data gone?

| Framework | Licence | Install | Short-term state by default | Long-term store | Lost on restart by default? | Hindsight package | 
|---|---|---|---|---|---|---|
| LangGraph | MIT | `pip install -U langgraph` | Checkpointers keep graph state for one thread | Stores ( `BaseStore` ) keep JSON documents across threads | Depends on the class you pick: `InMemorySaver` and`InMemoryStore` are in-process,`SqliteSaver` and`PostgresSaver` are not | `hindsight-langgraph` | 
| CrewAI | MIT | `uv tool install crewai` | One `Memory` class, on with`memory=True` | LanceDB under `./.crewai/memory` | No, it writes to disk in the working folder | `hindsight-crewai` | 
| OpenAI Agents SDK | MIT | `pip install openai-agents` | Session classes | Your choice of session class | Yes for `SQLiteSession` with no file path | `hindsight-openai-agents` | 
| Pydantic AI | MIT | `uv add pydantic-ai` | Message history you pass in with `message_history` | Your application stores and reloads it | Depends on your code | `hindsight-pydantic-ai` | 
| Google ADK | Apache 2.0 | `pip install google-adk` | A `Session` per conversation | `MemoryService` | Yes for `InMemoryMemoryService` | `hindsight-google-adk` | 
| LlamaIndex | MIT | `pip install llama-index-core` | `Memory` class, a FIFO queue with`token_limit` 30000 | Memory blocks | Yes, default storage is an in-memory SQLite database | `hindsight-llamaindex` | 
| Microsoft Agent Framework | PyPI lists MIT | `pip install agent-framework` | `AgentSession` | Context providers | Yes for the harness default, `InMemoryHistoryProvider` | `hindsight-agent-framework` | 

Three columns do the work: short-term state, long-term store and lost on restart. A framework that keeps short-term state by default and leaves the long-term store to you is doing its job. The failure comes when you assume the store exists and the default is a Python object in RAM.

AutoGen is not in the table. Its repository was archived on November 20, 2026, and the [FAQ below](#frequently-asked-questions) says what that means.

## The 7 AI agent frameworks, one by one

Each section below gives the same four parts: what the framework is for, how it keeps state, one limit with its source, and the Hindsight integration for it.

### LangGraph

LangGraph is for agents that run for a long time and keep state. The [LangGraph repository](https://github.com/langchain-ai/langgraph) is MIT licensed, with 45.6k stars as of November 2026, and the [LICENSE file](https://github.com/langchain-ai/langgraph/blob/main/LICENSE) names LangChain, Inc. as the copyright holder.

The [persistence docs](https://docs.langchain.com/oss/python/langgraph/persistence) say: "LangGraph's persistence layer gives agents short-term memory through checkpointers and long-term memory through stores." A checkpointer keeps graph state for one thread. A store keeps key-value data across threads, as JSON documents under a namespace and a key. The classes include `InMemorySaver`, `InMemoryStore`, `SqliteSaver` and `PostgresSaver`. You pick the class, so you pick whether a restart loses the data.

One limit: a store keeps what your code writes into it, and the [long-term memory docs](https://docs.langchain.com/oss/python/langgraph/memory) describe it as user-specific or application-level data "shared across conversational threads." Deciding what to write is your job.

LangChain also publishes a memory library, [LangMem](https://langchain-ai.github.io/langmem/). It is a Python library under the MIT licence, installed with `pip install -U langmem`, with three memory types (semantic, episodic and procedural) and two update modes, in the conversation or in the background. Its docs list no hosted service. I compare it with Mem0 in [LangMem vs Mem0](https://hindsight.ai/articles/langmem-vs-mem0), and with Hindsight in [Hindsight vs LangChain memory](https://hindsight.ai/articles/hindsight-vs-langchain-memory).

Hindsight: `pip install hindsight-langgraph`. The integration gives you three patterns: tools (` hindsight_retain`, `hindsight_recall`, `hindsight_reflect`) for `bind_tools` or `ToolNode`, graph nodes (` create_recall_node` and `create_retain_node`), and a `HindsightStore` that implements `BaseStore`, async only. The [LangGraph integration page](https://hindsight.vectorize.io/sdks/integrations/langgraph) has the code.

### CrewAI

CrewAI is for teams of agents with roles. The [CrewAI repository](https://github.com/crewAIInc/crewAI) is MIT licensed with 61.4k stars as of November 2026. Its README lists Python 3.10 and above, below 3.14.

The [CrewAI memory docs](https://docs.crewai.com/concepts/memory) describe "a single `Memory` class that replaces separate short-term, long-term, entity, and external memory types." The default storage is LanceDB under `./.crewai/memory`, and you turn memory on with `memory=True` on the `Crew`. So the data sits in a folder next to your code.

One limit: the default embedder is OpenAI's `text-embedding-3-large`.

Hindsight: `pip install hindsight-crewai`. It provides a `HindsightStorage` backend for CrewAI's `ExternalMemory` (save, search, reset), a `HindsightReflectTool` and per-agent banks. It needs a running Hindsight API server. See the [CrewAI integration page](https://hindsight.vectorize.io/sdks/integrations/crewai).

### OpenAI Agents SDK

The OpenAI Agents SDK is for multi-agent workflows on OpenAI models. The [openai-agents-python repository](https://github.com/openai/openai-agents-python) is MIT licensed with 30.9k stars as of November 2026.

The [Sessions page](https://openai.github.io/openai-agents-python/sessions/) says the SDK has "built-in session memory to automatically maintain conversation history across multiple agent runs." The session classes include `SQLiteSession`, `RedisSession`, `SQLAlchemySession`, `MongoDBSession`, `DaprSession`, `OpenAIConversationsSession` and `EncryptedSession`.

The limit is Maya's: `SQLiteSession("user_123")` is in memory and is lost when the process ends. A file path makes it persistent. One argument is the difference between a demo and a product.

Hindsight: `pip install hindsight-openai-agents openai-agents`. It adds function tools (` hindsight_retain`, `hindsight_recall`, `hindsight_reflect`) and `memory_instructions()`, which injects memories into the agent's instructions. It needs Python 3.10 or later and `openai-agents` 0.7.0 or later. See the [OpenAI Agents SDK integration page](https://hindsight.vectorize.io/sdks/integrations/openai-agents).

### Pydantic AI

Pydantic AI is for typed Python agents. The [pydantic-ai repository](https://github.com/pydantic/pydantic-ai) is MIT licensed with 21.5k stars as of November 2026.

Its [message history docs](https://pydantic.dev/docs/ai/core-concepts/message-history/) say: "The primary use of message histories in Pydantic AI is to maintain context across multiple agent runs." You pass the history in with the `message_history` parameter. Where it lives between runs is up to your application.

One limit: the message history page describes history that you pass in. Keeping it between runs, in a file or a database, is your code's job.

Hindsight: `pip install hindsight-pydantic-ai`. The integration provides async tools (retain, recall, reflect) and `memory_instructions`, which injects memories on each run. It has a tools-only mode and an instructions-only mode. See the [Pydantic AI integration page](https://hindsight.vectorize.io/sdks/integrations/pydantic-ai).

### Google ADK

Google ADK is for agents that run on Google's stack. The [adk-python repository](https://github.com/google/adk-python) is Apache 2.0 licensed with 22.4k stars as of November 2026, and the README asks for Python 3.11 or later.

Say Dev builds a research agent on ADK with `InMemoryMemoryService`. `add_session_to_memory` and `search_memory` work all week in development. The first deploy restarts the service, and the table in the [ADK memory docs](https://adk.dev/sessions/memory/) says what happens: for `InMemoryMemoryService`, persistence is "None, data is lost on restart." For `VertexAiMemoryBankService` the same table says "Yes, managed by the Agent Platform."

That is the split in ADK. A `Session` tracks the events and state of one conversation. Long-term knowledge is a separate `MemoryService`, and you choose which one.

Hindsight: `pip install hindsight-google-adk`. `HindsightMemoryService`, a `BaseMemoryService`, goes in as `Runner(memory_service=...)`. It retains sessions when they end and serves `search_memory`. The default bank id template is `{app_name}::{user_id}`. It needs `google-adk` 2.0 or later. See the [Google ADK integration page](https://hindsight.vectorize.io/sdks/integrations/google-adk).

### LlamaIndex

LlamaIndex is for agents over documents. The [llama_index repository](https://github.com/run-llama/llama_index) is MIT licensed with 53.1k stars as of November 2026. Its README says "our primary focus has shifted towards LlamaParse", the project's document parsing product.

The [memory docs](https://developers.llamaindex.ai/python/framework/module_guides/deploying/agents/memory/) say "The `ChatMemoryBuffer` is deprecated." The `Memory` class replaces it. Short-term memory is a FIFO queue with a `token_limit` that defaults to 30000. Long-term memory uses memory blocks: `StaticMemoryBlock`, `FactExtractionMemoryBlock` and `VectorMemoryBlock`.

The limit: the default storage is "an in-memory SQLite database." Same trap as the OpenAI default. I compare the memory products around it in [Hindsight vs LlamaIndex memory](https://hindsight.ai/articles/hindsight-vs-llamaindex-memory).

Hindsight: `pip install hindsight-llamaindex`. `HindsightMemory` is a `BaseMemory` that recalls before each input and retains each message, and `HindsightToolSpec` exposes the tools with `to_tool_list()`. It needs Python 3.10 or later and `llama-index-core` 0.11.0 or later. See the [LlamaIndex integration page](https://hindsight.vectorize.io/sdks/integrations/llamaindex).

### Microsoft Agent Framework

The Microsoft Learn overview says you can "build AI agents and multi-agent workflows in .NET, Python, and Go with Microsoft Agent Framework." It lists Microsoft Foundry, Anthropic, Azure OpenAI, OpenAI and Ollama as model providers, and names AutoGen and Semantic Kernel as earlier Microsoft projects. The [PyPI page](https://pypi.org/project/agent-framework/) lists the MIT license, and shows version 1.26.0, released November 12, 2026, for Python 3.11 or later. The first 1.0.0 release is dated April 2, 2026. The repository link on that PyPI page returned a 404 as of November 2026, so I link the [Learn overview](https://learn.microsoft.com/en-us/agent-framework/overview/) and PyPI.

The overview names "an agent session for state management, context providers for agent memory." The [session docs](https://learn.microsoft.com/en-us/agent-framework/concepts/agents/conversations/session) call `AgentSession` "the conversation state container used across agent runs", and the default history provider in the harness is `InMemoryHistoryProvider`.

One limit: the [chat history memory provider page](https://learn.microsoft.com/en-us/agent-framework/concepts/agents/conversations/chat-history-memory-provider) says the provider stores history "in a vector store", and its Python tab says: "This provider is not yet available for Python."

Hindsight: `pip install hindsight-agent-framework`, then `export HINDSIGHT_API_KEY=your-hindsight-key`. The integration is a context provider, `HindsightProvider(bank_id="user-123")`. Its `before_run` step recalls memories into a "## Memories" block, and `after_run` retains the input and the response. It adds no model-called tools. See the [Microsoft Agent Framework integration page](https://hindsight.vectorize.io/sdks/integrations/agent-framework).

## What each AI agent framework remembers between sessions

Strip the seven down and the pattern is the same. Each framework keeps short-term state: a thread, a session or a message history. Each leaves long-term memory to a store you choose and configure. Nothing is wrong with that design. It is a clean separation, and it moves one decision onto you.

Four documented defaults lose their data when the process ends: the OpenAI `SQLiteSession` with no file path, Google ADK's `InMemoryMemoryService`, the Microsoft harness's `InMemoryHistoryProvider`, and LlamaIndex's "in-memory SQLite database." LangGraph's `InMemorySaver` and `InMemoryStore` are in-process too, but the docs also list the SQLite and Postgres classes beside them, so the choice sits in front of you.

The persistent options keep what the code writes. LangGraph stores keep JSON documents under a namespace and a key. CrewAI keeps LanceDB records in a folder. Both keep what the code writes. A store holds what you put in it, in the form you put it in. It does not notice that the agent made the same mistake on Tuesday as on Monday.

Here is the core of my argument. Think of a log file against a colleague. The log has every event and tells you nothing until you search it. The colleague remembers that the last deploy to staging broke the cache, and says so before you start. That second job is memory that learns from outcomes: Hindsight retains what happened, recalls what matters for the task in front of the agent, and reflects on results so the next run changes. A store is the first half of that, and the frameworks give you the first half.

If you want to see where that second half lives, **[view Hindsight on GitHub](https://github.com/vectorize-io/hindsight)**. It is open source under the MIT licence and runs on Postgres.

## AI agent orchestration: what each framework gives you

Orchestration is the other thing people compare, so here is what each project says about it. LangGraph calls itself "a low-level orchestration framework", and its unit is a graph of nodes with state. CrewAI is built for "orchestrating role-playing, autonomous AI agents", so its unit is a crew of agents with roles. The OpenAI Agents SDK says "multi-agent workflows", and Microsoft Agent Framework says "AI agents and multi-agent workflows." Pydantic AI describes "a typed, extensible agent loop", which is one agent with typed inputs and outputs.

Google ADK describes a "code-first Python toolkit for building, evaluating, and deploying" agents, and LlamaIndex describes a framework "to build agentic applications." None of these lines tells you how the framework behaves when an agent restarts mid-workflow. For that, go back to the memory table above and check where the state of the workflow lives.

## How to pick an AI agent framework by task

I don't rank these. They solve different problems, and a ranking would say more about the author than about your project. Pick by the task, then check the memory default for that framework.

- A graph of steps with durable thread state: LangGraph. Before launch, choose a checkpointer class that writes to SQLite or Postgres.
- A crew of agents with roles and goals: CrewAI. Check that the working folder survives a deploy.
- Agents on OpenAI models, with sessions in SQLite, Redis or SQLAlchemy: the OpenAI Agents SDK. Give every `SQLiteSession` a file path.
- Typed Python where your application owns the history: Pydantic AI. Decide where the history is stored and reloaded.
- Agents on Google Cloud with a managed memory service: Google ADK. Replace `InMemoryMemoryService` before the first deploy.
- Agents over documents: LlamaIndex. Replace the in-memory SQLite default.
- .NET, Python or Go agents on Microsoft Foundry and other model providers: Microsoft Agent Framework. Replace `InMemoryHistoryProvider` for anything that must outlive the process.

Notice that one line repeats: replace the default. That is the memory check, and it takes ten minutes. I'd do it on day one.

## Add long-term memory to any AI agent framework with Hindsight

Hindsight is not on the list because it is not a framework. It is the memory layer you put under whichever framework you pick. Each integration is one pip package. I copied these lines from the live integration pages:

| Framework | Install | 
|---|---|
| LangGraph | `pip install hindsight-langgraph` | 
| CrewAI | `pip install hindsight-crewai` | 
| OpenAI Agents SDK | `pip install hindsight-openai-agents openai-agents` | 
| Pydantic AI | `pip install hindsight-pydantic-ai` | 
| Google ADK | `pip install hindsight-google-adk` | 
| LlamaIndex | `pip install hindsight-llamaindex` | 
| Microsoft Agent Framework | `pip install hindsight-agent-framework` , then`export HINDSIGHT_API_KEY=your-hindsight-key` | 

Here is the Microsoft Agent Framework example from [its integration page](https://hindsight.vectorize.io/sdks/integrations/agent-framework). The provider recalls before each run and retains after it:

``` python
from agent_framework.openai import OpenAIChatClient
from hindsight_agent_framework import HindsightProvider

agent = OpenAIChatClient().as_agent(
    name="assistant",
    instructions="You are a helpful assistant.",
    context_providers=[HindsightProvider(bank_id="user-123")],
)

session = agent.create_session()
await agent.run("Remember that I prefer vegetarian food.", session=session)
await agent.run("Suggest a recipe.", session=session)  # recalls the preference
```

Picture Sam's team. They prototype on CrewAI, then move one agent to Pydantic AI. Their memory should not stay behind with the old framework. The CrewAI integration keeps per-agent banks, and the Hindsight integration pages use `bank_id="user-123"` in their examples. Before the move, Sam's team opens the [Pydantic AI integration page](https://hindsight.vectorize.io/sdks/integrations/pydantic-ai) and the [CrewAI integration page](https://hindsight.vectorize.io/sdks/integrations/crewai) and checks how each one names a bank.

The proof that the memory layer works comes from the benchmark. Hindsight scores 94.6% answer accuracy on LongMemEval-S (Hindsight v0.4.19, [Agent Memory Benchmark](https://hindsight.vectorize.io/blog/2026/03/23/agent-memory-benchmark), single-query mode) as of November 2026. The AMB post defines accuracy as whether the agent answers questions correctly using its memory. The [Hindsight benchmark results](https://hindsight.ai/benchmarks) page has the rest, and [memory MCP servers compared](https://hindsight.ai/articles/memory-mcp) covers the same layer from the MCP side.

To try it, **[start with the Hindsight Cloud sign-up](https://ui.hindsight.vectorize.io/signup)**. If you want to run it yourself first, Hindsight is open source under the MIT licence and runs on Postgres, so you can self-host before you decide anything.

## Frequently Asked Questions

**Do I need an AI agent framework to build an agent?**
No. An agent is a loop around a model, and you can write it directly. A framework saves you the state handling, the handoffs between agents and the persistence code. Take one when you need those, and check its memory default before you ship.

**What is AI agent orchestration?**
Orchestration is the control of how agents, tools and steps run together: which agent acts next, what state it sees and when the workflow ends. Each framework gives it a different unit, a graph, a crew or a typed loop. The orchestration section above lists them.

**Is AutoGen still maintained?**
No. The repository page says it "was archived by the owner on Nov 20, 2026. It is now read-only." The README says: "Microsoft is not providing bug fixes, security fixes, new features, or support for this project." Read the [AutoGen repository](https://github.com/microsoft/autogen) before you touch it, and start new work elsewhere.

**Which other AI agent frameworks work with Hindsight?**
Hindsight's integrations list has 33 entries in the framework category. Besides the seven above, they include Strands Agents, Agno, Haystack, AG2, SmolAgents and the Claude Agent SDK. Each has its own integration page on hindsight.vectorize.io.
