The latest release of @cloudflare/agents brings resumable streaming, significant MCP client improvements, and critical fixes for schedules and Durable Object lifecycle management.
Resumable streaming
AIChatAgent now supports resumable streaming, allowing clients to reconnect and continue receiving streamed responses without losing data. This is useful for:
- Long-running AI responses
- Users on unreliable networks
- Users switching between devices mid-conversation
- Background tasks where users navigate away and return
- Real-time collaboration where multiple clients need to stay in sync
Streams are maintained across page refreshes, broken connections, and syncing across open tabs and devices.
Other improvements
- Default JSON schema validator added to MCP client
- Schedules can now safely destroy the agent
MCP client API improvements
The MCPClientManager API has been redesigned for better clarity and control:
- New
registerServer()method: Register MCP servers without immediately connecting - New
connectToServer()method: Establish connections to registered servers - Improved reconnect logic:
restoreConnectionsFromStorage()now properly handles failed connections
// Register a server to Agentconst { id } = await this.mcp.registerServer({ name: "my-server", url: "https://my-mcp-server.example.com",});
// Connect when readyawait this.mcp.connectToServer(id);
// Discover tools, prompts and resourcesawait this.mcp.discoverIfConnected(id);The SDK now includes a formalized MCPConnectionState enum with states: idle, connecting, authenticating, connected, discovering, and ready.
Enhanced MCP discovery
MCP discovery fetches the available tools, prompts, and resources from an MCP server so your agent knows what capabilities are available. The MCPClientConnection class now includes a dedicated discover() method with improved reliability:
- Supports cancellation via AbortController
- Configurable timeout (default 15s)
- Discovery failures now throw errors immediately instead of silently continuing
Bug fixes
- Fixed a bug where schedules meant to fire immediately with this.schedule(0, …) or
this.schedule(new Date(), ...)would not fire - Fixed an issue where schedules that took longer than 30 seconds would occasionally time out
- Fixed SSE transport now properly forwards session IDs and request headers
- Fixed AI SDK stream events convertion to UIMessageStreamPart
Upgrade
To update to the latest version:
npm i agents@latestSource: Cloudflare
Latest Posts
- Find your files quickly and easily on Word, Excel and PowerPoint App home pages [MC1249435]
![Find your files quickly and easily on Word, Excel and PowerPoint App home pages [MC1249435] 2 pexels e l 296481171 14209547](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Retirement of the Semi-Annual Enterprise Channel option in the Office Deployment Service [MC1249427]
![Retirement of the Semi-Annual Enterprise Channel option in the Office Deployment Service [MC1249427] 3 pexels jeshoots 234527](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Purview compliance portal: Data Security Investigations introduces new soft purge mitigation action [MC1249429]
![Microsoft Purview compliance portal: Data Security Investigations introduces new soft purge mitigation action [MC1249429] 4 pexels kinkate 368260](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)
- Microsoft Teams: Live transcription in Teams Rooms on Android [MC1249432]
![Microsoft Teams: Live transcription in Teams Rooms on Android [MC1249432] 5 pexels magda ehlers pexels 613431](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==)

![Find your files quickly and easily on Word, Excel and PowerPoint App home pages [MC1249435] 2 pexels e l 296481171 14209547](https://mwpro.co.uk/wp-content/uploads/2025/06/pexels-e-l-296481171-14209547-150x150.webp)
![Retirement of the Semi-Annual Enterprise Channel option in the Office Deployment Service [MC1249427] 3 pexels jeshoots 234527](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-jeshoots-234527-150x150.webp)
![Microsoft Purview compliance portal: Data Security Investigations introduces new soft purge mitigation action [MC1249429] 4 pexels kinkate 368260](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-kinkate-368260-150x150.webp)
![Microsoft Teams: Live transcription in Teams Rooms on Android [MC1249432] 5 pexels magda ehlers pexels 613431](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-magda-ehlers-pexels-613431-150x150.webp)
