bestmultiagent

Published 2026-11-19

Best multi-agent frameworks for long-running agents

SHORT ANSWER

Five frameworks can pick up a run from saved state: LangGraph checkpointers cover fault tolerance, Microsoft Agent Framework checkpoints each superstep, Pydantic AI agents survive crashes and restarts on engines such as Temporal and DBOS, Mastra snapshots persist across restarts, and ADK workflows can be resumable. Keep that state in a database rather than in memory. ADK warns tools may rerun on resume, so make external side effects idempotent yourself.

How do I choose a framework for a run that must survive a restart?

Start with the framework your agents already use. On a single-framework project, that framework's own checkpoint or durability feature is the right pick, and our LangGraph profile and production guide go further. Then read its docs for two answers: where saved state lives, and which calls run again when a run resumes.

The approaches fall into two groups. Some frameworks save state at points in the run and let you resume from a saved point. Others hand the run to a durable execution engine that records each call and replays the record after a crash. Either way, an in-memory store only helps within one process lifetime.

What does LangGraph guarantee with checkpointers?

LangGraph saves progress through checkpointers, which persist a thread's graph state for uses that include fault tolerance. The quickstart has you compile your graph with a checkpointer, and reusing a thread_id resumes the same checkpoint while a new value starts a thread with empty state.

The checkpointer you pick decides whether a restart is survivable. MemorySaver and InMemorySaver keep checkpoints in RAM and lose them all when the process restarts. For production the docs name PostgresSaver, PostgreSQL with async support, and they describe SqliteSaver as local file-based storage for development. On the Agent Server, you do not need to configure checkpointers or stores manually.

On resume after an interrupt, the node restarts from its beginning, so code before the interrupt() call runs again. The interrupts page lists a rule that side effects before interrupt must be idempotent. Move payments and sends after the interrupt, or guard them with a key you store.

How does Microsoft Agent Framework checkpoint a workflow?

Microsoft Agent Framework workflows checkpoint at superstep boundaries.

In Python, a CheckpointStorage is provided when creating the workflow, and the provider you pass sets how far the checkpoints survive:

For hosted runs, the Durable Extension brings durable execution to agents, multi-agent orchestrations and workflows, and it supports two hosting models in C# and Python, Azure Functions and self-hosted workers. Its docs state that durable checkpointing doesn't make tools exactly-once, and that a failure after an external write but before a durable commit can run the operation again.

How does Pydantic AI make agents durable?

Pydantic AI hands durability to an engine you choose. A durable engine journals model requests and wrapped tool calls, then replays the completed ones after a restart and retries the one in flight. The docs allow one durable execution engine per agent.

On DBOS, workflows checkpoint state in a database and resume from the last completed step after a restart. Steps may perform I/O, and a failed step restarts from the beginning, so an API call inside that step may repeat.

Under Temporal, a program that crashes or hits an exception while calling a model or API will retry until it can successfully complete. Activity names are derived from the agent's name and the toolsets' IDs, which become required, and changing them after deployment would break active workflows.

Prefect asks for one extra step: wrap agent.run() in your own @flow. The docs say a run is only durable when it is called inside that flow.

How do Mastra, Google ADK and Agno handle suspend and resume?

Mastra ties persistence to suspension. Suspension saves execution state as a snapshot in your configured storage provider, and snapshots persist across deployments and application restarts. By default, snapshots use libSQL, and you can configure Upstash, PostgreSQL or OracleDB instead.

Google ADK lets an agent workflow pick up where it left off. You enable it by applying a Resumability configuration to the App, as in ResumabilityConfig(is_resumable=True), and resume with a command containing the Invocation ID found in the workflow's Event history.

Resume works agent by agent: for an agent that did not complete, ADK reinstates any completed Events and restarts from the partially completed state. Custom Agents need code changes, because resume is not supported for them by default. ADK's in-memory session and memory services lose their data when the application restarts.

In Agno, pause state is persisted to the workflow's database, and workflow.continue_run(run_output) resumes from where it left off, so HITL workflows need a database. Separately, background runs streamed with background=True and stream=True produce buffered SSE events that can be resumed after a client disconnects.

What must you make idempotent yourself?

Treat every external write as something that can happen twice. ADK says its Resume feature runs tools at least once, and it advises that tools where duplicate runs hurt, such as purchases, check for and prevent duplicates. Microsoft's Durable Extension tells you to make activity and tool side effects idempotent, and Pydantic AI's Temporal page notes that a failed activity is restarted from the beginning. Tracing each replay helps you spot duplicates; our observability guide covers the options.

  1. Derive a stable idempotency key from the run or thread ID plus the step name.
  2. Record the key in your own store before the external call, and check for it first on every replay.
  3. Pass the key to any downstream API that accepts one, so a repeated call is rejected at the far end.
  4. Leave non-repeatable tools inside the engine's recorded units. In Pydantic AI, a tool in a durable unit lets a restarted run reuse its recorded result, while a tool set to durable=False runs again on every replay.

What do readers ask about best multi-agent frameworks for long-running agents?

Does a checkpointer replace a durable execution engine?

Not by definition. Pydantic AI's docs say "durability is not storage": an engine keeps one run alive through a crash partway through a step, while saving a run and resuming it later need no engine.

Can I resume a Google ADK run from the web UI or CLI?

The ADK docs say resuming from the ADK Web interface or CLI is not currently supported. Send the request to the API server, or use the Runner object Run Async method with the invocation ID.

Can I change the workflow before resuming a stopped run?

Plan for no. ADK says do not modify a stopped agent workflow before resuming it, and Microsoft Agent Framework says a rehydrated workflow must preserve the topology and executor identities of the one that created the checkpoint.

Do I need a persistent database for a prototype?

An in-memory store is fine while nothing has to survive a restart. For a single machine, Microsoft Agent Framework's FileCheckpointStorage suits local development and process restarts. When your agents span several frameworks, see mixing frameworks.

Which sources does this page cite?