Mastra 1.86: Power-User Guide to Durable Agents, Channel Tools and Knowledge Importers

Last updated: November 27, 2026

Mastra 1.86, the @mastra/core 1.86.0 release dated November 25, 2026, lets any regular agent run on a durable engine through one setting, durable.executionEngine. It also adds crash-safe dataset experiments, experimental Knowledge importers, a knowledge_activity tool, and createChannelTools() plus a Slack toolset for chat agents.

Contents

What changed in Mastra 1.86

Mastra is a framework for building AI applications and agents with TypeScript. The 1.86.0 release of @mastra/core ships with matching updates across the monorepo, including @mastra/server 1.86.0, @mastra/slack 1.10.0, @mastra/mcp 2.11.0 and @mastra/pg 1.38.0 (release notes).

The release notes list five highlights: durable experiments, Knowledge importers, native durable execution-engine selection, channel tools with a Slack toolset, and Knowledge activity with host-run principals (release notes).

Release at a glance

Item Detail in 1.86.0
Core package @mastra/core 1.86.0 (GitHub release dated November 25, 2026)
Durable agents durable.executionEngine: 'default' or 'evented', per agent or as a Mastra default
Durable experiments durable: true on startExperimentAsync(); one workflow step per item
New run status interrupted for durable runs stopped by mastra.shutdown()
Chat tools createChannelTools() in @mastra/core/channels; createSlackTools() in @mastra/slack 1.10.0
Knowledge Importers (experimental), knowledge_activity tool, optimistic expected checks
Breaking change get_process_output: waitSeconds (1 to 300) replaces wait: true
Feature status Durable agents are beta; Knowledge importers are experimental

Details come from the release notes (GitHub), the core changelog (CHANGELOG) and the durable agents documentation (docs). None of them list pricing.

How to turn on native durable agents

Before 1.86.0, you wrapped an agent with createDurableAgent() or createEventedAgent(). Now a regular Agent can run natively on either engine while keeping its existing streaming and model-output APIs (core changelog).

  1. Upgrade @mastra/core to 1.86.0, along with the matching @mastra/server release if you serve agents over HTTP.
  2. Add durable: { executionEngine: 'default' } to the agent for in-process runs, or 'evented' for background runs that you follow through PubSub.
  3. Optionally set durable: { executionEngine: 'default' } on new Mastra({...}) so registered agents inherit it. An explicit agent setting overrides the default.
  4. Call agent.stream() as before. Type the result as AgentStreamOutput to reach durable lifecycle controls, and use output.runId to reconnect.
  5. For runs across several processes, configure a PubSub backend that redelivers unacknowledged events and a storage adapter with workflow step guards. EventEmitterPubSub and UnixSocketPubSub do not qualify.
  6. Replace any prerelease executionEngine: 'durable' value with 'default'.

The engine choice locks at registration or first execution. The documentation advises draining active and suspended runs on the old engine before switching, because the new engine will not resume them (durable agents docs). The new server patch lets natively durable agents use the same run routes as createDurableAgent() agents (release notes).

Durable experiments and interrupted runs

Dataset experiments can now run as evented workflows. Pass durable: true to startExperimentAsync(), with a registered target such as targetType: 'agent' and scorer IDs. With a pubsub that redelivers events, such as Redis Streams, another worker picks up an item that was cut off, and each item still records one result (core changelog).

Durable experiments accept only options that can be stored. Inline tasks, hooks, onEvent, scorer objects and non-JSON requestContext values throw EXPERIMENT_NOT_DURABLE before anything is created.

A second change helps rolling restarts. subscribeToThread({ withRunStatus: true }) now reports a durable run stopped by mastra.shutdown() as interrupted rather than failed, and the recovered output follows on the same subscription. A real failure still reports failed.

Channel tools and the Slack toolset

createChannelTools() gives any agent with channels a set of tools: fetchMessages, fetchChannelMessages, fetchThread, listThreads, getThreadParticipants, getChannelInfo, postMessage and postChannelMessage, plus sendDirectMessage when you allow it (core changelog).

Nothing is added automatically, so spread the tools into the agent’s tools. A typical scoped setup uses channels: 'selected', full chat IDs such as slack:C0123ABC, and access: 'read', which limits posting to the conversation’s own channel. The tools need zod 4.2 or newer.

createSlackTools() in @mastra/slack 1.10.0 adds findChannel, findUser, searchMessages and downloadSlackAttachment with the same options. Search and download read only allowed channels, while channel and user lookups cover the whole workspace (release notes). Channels themselves connect agents to Slack, Microsoft Teams, Discord, Telegram, WhatsApp, GitHub and Linear through Chat SDK (channels docs).

Knowledge importers and activity

Knowledge, which holds pages and notes for agents, gains an experimental importer contract. Pass importer instances to new Knowledge({ importers: [...] }), create the bookkeeping tables with await knowledge.importers.init(), then call knowledge.importers.run(bindingId). In-memory, PostgreSQL and LibSQL stores support it.

The new knowledge_activity read tool lists page and note changes between since and until, newest first, with who made each change. upsertPage and removePage accept expected: { id, version } and throw KnowledgeConflictError if someone changed the page in between.

Native engines versus wrappers

Need Best option Notes
Short request with a connected client Regular Agent Simplest choice for request-scoped calls
Reconnectable stream in one process executionEngine: 'default' Same as createDurableAgent()
Background run across workers executionEngine: 'evented' Needs a redelivering PubSub and step-guarded storage
Inngest retries and dashboard createInngestAgent() No native setting; wrapper only

The table follows the execution variants in the durable agents documentation (docs), which first added durable agents in @mastra/core 1.45.0. For comparable Python frameworks, see our Pydantic AI 2.75 guide, our CrewAI artifacts guide and our OpenAI Agents SDK Codex provider guide.

If you route Mastra models through a proxy, our LiteLLM 1.111 guide covers that layer. For long-running hosted model calls, compare our OpenAI background mode guide.

Breaking changes and limitations

  • Process output waits. get_process_output ignores wait: true. Pass waitSeconds from 1 to 300 and update any agent instructions or skills that mention the old flag.
  • Package API changes. @mastra/connect replaces its older events exports with the ConnectEvents iterator, @mastra/mcp-apps-components renames projectId to project, and the playground-ui trace components change substantially.
  • Beta and experimental status. Durable agents may change without a major version bump, and Knowledge importers are experimental.
  • Recovery limits. If recovery is off, interrupted is the last status a run reports. A regular agent stopped by shutdown still reports failed.

Frequently asked questions

What is new in Mastra 1.86?

The @mastra/core 1.86.0 release adds native durable execution for regular agents, crash-safe durable dataset experiments, experimental Knowledge importers, a knowledge_activity tool, and createChannelTools() for reading and posting in chat threads. @mastra/slack 1.10.0 adds createSlackTools() alongside it.

How do I make a Mastra agent durable without a wrapper?

Set durable: { executionEngine: ‘default’ } on the Agent, or ‘evented’ for background runs followed through PubSub. You can also set a default on the Mastra instance. An explicit agent setting wins, and the choice is fixed at registration or first execution.

What breaking changes are in Mastra 1.86?

The get_process_output workspace tool no longer supports wait: true; use waitSeconds from 1 to 300. The prerelease value executionEngine: ‘durable’ is now ‘default’. @mastra/connect, @mastra/mcp-apps-components and the playground-ui trace components also have API changes.

Can Mastra channel tools read private messages?

No. The changelog states that other people’s direct messages with the bot, including group DMs, can never be read. By default the tools stay in the conversation’s own channel, and sendDirectMessage is available only when you allow it. The tools need zod 4.2 or newer.

Are durable agents stable in Mastra?

Not yet. The durable agents documentation marks the feature as beta and warns that breaking changes may occur without a major version bump until the API is stable. Knowledge importers in 1.86.0 are also labeled experimental.

Sources

Featured image: “Laptop coding programs” by Tirza van Dijk, CC0, via Wikimedia Commons. FreeAnswers is not affiliated with Mastra.

Related answers

1 thought on “Mastra 1.86: Power-User Guide to Durable Agents, Channel Tools and Knowledge Importers”

Leave a Comment