We've been busy extending multi-agent coordination, eval configuration, and workspace tooling. If you run agent pipelines, evaluate against datasets, or edit code in sandboxed environments, this release has relevant changes.
Release: @mastra/core@1.8.0
Let's dive in:
Supervisor Pattern for Multi-Agent Coordination
You can now orchestrate multiple agents using a first-class supervisor pattern, exposed through the same primitives you already use, stream() and generate(). The supervisor coordinates delegation, tracks iterations, evaluates completion, and keeps each agent's memory isolated, so parallel work does not pollute shared context.
That combination matters when you are building systems like research + writer pipelines, triage bots, or tool-heavy assistants where you need:
- a central "manager" to decide which agent should act next
- consistent termination behavior (including bailing out when work is not converging)
- predictable context boundaries so specialist agents do not leak state into each other
- better observability through iteration monitoring and completion scoring
If you are already using agent.generate() or agent.stream(), you get a familiar entry point, but with coordination features like delegation hooks, tool approval propagation, and context filtering built in. (PR #13323)
Metadata-Only Vector Queries (Optional queryVector)
Vector queries now support metadata-only retrieval by making queryVector optional in QueryVectorParams. The only rule is that you must provide at least one of queryVector or filter.
This is useful when you are using a vector store as a hybrid index, sometimes you want similarity search, and other times you just want "give me all chunks tagged category=docs" without paying embedding or similarity costs.
@mastra/pg explicitly supports this in PgVector.query(), returning matches with score: 0 when no similarity ranking is performed:
1// Before (queryVector was required)
2const results = await pgVector.query({
3 indexName: "my-index",
4 queryVector: [0.1, 0.2 /* ... */],
5 filter: { category: "docs" }
6});
7
8// After (metadata-only query)
9const results = await pgVector.query({
10 indexName: "my-index",
11 filter: { category: "docs" }
12});
13// Returns matching records with score: 0Not every backend can do filter-only queries. For stores that require a vector, Mastra now throws a clear structured MastraError (categorized as a user error) instead of confusing SDK-level failures, so you can handle the capability mismatch cleanly at runtime. (PR #13286)
More Flexible Evaluations with runEvals Target Options
runEvals is more configurable now, especially if your eval target needs non-default execution settings.
You can pass a new targetOptions object that gets forwarded directly to:
agent.generate()when your target is an agent (modern path)workflow.run.start()when your target is a workflow
That makes it straightforward to run the exact same eval dataset under different constraints, like lower temperature for determinism, fewer steps for cost control, or toggling workflow run options.
1import { runEvals } from "@mastra/core";
2
3// Agent: forward maxSteps / modelSettings / instructions
4await runEvals({
5 data,
6 scorers,
7 target: myAgent,
8 targetOptions: { maxSteps: 5, modelSettings: { temperature: 0 } }
9});
10
11// Workflow: forward run options like perStep
12await runEvals({
13 data,
14 scorers,
15 target: myWorkflow,
16 targetOptions: { perStep: true }
17});For workflow targets, you also get per-item overrides via startOptions on each datum. This is especially handy when individual eval cases need different initialState (or other workflow start settings) without splitting the run into multiple eval batches.
1await runEvals({
2 data: [
3 { input: { query: "hello" }, startOptions: { initialState: { counter: 1 } } },
4 { input: { query: "world" }, startOptions: { initialState: { counter: 2 } } }
5 ],
6 scorers,
7 target: myWorkflow
8});Per-item startOptions take precedence over global targetOptions for the same keys. A small safeguard is included, runevals-managed options (scorers, returnScorerData, requestContext) cannot be overridden via targetOptions, which helps keep eval accounting consistent. (PR #13366)
LSP Diagnostics After Workspace Edits
Workspace edit tools (write_file, edit_file, ast_edit) can now surface Language Server Protocol (LSP) diagnostics immediately after edits.
This closes a painful feedback loop in agentic coding flows: previously, your agent might edit files and only discover type errors or lint failures later, often after additional tool calls that compound the problem. With diagnostics returned right after the edit, you can react immediately, either by fixing the issue in the next call or by deciding to revert.
Supported diagnostics include:
- TypeScript
- Python (Pyright)
- Go (gopls)
- Rust (rust-analyzer)
- ESLint
You enable it by turning on LSP in your Workspace:
1// Before
2const workspace = new Workspace({ sandbox, filesystem });
3
4// After
5const workspace = new Workspace({ sandbox, filesystem, lsp: true });Edits still work even if language servers are not installed, you just will not see diagnostics in that case. (PR #13441)
New Blaxel Cloud Sandbox Provider
A new package, @mastra/blaxel, adds a Blaxel cloud sandbox provider. If you are using Mastra workspace tooling, this expands your deployment and runtime options by letting you execute workspace operations in a managed cloud environment.
That is particularly useful when you want consistent tooling and isolation for agents without running your own sandbox infrastructure, or when you need ephemeral, reproducible environments for code-editing workflows.
If you are exploring different ways to run workspace tools, this gives you a new provider to plug in alongside existing sandbox setups. (PR #13015)
Breaking Changes
None noted in this changelog.
Other Notable Updates
- Nested workflow tripwires propagate correctly: Tripwires thrown from nested workflows now bubble up as expected, improving failure handling in composed workflows (PR #13502)
- Provider-defined AI SDK tools serialize safely: Added
isProviderDefinedToolto detect tools likegoogle.tools.googleSearch()andopenai.tools.webSearch()so schema handling works during serialization (PR #13507) - Embedding router compatibility with AI SDK v6: Fixed
ModelRouterEmbeddingModel.doEmbed()to always return awarningsarray (and fixed the associated build typing issue), preventing crashes withembedMany(PR #13369), (PR #13461) - Thread title defaults no longer block title generation:
Harness.createThread()now uses an empty string title when not provided, sogenerateTitlecan work from the first message (PR #13393) - Model ordering is more predictable: Unknown model IDs are no longer sorted to the front in
reorderModels(), they now move to the end (PR #13445) - Experiment traceability restored: Scores generated during experiment runs now include
traceIdagain (PR #13464) - Skill file resolution is fixed and safer:
skill-read-reference(plusgetReference,getScript,getAsset) now resolves paths relative to the skill root instead of hardcoded subdirectories, while still blocking path traversal (PR #13363) - Workspace listing includes ownership details: Listing workspaces now clearly indicates global vs agent-owned, including owning agent ID and name (PR #13468)
- Observational Memory works on legacy model paths: The legacy
stream/generatepath now callsprocessInputStep, enabling processors like Observational Memory with AI SDK v4 models (PR #13358) - Access dynamic workspaces earlier: Added
resolveWorkspace()so callers can access a dynamic workspace before the first request (PR #13457) - Abort behavior fixed for streaming: Aborting a stream now stops LLM generation and prevents partial responses from being persisted to memory, also avoids a stream error crash when controllers were already closed (PR #13206)
- Observation activation preserves minimum context: Fixed a case where swapping buffered observation chunks could drop context to near-zero tokens (PR #13476)
That's all for @mastra/core@1.8.0!
Happy building! 🚀
