Synchronous vs asynchronous agents
Updated November 2026
Agents should wait for each other when the work is short and the caller can stay connected until the reply arrives. They should work asynchronously when a job may run for minutes or longer, when connections may drop, or when a person has to approve a step. A synchronous call holds the caller until the reply comes back. A background task returns a handle at once, and the caller later polls, streams updates or receives a webhook.
At a glance
| Synchronous | asynchronous | |
|---|---|---|
| What it is | Synchronous calls are one of the interaction modes the A2A specification supports, next to streaming and push notifications. | Background tasks match A2A's "Async First" principle, which is designed for potentially very long-running tasks and human-in-the-loop interactions. |
| How results arrive | Synchronous calls can end in a direct Message, which A2A uses when the agent can respond immediately. | Background tasks come back as a Task, which A2A uses when the agent needs to perform a long-running operation. The client can then periodically poll the server for updates. |
| Connections and timeouts | Synchronous calls tie up a connection for the whole operation, and the MCP Tasks page says many clients and intermediaries impose timeouts that make this impractical beyond a few seconds. | Background tasks in MCP give the caller a durable handle. According to the MCP Tasks overview, a client that disconnects or restarts can resume polling with the same ID. |
| What the caller sees | Synchronous calls hand back a result when the run finishes. In the OpenAI Agents SDK runner, once the model output counts as final, the loop ends and we return the result, in the SDK's words. | Background tasks report lifecycle changes. In A2A streaming, a TaskStatusUpdateEvent communicates changes such as working to input-required or completed, and it also provides intermediate messages from the agent. |
| Framework support | Synchronous calls in the OpenAI Agents SDK use Runner.run_sync(), a sync method that runs .run() under the hood. | Background-style runs appear in CrewAI, which can kickoff a crew asynchronously in a non-blocking manner, and in Agno, where background=True starts a detached asynchronous task. |
| Failure and reconnecting | Synchronous calls need a time limit. In the OpenAI Agents SDK, ModelTimeoutError is raised when a model-call attempt exceeds ModelSettings.timeout. | A client's SSE connection to an A2A stream can break prematurely, and the A2A streaming guide covers that case under resubscription. While the task is still active, the client can attempt to reconnect using the SubscribeToTask RPC method. |
How does each one coordinate agents?
With a synchronous call, the calling agent sends a request and waits for the reply before taking its next step, so the caller owns the wait and any timeout. The OpenAI Agents SDK runner runs a loop that calls the model for the current agent with the current input. When the model requests a handoff, the runner will update the current agent and input and run the loop again. If the run goes past its turn limit, the SDK will raise a MaxTurnsExceeded exception.
With a background task, the receiving agent hands back an identifier and keeps working. In A2A, operations return immediately, and processing continues in the background when a Task is returned. The client then follows the task through polling, streaming or push notifications, per the A2A specification. After a push notification arrives, the client typically uses GetTask with the taskId to fetch the complete, updated Task. MCP's Tasks extension has the server return a task handle in place of the final result, and the client polls for completion. There the client calls tasks/get with the taskId and receives the current status, plus the final result or error once the task reaches a terminal state. MCP also notes that polling is the default, and clients can rely on notifications instead when a server supports them.
When should you choose synchronous calls?
- An agent that can answer at once suits a plain reply. A2A uses a Message rather than a Task when the agent can respond immediately.
- The OpenAI Agents SDK also offers Runner.run_sync(), which its docs list as a sync method that just runs .run() under the hood.
- A run that might go on too long needs a cap and a fallback. The same SDK accepts error handlers, which you use to return a controlled final output instead of ending the run with the error. The guide on preventing agent loops covers the design side.
- Partial output over a held connection is a case for streaming. A2A says SSE is ideal when the client is able to maintain an active HTTP connection.
When should you choose background tasks?
- Work that may run for minutes, hours or days fits a task. A2A supports push notifications for very long-running tasks. It also supports them for clients that are unable to or prefer not to keep persistent connections, such as mobile clients or serverless functions, per the streaming and async page.
- Approval steps also fit a task. In MCP Tasks, a task that needs input moves to input_required and surfaces the request. The human-in-the-loop approvals guide covers how to design the approval itself.
- Running several crews at once is a use CrewAI names. Its docs say async kickoff is particularly useful when you want to run multiple crews concurrently.
- Checking on a run later needs stored state. In Agno, you configure a workflow database when you need to poll the persisted run.
- Long hosted model runs can use OpenAI's background mode, which runs long-running Responses API requests asynchronously, including multi-step agent runs.
Can you use them together?
Yes. In both protocols the receiving side picks the shape for each request. An A2A response can be a new Task or a Message, depending on whether the work is long-running. In MCP Tasks, the server decides per-request whether to create a task, and clients handle whichever result shape arrives. When an MCP task completes, its result field holds what the original request would have returned synchronously. A caller written for both shapes can therefore treat quick lookups and slow jobs through one interface.
One workable split is a synchronous call for the first acknowledgement and a task handle for everything after it. Reacting to completed work by publishing events is covered under event-driven coordination.
What should you watch out for?
- Long-held connections have caps of their own. With the Responses websocket transport in the OpenAI Agents SDK, the service limits a connection to 60 minutes and processes one response at a time on each connection.
- Push notifications add a webhook to secure. A2A says servers should not blindly trust and send POST requests to any URL a client provides, warning of server-side request forgery and DDoS amplification.
- Background tasks can end in several states that your code must handle. MCP lists completed, failed and cancelled as terminal, and its docs say cancellation is cooperative, so the server is not obligated to stop the work.
- Resumed runs may repeat tool calls. ADK says its Resume feature runs tools at least once, and may run more than once, so tools with side effects such as purchases need their own duplicate check.
What else should you know?
Is streaming synchronous or asynchronous?
It sits between the two. In A2A streaming, the HTTP connection remains open for the server to push events. When a task reaches a terminal or interrupted state, the server closes the stream and sends no further updates.
How often should a client poll a background task?
Follow the server's hint where it gives one. In MCP Tasks, the creation result contains a suggested polling interval along with the task ID, initial status and TTL.
Can a background run resume after an interruption?
Some frameworks support it. ADK's Resume feature lets a workflow pick up where it left off instead of restarting the entire workflow. In ADK Python 1.16 and higher, you can configure an ADK workflow to be resumable.
Does an A2A server have to support streaming and push?
Each is a declared capability. A server signals streaming by setting capabilities.streaming to true in its Agent Card. It signals push support by setting capabilities.pushNotifications to true.
Which sources does this page use?
- Overview (a2a-protocol.org), reviewed November 2026
- Core Concepts (a2a-protocol.org), reviewed November 2026
- Tasks (modelcontextprotocol.io), reviewed November 2026
- Running agents (openai.github.io), reviewed November 2026
- Streaming & Asynchronous Operations (a2a-protocol.org), reviewed November 2026
- Kickoff Crew Asynchronously (docs.crewai.com), reviewed November 2026
- Background Workflow Execution (docs.agno.com), reviewed November 2026
- Background mode (platform.openai.com), reviewed November 2026
- Resume Agents (adk.dev), reviewed November 2026