10 Open Source AI Agent Frameworks: Which One Would You Build With?
< BlogDeep Dives
December 1, 2026
35 minutes read

10 Open Source AI Agent Frameworks: Which One Would You Build With?

Getting an AI agent to call its first tool has become almost ridiculously easy. OpenAI, Google, and Microsoft each have their own AI agent framework, and they’re just the tip of a growing iceberg of independent projects, most of which you can set up with a few lines of code.

Sounds great, right? Here’s the catch, though — once you start building something you'd trust to run unsupervised, you’ll find that much of the engineering work has little to do with the AI itself.

Let’s take error recovery as an apt and often painful example. A refund-processing agent might successfully issue a payment, only for the application to crash before saving its progress. Unless the application can account for the transaction that already went through, restarting the workflow could mean refunding the customer twice.

It's worth thinking about these less glamorous engineering problems before committing to an AI agent framework. How much infrastructure will you need to build by yourself in order to handle interrupted workflows, human approvals, coordination between agents, and memory across sessions?

That’s why we've taken a hard look at ten of what we believe are currently the best open source AI agent frameworks. We scrutinized their official documentation and repositories, examined how each coordinates work, what it persists between runs, and how much control it gives developers over execution.

Since here at cognee we build an AI agent memory layer, we naturally have a vested interest in the memory side of this comparison. Several of the frameworks in this guide already offer capable memory systems that may be perfectly adequate for your use case. We'll give each its due and explain as objectively as possible when there's a good reason to manage memory independently, allowing agents built with different frameworks to access and build on the same knowledge.

But, before we get ahead of ourselves, let’s first define the basics.

What is an AI agent framework?

An AI agent framework, also called an agentic AI framework, is a software library that connects a language model to tools and runs the loop between them. The model receives instructions and descriptions of the available tools and asks for a tool call; the framework runs the tool, passes the result back, and repeats until the agent produces a final answer or hits a stopping condition. Depending on the library, it also handles branching, delegation to other agents, workflow state, approvals and tracing.

The model only proposes actions. Your application executes the ones it permits, validates data and handles failures, so the authorization check for an API call belongs in your code even when the model decided to make the call.

An SDK provides the libraries and tools developers use to build agents, a runtime handles their execution, and a managed platform adds services such as hosting, scheduling, and monitoring. LangChain, for example, is a higher-level framework whose agents are built on LangGraph, an orchestration runtime that developers can also use independently. LangSmith is a separate commercial product for tracing, evaluation, and deployment.

For a task made of a few predictable model and API calls, plain application code is often simpler. Anthropic's guide to building effective agents suggests starting with LLM APIs directly, because frameworks "often create extra layers of abstraction that can obscure the underlying prompts and responses." A framework starts saving you work once the branching, saved state and coordination would otherwise be code you write and maintain yourself.

A glance at the AI agent framework ecosystem

When choosing among the vast array of frameworks on offer today, you can rule out quite a few candidates simply by looking at the programming language your application uses. Once you've narrowed the list, the more interesting question becomes how much freedom you're prepared to give the agent over its own execution.

The same guide outlines a helpful way of thinking about this. It defines workflows as systems where “LLMs and tools are orchestrated through predefined code paths,” and agents as systems where models “dynamically direct their own processes and tool usage.”

Many of the frameworks below now accommodate both. For example, you might want an agent to decide which customer records it needs to examine, but you'd probably prefer to define the approval and refund steps yourself. When comparing frameworks, pay attention to how easily you can combine these two execution models and how much of the underlying infrastructure you'll need to implement yourself.

FrameworkLanguagesExecution modelCore licenseBest for
LangGraphPython, JavaScript/TypeScriptStateful graphs with branching and checkpointsMITCustom control flow, approvals and resumable workflows
CrewAIPythonRole-based Crews and event-driven FlowsMITSplitting tasks among specialist agents
OpenAI Agents SDKPython, JavaScript/TypeScriptAgent loops, tools and handoffsMITDelegation between agents coordinated in application code
Google ADKPython, TypeScript, Go, Java, KotlinAgent delegation and graph workflowsApache 2.0Agents built and deployed on Google Cloud
Microsoft Agent FrameworkPython, C#/.NET; Go in previewAgents plus functional and graph-based workflowsMITAgent workflows in .NET and Microsoft-based applications
Pydantic AIPythonTyped tools, dependencies and outputsMITApplications that need validated data and typed interfaces
LlamaIndexPythonRetrieval components and event-driven workflowsMITAgents that work over large document collections
HaystackPythonComponent pipelines and tool-calling agentsApache 2.0Configurable retrieval pipelines that agents call
MastraTypeScriptAgents and composable workflowsApache 2.0, with source-available ee/ codeAgents inside TypeScript applications
AgnoPythonAgents, teams and step-based workflowsApache 2.0Agents served through a built-in runtime and API

Don't assume that every language listed above gives you access to the same features. Google ADK 2.0, for instance, supports graph workflows in Python, Go, and TypeScript, with experimental support in Kotlin and no equivalent currently available in Java. Our comparisons below focus on the Python SDKs where available, with Mastra being the TypeScript exception (LlamaIndex's TypeScript framework and TypeScript workflow engine have both been archived, which is why we've listed Python only).

It's also worth looking beyond the license when estimating what your application will cost. The licenses in the table apply to the core libraries, and some projects have separately licensed components. Mastra's license, for example, puts code in its ee/ directories under source-available terms that require a commercial agreement for production use.

Many of the companies behind these frameworks also offer commercial services that take some of the operational work off your hands. LangChain has LangSmith, CrewAI has AMP, deepset offers a commercial platform for Haystack, and LlamaIndex provides document-processing services through LlamaParse. You can build with the open source libraries without subscribing to these services, but you'll still need to budget for model calls, hosting, storage, and the engineering work involved in maintaining your application.

The cream of the AI agent framework crops

Let's now hold up a mirror to the frameworks themselves. Some of the platforms below started as libraries for orchestrating LLM calls, others grew out of document retrieval or multi-agent research. Their origins help explain the design decisions behind their current APIs and why you might prefer one over another. Our goal here is to cover:

  • how each handles execution
  • what its native memory can do, and
  • how much engineering work it leaves to you.

1. LangGraph: explicit control over agent execution

LangGraph Studio showing a planning agent's graph, from the start node through plan, reflect and call-tool nodes to a tool node, a forced-response node or the end, next to a thread where the agent calls its send_response tool

A planning agent's graph and latest thread in LangGraph Studio, opened from LangSmith.

LangGraph has you define the steps of a workflow and the routes between them. In its graph API, nodes do the work and read or update shared state, such as retrieved documents, a draft answer and a reviewer's feedback. Edges decide which node runs next, and conditional edges choose a path based on that state. If a standard tool-calling loop is all you need, LangChain's create_agent builds one that runs on LangGraph.

In a research agent with a review step, the graph can send the task back to retrieval when the reviewer asks for more evidence, and an interrupt can pause the run until a person responds.

LangGraph's persistence splits agent state from agent memory. Checkpointers save a thread's execution state so a run can resume, and stores keep information your application chooses to save across threads. Stores support semantic search once you configure an embedding model, and your code decides what gets saved and when it's retrieved.

To recover from a process restart, you need a persistent checkpointer. When a run resumes after an interrupt, LangGraph restarts the interrupted node from the beginning, so an API call made before the interrupt runs again unless you make it idempotent.

Solid choice for: agents whose every step has to be traceable, such as approval flows in finance or operations, and runs that wait hours or days for a person before continuing.

Probably not for: open-ended tasks where the model should plan its own path, since a graph fixes the possible routes in advance.

2. CrewAI: agent roles within structured workflows

CrewAI's visual editor showing a meeting-preparation crew: three specialist agents, four tasks connected in sequence, SerperDev, Slack and Gmail tools, and a chat panel that summarizes the crew plan

A meeting-preparation crew in the visual editor of CrewAI's commercial platform.

CrewAI is a Python multi-agent framework with two main building blocks. A Crew groups agents that each have a role and tasks, and a Flow coordinates execution, keeps workflow state and mixes Crews with plain Python functions. Flows also run without any Crew.

In a proposal-writing application, one agent could research the customer while another drafts the proposal, and a Flow step could then check the draft for required fields and send incomplete ones back for revision. The drafting is model-driven, and the field checks are ordinary code.

CrewAI's memory is a single Memory class that replaced its separate short-term, long-term and entity memory types. When you save a memory without a scope, categories or an importance score, an LLM assigns them, and recall ranks records by a blend of semantic similarity, recency and importance. Storage defaults to LanceDB under ./.crewai/memory, and you can swap the storage, embedder and LLM. Several agents and Crews can share one memory instance, and a crew can also use cognee as its shared long-term memory when that knowledge has to reach applications outside CrewAI.

CrewAI has you describe roles and tasks, where LangGraph has you describe steps and the transitions between them. We'd start with a small Crew and add an agent only for a responsibility that needs its own execution, since every specialist adds model and tool calls. Compare the quality of the result with what the extra coordination and memory processing cost.

Solid choice for: work that divides the way you'd split it among colleagues, such as analysis, writing and fact-checking, when you want a multi-agent prototype running in Python quickly.

Probably not for: live chat and other requests where the user waits on every turn, because each extra agent adds to the response time, or codebases outside Python.

3. OpenAI Agents SDK: tool use and delegation in application code

OpenAI trace view of an agent workflow run in which a coordinator agent hands off to a sandbox agent, with timed spans for model responses, tool calls, sandbox commands and an output guardrail, and the selected response's model and instructions on the right

A traced Agents SDK run in OpenAI's dashboard, with a handoff from a coordinator agent to a sandbox agent.

The OpenAI Agents SDK gives you agents and a runner that loops through model requests and tool calls. It defaults to OpenAI models and can call other providers through any OpenAI-compatible endpoint or its LiteLLM and any-llm adapters, which are in beta.

Its multi-agent orchestration has two patterns. In a handoff, the specialist becomes the active agent. With agents as tools, a coordinating agent calls specialists for particular tasks and keeps control of the conversation, so a customer service assistant could pass a billing calculation to a specialist and use the result in its own reply. Both patterns keep the coordination in ordinary Python, with no graph to define.

The SDK includes tracing, guardrails and MCP support. In its human-in-the-loop flow, a run pauses on a tool call that needs approval and can be saved as a serialized RunState, then resumed once someone approves or rejects the call, even from another process. Sessions keep conversation history across runs, though they don't turn that history into a searchable knowledge base for other applications.

Solid choice for: products already built on OpenAI's API that need triage between a handful of specialist agents with as little framework code as possible.

Probably not for: processes with many branches, loops and retries, which are easier to follow and test as an explicit graph in LangGraph or Microsoft Agent Framework.

4. Google ADK: agent workflows across language stacks

ADK web UI showing the trace of a blogger agent invocation, with nested agent, LLM and tool spans, next to a chat where the agent transfers the request to a sub-agent that returns a blog post outline about Tokyo

The ADK web UI tracing a request that the root agent transfers to a sub-agent.

Google's Agent Development Kit (ADK) is available in Python, TypeScript, Go, Java and Kotlin. It's designed around Gemini and Google Cloud, and it also supports other model providers and deployment targets.

Agents can delegate to specialist agents or run workflows you define. ADK 2.0 added graph-based workflows with explicit routing, branching, parallel steps and human input, and it's generally available in Python, Go and TypeScript. Older examples use the SequentialAgent, ParallelAgent and LoopAgent classes, so check which workflow API your SDK version recommends before you copy one.

ADK keeps sessions and long-term memory apart. A SessionService stores a conversation's events and state, and sessions survive restarts only with a persistent implementation such as a database. A MemoryService stores and searches what earlier sessions produced: the built-in InMemoryMemoryService matches keywords and loses everything on restart, VertexAiMemoryBankService connects to Memory Bank, a managed Google Cloud service, and VertexAiRagMemoryService runs vector search over full conversations indexed in Google Cloud's Knowledge Engine.

ADK comes with a web UI for inspecting agent runs and an evaluation framework, and it deploys to Cloud Run or to Agent Runtime, Google's managed runtime for agents.

Solid choice for: organizations already on Google Cloud and Gemini that want one vendor-supported path from local testing to managed hosting, and agents written in Java, Go or Kotlin, which few other frameworks here support.

Probably not for: applications that must stay portable across clouds, because its managed runtime and memory service both run only on Google Cloud.

5. Microsoft Agent Framework: the successor to AutoGen and Semantic Kernel

Microsoft Agent Framework DevUI showing a four-step email spam detection workflow graph, its execution timeline and event stream, and a final output that marks an email as spam after human review

A spam-detection workflow with a human approval step, run in DevUI.

Microsoft Agent Framework combines agents with functional and graph-based workflows that connect agents and ordinary functions through execution paths defined in code. It's available for Python and .NET and supports several model providers. A Go version is in public preview, without declarative agents, CodeAct or functional workflows.

Workflow checkpoints save execution state, including pending requests such as tool approvals, and how durable they are depends on the checkpoint storage you configure. Agents keep conversational state in sessions, and context providers can retrieve information or add context before each model call. The higher-level Harness Agent, released in July 2026, bundles planning, context compaction and memory, with session file memory on by default.

Microsoft describes Agent Framework as the direct successor to AutoGen and Semantic Kernel and publishes migration guides from AutoGen and Semantic Kernel. The AutoGen repository was archived on November 20, 2026 and no longer receives fixes, while Semantic Kernel continues to ship releases.

On November 17, 2026, two unauthorized releases of the Python package, versions 1.26.1 and 1.26.2, reached PyPI with credential-stealing code. Microsoft took the GitHub repository private during its investigation and made it public again on November 25, and 1.26.0 is the latest release on PyPI as of writing. Pin the version you install and check your lockfiles for the two bad releases.

Solid choice for: .NET applications that need agents inside the existing codebase, and business processes where agents and ordinary functions share one workflow with validation and approval steps.

Probably not for: Go services until that version is complete.

6. Pydantic AI: typed tools, dependencies, and outputs

Pydantic Logfire live view listing Pydantic AI roulette agent runs with their nested model requests and tool calls, and the selected chat span showing the system prompt, the user's message and the roulette_wheel tool call

Pydantic AI agent runs traced in Logfire, Pydantic's observability platform.

Pydantic AI builds on Python type annotations and Pydantic validation. Tools take typed arguments, dependencies such as database connections arrive through a RunContext, and an agent's structured output can be a Pydantic model.

When an agent turns incoming support tickets into records with a category, a priority and a recommended action, validation catches a missing field or a wrong type and lets the model retry. It can't tell whether the category is correct, so classification accuracy needs its own evaluation.

Pydantic Graph provides typed workflows for control flow beyond a single agent loop, and Pydantic AI has durable execution integrations for Temporal, DBOS, Prefect, Restate and AWS Lambda, among others. Pydantic Evals and Logfire handle testing and monitoring.

Long-term memory comes from the separate Pydantic AI Harness package. Its default store keeps memories only for the life of the process, and file, SQLite and PostgreSQL backends make them persistent. Memories are scoped by namespace and agent name, and the agent searches them with tools it calls when needed.

Search matches literal text without semantic ranking, and the documentation notes that memory records don't carry source citations. Under Temporal or Prefect, the memory snapshot loaded into a run is recorded and reused on replay, so the code that selects the store and namespace has to be deterministic and free of backend I/O.

Solid choice for: FastAPI and other Pydantic-based Python services, where agents reuse the models and validation code you already have and their output goes straight into typed code without parsing free-form text.

Probably not for: role-based multi-agent setups, where CrewAI or the OpenAI Agents SDK provide delegation patterns ready-made, or TypeScript stacks.

7. LlamaIndex: document retrieval and event-driven workflows

LlamaAgents Workflow Debugger showing a completed run of a processor workflow: its event graph from ProcessingInput through the process step to ProcessedOutput, the event stream, and the final JSON result

A completed run in the LlamaAgents Workflow Debugger, with its event graph and event stream.

LlamaIndex is built for applications that depend on external data. Its Python libraries handle document loading, indexing and retrieval, with integrations for databases and model providers.

FunctionAgent runs model-directed tool calls, and AgentWorkflow coordinates several agents and the handoffs between them. LlamaAgents and Workflows add event-driven execution, in which each step responds to events and emits new ones. A query engine over a document collection can become a tool, so a research assistant can choose which collection to search for each question.

LlamaIndex's Memory class keeps recent messages in a first-in, first-out queue and can pass older ones to long-term memory blocks for static information, extracted facts or vector retrieval. Agents default to the older, deprecated ChatMemoryBuffer, so pass a Memory object to use the blocks. Workflow execution state is kept separately in a Context, which can be serialized and restored when its contents are compatible with the chosen serializer.

LlamaIndex can also use cognee for graph retrieval of connected entities alongside document passages, through the llama-index-graph-rag-cognee package, as in our LlamaIndex and cognee GraphRAG example, whose code predates current releases of both libraries.

Solid choice for: agents whose hardest job is getting the right evidence into context from large or varied document collections, including PDFs and other files that need parsing first.

Probably not for: agents that mostly act through APIs and rarely read documents, or new TypeScript projects, since LlamaIndex's TypeScript framework is archived.

8. Haystack: retrieval pipelines that agents can use

deepset Studio pipeline editor with a query pipeline that connects a query input to a SentenceTransformers text embedder and an OpenSearch embedding retriever, next to a searchable list of embedder components

A Haystack query pipeline in deepset Studio, part of deepset's commercial platform.

Haystack organizes document processing and retrieval as connected components. A pipeline can run keyword and semantic searches, join their results, rerank passages and return evidence by rules you set.

Its Agent component runs a model's tool-calling loop, and a PipelineTool turns a whole pipeline into a single tool the agent can call to search a particular collection. You can then test that search pipeline on its own, without the agent.

In a contract-review application, you could check that the pipeline finds the right contract and its amendment before judging whether the model reads the evidence correctly. Separating retrieval errors from reasoning errors this way is a large part of evaluating agentic RAG.

Haystack's State shares data between tools during a run. Persistent memory comes from separate integrations, including cognee's memory store and a Mem0 store backed by Mem0's hosted API, and you configure their storage and retrieval components explicitly.

Solid choice for: search-heavy applications where you have to show how each answer's evidence was retrieved, since every retrieval step is a component you can inspect.

Probably not for: agents that mostly call business APIs or coordinate other agents, where a pipeline-first design adds structure you won't use.

9. Mastra: agents and workflows in TypeScript

Mastra workflow graph for a weather workflow: fetch-weather and plan-activities steps, two conditional branches, and a completed good-weather-plan step, with a runner panel where the city input is set to London

A branching weather workflow after a run, in Mastra's workflow graph view.

Mastra provides agents, model routing, workflows and development tooling for TypeScript, so a TypeScript application can keep its agent logic in-process without running a separate Python orchestration service.

Its workflows define steps, branching and input and output schemas in code, and a workflow can suspend while a person reviews a proposed action and resume after they respond. Mastra Studio is a local UI for testing agents and inspecting runs.

Memory is one of Mastra's larger components. Besides message history and semantic recall, working memory holds structured information such as a user's preferences and goals, and observational memory runs an Observer agent that turns older messages into short, dated observations and a Reflector agent that condenses them as they accumulate.

Whether memory and workflow state persist depends on the storage adapters you configure.

Solid choice for: Next.js and Node.js products where agents should ship in the same codebase as the rest of the app, with workflows, memory and a local development UI from one framework.

Probably not for: Python data and ML stacks, or production use of its source-available ee/ features, such as authentication, without a commercial license.

10. Agno: agents, teams and workflows with a built-in runtime

Agno AgentOS control plane listing the agents, teams and workflows of a demo AgentOS, each with chat and config buttons, with sidebar links to sessions, traces, memory, knowledge, evaluation, approvals and a scheduler

The AgentOS control plane, listing the agents, teams and workflows one AgentOS serves.

Agno is a Python SDK built on three primitives: agents, teams of agents that work on a task together, and workflows that run steps in sequence, in parallel, conditionally or in loops. Its runtime, AgentOS, serves them through a REST API and an MCP server, so the same agent can also be called as a tool from an MCP client such as Claude.

A workflow can pause for a person before or after a step, or before a tool call inside one. The pause state is saved to the workflow's database and continue_run() resumes from that point, so a publishing step can wait for an editor's sign-off and pick up later.

With a database attached, Agno stores sessions for agents, teams and workflows. Its memory keeps facts about each user, such as preferences and recurring goals, across conversations, and it can update after every run or let the agent decide what to save. SQLite, PostgreSQL and MongoDB are among the supported databases, and knowledge bases add retrieval over your own documents.

Solid choice for: SaaS features and internal tools where each user's agent needs its own memory and every request has to be authenticated and authorized.

Probably not for: projects that already run their own API layer and storage, since Agno includes more of the platform than a typical library, or TypeScript stacks.

Honorable mentions

Two more frameworks deserve a mention, particularly if you're looking for greater flexibility in how agents coordinate their work or execute their actions:

  • AWS's Strands Agents runs a model-driven agent loop in Python and TypeScript, with graphs, swarms and agents-as-tools for multi-agent work and a MemoryManager that recalls and injects stored memories by default once you attach a store.
  • Hugging Face's smolagents is a smaller library whose CodeAgent writes its actions as Python code. That code runs in a restricted local interpreter by default, and the documentation points to sandboxes such as E2B, Modal, Blaxel or Docker, because a local sandbox can never be fully secure.

What to test before committing to an AI agent framework

Before you lose an entire afternoon playing with agent demos, we recommend you first check the practical stuff: language support, the model providers your application depends on, and where you're planning to deploy it.

Then, think about which decisions you're comfortable handing over to the model. In a document investigation, there's probably no harm in letting the agent decide which source to search next, provided it has permission to access it. But when it comes to changing a customer's account, we'd obviously want an approval process defined and enforced in code.

Once you're down to two or three promising frameworks, rather than comparing their quickstart demos, take a task your application will actually need to perform and see how they each do.

Give each implementation the same model, source data, and expected outcomes, and get your tests to include a few situations where things don't go according to plan — this can tell you more than a dozen successful demo runs.

Here's what we'd essentially look at:

What to testHow to test it
Execution and recoveryRestart the application during a run. Check what resumes, what repeats, and whether an external action executes twice. Use idempotency keys or transaction-level safeguards where supported.
Approval and permissionsReject a proposed action and verify that the application doesn't perform it. Repeat a retrieval request under a restricted identity and check which data reaches the model.
Memory across sessionsSave a decision with its reason, open a new session, and test whether the agent can retrieve both. Record the storage and retrieval configuration used.
ObservabilityInspect the trace of a failed run and identify which model requests, tool results, and routing decisions contributed to the failure.
Cost and maintenanceMeasure model calls, input and output tokens, latency, storage, and required services. Account separately for ingestion and ongoing memory retrieval; the economics of persistent memory depend on how often the stored information is reused.

Once you've run these tests, note how often each implementation completes the task correctly and what it costs to get there, including whether it frequently needs retries or requires substantially more code to maintain. An agent evaluation framework can help you make these comparisons repeatable.

We'd also keep those tests around long after settling on a framework. Even a routine SDK upgrade can change the tool schemas, the prompts assembled for the model, or how execution state is serialized. Your agent's behavior can change without you having touched a single line of your own code — better to discover this in a regression test than in production.

What can these frameworks remember?

As far as memory capabilities go when choosing a framework, the salient question is what you'd want your agents to remember and for how long.

Here's how the frameworks we’ve discussed here handle current and long-term memory:

FrameworkRun and session stateLong-term memory
LangGraphCheckpointers, per threadStores, with optional semantic search
CrewAIFlow stateUnified Memory class, LanceDB by default
OpenAI Agents SDKSessions and RunStateNo built-in long-term store
Google ADKSessionServiceMemoryService: in-memory keyword search, Memory Bank or Knowledge Engine vector search
Microsoft Agent FrameworkSessions and workflow checkpointsContext providers; file memory in the Harness Agent
Pydantic AIMessage history you pass inHarness package: literal-text search, no source citations
LlamaIndexMemory queue and workflow ContextMemory blocks for static information, facts or vectors
HaystackState during a runIntegrations such as cognee and Mem0
MastraMessage history and workflow stateSemantic recall, working memory and observational memory
AgnoSessions in your databasePer-user memories, updated after each run or by the agent

We'd also suggest understanding how information makes its way into memory in the first place. Some frameworks can extract and store memories from agent interactions automatically when configured to do so, while others leave it largely up to you to decide what's worth recording and when to retrieve it.

If you're building several agent applications, you'll also want to think beyond the needs of each individual agent, as in: how much of what one agent learns could benefit the others? And if those agents happen to be built with different frameworks, how do you make that knowledge available to all of them without maintaining several separate copies?

A memory hivemind beyond the agents’ framework

If your application runs on one framework and its native memory does everything you need, you're sorted. But once other applications need access to that same knowledge, or you need to manage documents and decisions independently of any agent's execution, there's a compelling case for introducing a separate memory layer.

Choosing that layer warrants some research of its own, and we've already put together a detailed comparison of the available memory technologies. To stick to the scope of this post here, let's look at how we'd solve the problem of sharing knowledge across AI agent frameworks using our own open source memory layer, cognee.

Knowledge becomes cumulative and transferable

Within the same company, a research agent built with LangGraph might spend days investigating a subject, recording its findings and documenting the sources behind them. Weeks later, a proposal-writing agent built with CrewAI needs some of that research for a customer document. Ideally, it should be able to retrieve those findings even during its very first session.

A memory layer like cognee provides two architectural benefits:

  • Knowledge sharing across frameworks. Both applications can connect to the same memory backend. LangGraph and CrewAI continue managing their respective execution states, and cognee manages the shared knowledge and the permissions that govern access to it.
  • Freedom to change frameworks. If you decide six months down the road that you'd rather build with a different SDK, your accumulated knowledge can come with you. You'll still need to configure execution and conversation state in the new application, but you won't have to convert the old framework's checkpoints just to recover what your agents have learned.

Diagram of shared memory across frameworks: a LangGraph research agent records findings and sources over three days into the cognee memory layer with remember(), where access is governed by permissions; a CrewAI proposal agent retrieves that research in its first session, and an agent on a new framework reuses the accumulated knowledge, both with recall() and each keeping its own execution and conversation state

What goes into memory, and who gets to use it?

When cognee processes information into long-term memory, it organizes it into a knowledge graph with vector embeddings. This allows retrieval to combine semantic similarity with explicit relationships between entities and their source records. How accurately your agents answer questions will still depend on the quality of the extraction, your retrieval configuration, and what the original sources can substantiate.

We've designed cognee's memory API around four operations:

  • remember() records information
  • recall() retrieves it
  • improve() refines existing memory, and
  • forget() removes information.

You can also call remember() with a session_id to record information in a fast session cache, then use improve() to consolidate selected sessions into the knowledge graph.

You have quite a bit of freedom in deciding what your agents should remember. You could ingest your company's documentation independently and have agents contribute their findings and observations as they work. When an agent needs additional context, your application can either retrieve it before a model call or give the agent a memory search tool to invoke at its discretion. Several of our framework integrations automate parts of this process.

Of course, just because agents share a memory backend doesn't mean they should all have access to the same information. Research findings might be available to several departments, but confidential customer records may need to be kept in separately restricted datasets.

cognee's dataset permissions are enabled by default when the configured graph and vector stores support them. Access is governed by permissions granted to authenticated identities, so you shouldn't rely on dataset names or retrieval filters alone to protect sensitive information.

Getting cognee and your framework to talk

For the most part, to get these integrations going, you may not need to write much integration code — our integrations repository contains packages for several of the frameworks we've discussed, and additional packages are available through the Haystack and LlamaIndex ecosystems.

FrameworkPackageWhat the agent getscognee compatibility
LangGraphcognee-integration-langgraphAdd and search tools, optionally scoped to a userTested with 0.5; 1.x not yet verified
CrewAIcognee-integration-crewaiAdd and search toolsTested with 0.5; 1.x not yet verified
Google ADKcognee-integration-google-adkAdd and search toolsTested with 0.5; 1.x not yet verified
Haystackcognee-haystackCogneeMemoryStore, CogneeWriter, and CogneeRetriever, built on remember and recall1.0.9 or later
LlamaIndexllama-index-graph-rag-cogneeAdding, processing, and searching documents in a cognee knowledge graph1.5.3 or later

A note on some of our older integrations: the packages for LangGraph, CrewAI, and Google ADK still use cognee's earlier add and search operations. As of writing, compatibility with current cognee releases hasn't yet been verified. We’re aware of this and working on it.

If your framework isn't listed here, you can connect to cognee through its Python SDK or HTTP API. Frameworks with MCP client support can also connect to cognee's MCP memory server, without the need for a dedicated adapter. Our Claude Agent SDK integration uses this method. You'll still need to configure authentication and decide when and how memory enters the agent's context.

As tempting as it might be to connect every agent in your organization to a common memory, we recommend a slow start, with two applications and a single shared dataset. Have one agent record an actual project decision, including why it was made and the source behind it. Then see whether the other agent can recall enough of that information to act on it correctly. Repeat the request under an identity that shouldn't have access and measure the ingestion and retrieval costs along the way.

FAQ

Answers to the most common questions from this guide.

Can AI agent frameworks work with local language models?

Yes, if the framework supports your inference provider or an OpenAI-compatible API. Pydantic AI, for example, supports Ollama, which runs models locally. Check that the model can handle the tool calls and structured output your application needs. A local model doesn't make the whole workflow local: external tools, embedding services and hosted storage can still send data outside your infrastructure. For a fully local setup, the memory layer and its embeddings have to run locally too.

What's the difference between an AI agent framework and MCP?

An AI agent framework coordinates model calls and task execution. The Model Context Protocol (MCP) standardizes how applications connect to tools, resources and prompts that external servers provide. A framework with MCP support can use those servers inside a workflow, but the protocol doesn't define the agent's business logic, and it doesn't make the connected tools enforce your application's permissions.

Do AI agent frameworks require a vector database?

No. An agent that queries structured records, runs calculations or calls APIs may never need vector search. Vector databases provide semantic retrieval, which helps with unstructured text. Depending on the workload, an agent may use a relational database, full-text search or graph queries instead, or combine several retrieval methods.

Can an AI agent framework use different models within the same workflow?

Most frameworks let you choose the model per agent or per step, so you could use a small model for entity extraction and keep a larger one for questions that need more reasoning. Test the small model's accuracy on its task before counting on lower costs, since extra retries or additional model calls can cancel out the savings.

Can AI agents run automatically without a user prompt?

Yes. A scheduler, webhook or message queue can start an agent when an event occurs, so an application could analyze an incident report as soon as it arrives. Event delivery and scheduling may need infrastructure beyond the framework, and agents that run unattended need limits on retries, permissions and external actions.

How can developers test agent workflows without making repeated LLM API calls?

Replace model responses and tool results with predefined test data to check branching, error handling, approvals and state transitions. Pydantic AI's testing tools include test models and overrides built for this. Measuring tool selection, reasoning and answer accuracy takes separate evaluations with real models, because a passing deterministic test can't show that the model will pick the right tool or produce valid data in production.

Related reading

5 Open-Source LLM and Agent Evaluation Frameworks in 2026
Best Embedding Models in 2026: OpenAI vs Open Source by MTEB
Open-Source Pinecone Alternatives: What Are You Trying to Replace?
Get started

Cognee is the fastest way to start building reliable Al agent memory.

Latest
10 Open Source AI Agent Frameworks: Which One Would You Build With?
What Are 500+ Companies Actually Building with AI Memory?
Meet the new cognee: smarter memory, lower costs, and control for your team