@mastra/client-js 1.35.1-alpha.0 → 1.36.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.36.0-alpha.2
4
+
5
+ ### Minor Changes
6
+
7
+ - Added the `autoPublish` option to `createStoredAgent()` so SDK users can create an unpublished initial draft. ([#20381](https://github.com/mastra-ai/mastra/pull/20381))
8
+
9
+ ```typescript
10
+ await mastraClient.createStoredAgent({
11
+ id: 'support-agent',
12
+ name: 'Support agent',
13
+ instructions: 'Help customers with support questions.',
14
+ model: { provider: 'openai', name: 'gpt-5' },
15
+ autoPublish: false,
16
+ });
17
+ ```
18
+
19
+ ### Patch Changes
20
+
21
+ - Added `TraceInsightResponse` for typed entity-learning trace summaries. ([#20405](https://github.com/mastra-ai/mastra/pull/20405))
22
+
23
+ ```ts
24
+ import type { TraceInsightResponse } from '@mastra/client-js';
25
+
26
+ const traceId = (insight: TraceInsightResponse) => insight.traceId;
27
+ ```
28
+
29
+ - Added Trace Intelligence progress types and improved the onboarding state with processing progress, clearer copy, accessible markup, mobile polish, and the dedicated documentation link. ([#20401](https://github.com/mastra-ai/mastra/pull/20401))
30
+
31
+ - Updated dependencies [[`55c9e24`](https://github.com/mastra-ai/mastra/commit/55c9e248c27c1d72b5bb7e94ea6b8a3999eee49f), [`07f5b4b`](https://github.com/mastra-ai/mastra/commit/07f5b4ba9d608d88865030732e580298296adf99)]:
32
+ - @mastra/core@1.55.0-alpha.2
33
+
34
+ ## 1.35.1-alpha.1
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [[`ba369f2`](https://github.com/mastra-ai/mastra/commit/ba369f2a0aaf998da0d6aa033d26f64f96bef8ac), [`dcfed93`](https://github.com/mastra-ai/mastra/commit/dcfed93e1e256c6abfa792cbb7ca836f5d0e8638), [`2876e15`](https://github.com/mastra-ai/mastra/commit/2876e15b4d2f616a3bc1ed3af57d546c268384ce), [`598080f`](https://github.com/mastra-ai/mastra/commit/598080f224edb3f0f5b801035b067fac50a56a03)]:
39
+ - @mastra/core@1.55.0-alpha.1
40
+
3
41
  ## 1.35.1-alpha.0
4
42
 
5
43
  ### Patch Changes
@@ -1,4 +1,14 @@
1
1
  export type TraceSignalName = 'goal' | 'sentiment' | 'behavior' | 'outcome';
2
+ export type EntityLearningProgressStatus = 'collecting' | 'processing' | 'ready';
3
+ export interface EntityLearningProgressResponse {
4
+ status: EntityLearningProgressStatus;
5
+ traceCount: number;
6
+ signals: Record<TraceSignalName, {
7
+ generated: number;
8
+ embedded: number;
9
+ }>;
10
+ availableSignals: TraceSignalName[];
11
+ }
2
12
  export interface ThemeLearningEntity {
3
13
  entityId: string;
4
14
  entityType: string;
@@ -148,4 +158,20 @@ export interface NoiseResponse {
148
158
  coverage: number;
149
159
  };
150
160
  }
161
+ export interface TraceInsightSummary {
162
+ version: string;
163
+ summary: string;
164
+ observations: string[];
165
+ currentTask?: string;
166
+ degenerate?: boolean;
167
+ createdAt: string;
168
+ }
169
+ export interface TraceInsightResponse {
170
+ traceId: string;
171
+ summary?: TraceInsightSummary;
172
+ signals: Array<{
173
+ signalName: TraceSignalName;
174
+ signalText: string;
175
+ }>;
176
+ }
151
177
  //# sourceMappingURL=agent-learning.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-learning.d.ts","sourceRoot":"","sources":["../src/agent-learning.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,YAAY,CAAC,EAAE;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,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IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC;QACb,UAAU,EAAE,eAAe,CAAC;QAC5B,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;CACJ"}
@@ -3,7 +3,7 @@ name: mastra-client-js
3
3
  description: Documentation for @mastra/client-js. Use when working with @mastra/client-js APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/client-js"
6
- version: "1.35.1-alpha.0"
6
+ version: "1.36.0-alpha.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.35.1-alpha.0",
2
+ "version": "1.36.0-alpha.2",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -53,7 +53,9 @@ An agent card includes fields like the agent name, description, endpoint URL, pr
53
53
  }
54
54
  ```
55
55
 
56
- A2A represents work as messages and tasks. Messages carry text, file, or structured data parts. Tasks are stateful units of work with IDs and lifecycle states, so clients can follow long-running work, send follow-up turns, cancel work, or resubscribe after a disconnect.
56
+ A2A represents work as messages and tasks. Messages carry text, file, or structured data parts.
57
+
58
+ Tasks are stateful units of work with IDs and lifecycle states. Clients can follow long-running work and send follow-up turns. They can also cancel work or resubscribe after a disconnect.
57
59
 
58
60
  ## Get started
59
61
 
@@ -83,7 +85,7 @@ export const supportAgent = new Agent({
83
85
  id: 'support-agent',
84
86
  name: 'Support Agent',
85
87
  instructions: 'Answer user questions and delegate weather questions when needed.',
86
- model: 'openai/gpt-5.5',
88
+ model: 'openai/gpt-5.6-sol',
87
89
  agents: {
88
90
  remoteWeatherAgent,
89
91
  },
@@ -14,9 +14,9 @@ The editor manages two types of resources alongside agents:
14
14
  Use the editor when you want to:
15
15
 
16
16
  - **Let non-developers iterate**: Give subject-matter experts and prompt engineers a way to tune agent behavior without touching code or waiting for deploys.
17
- - **Version everything**: Every save creates a snapshot so you can compare changes, roll back instantly, and audit what changed and when.
18
- - **Run experiments**: Route different users or requests to different agent versions for A/B testing, canary rollouts, or prompt experimentation.
19
- - **Target specific versions**: Pin a version per request, per user, or per environment so production stays stable while new versions are tested.
17
+ - **Version everything**: Every save creates a snapshot so you can compare changes and roll back instantly, plus audit what changed and when.
18
+ - **Run experiments**: Route different users or requests to different agent versions for A/B testing or canary rollouts, or alternatively prompt experimentation.
19
+ - **Target specific versions**: Pin a version per request or per user, or alternatively per environment so production stays stable while new versions are tested.
20
20
  - **Manage tools at runtime**: Add integration tools from Composio or Arcade, or connect MCP servers, without updating code.
21
21
  - **Override code agents**: Change the instructions, tools, or variables of a code-defined agent while keeping the original code as the baseline.
22
22
 
@@ -95,7 +95,7 @@ When `source` is `'code'`, the editor writes each override to a deterministic JS
95
95
 
96
96
  The code source uses the Git history of each per-agent JSON file as its version history. Each commit that changes a file is shown as a read-only version in Studio, labeled with the commit message. Saving in Studio updates the working file in place rather than creating a database draft, so the version dropdown reflects your actual commit history.
97
97
 
98
- This means versions and rollbacks are managed through Git rather than through draft and publish actions.
98
+ As a result, versions and rollbacks are managed through Git rather than through draft and publish actions.
99
99
 
100
100
  ## Studio
101
101
 
@@ -105,7 +105,7 @@ Modify the system prompt and save a new draft version. Afterwards, publish the d
105
105
 
106
106
  ## Programmatic control
107
107
 
108
- Everything you can do in Studio is also available programmatically through [`mastra.getEditor()`](https://mastra.ai/reference/core/getEditor). This is useful for scripting bulk updates, seeding stored configurations from code, or building automation that tunes agents based on evaluation results.
108
+ Everything you can do in Studio is also available programmatically through [`mastra.getEditor()`](https://mastra.ai/reference/core/getEditor). This is useful for scripting bulk updates or seeding stored configurations from code, or alternatively building automation that tunes agents based on evaluation results.
109
109
 
110
110
  Call `mastra.getEditor()` from anywhere you have access to the `Mastra` instance. It returns the `MastraEditor` instance you registered, with namespaces for each resource type:
111
111
 
@@ -167,7 +167,7 @@ Because stored agents are data, you can build automation loops that tune agents
167
167
  - Re-run the experiment against the draft and compare scores to the baseline.
168
168
  - Promote the draft to the published version when the scores improve.
169
169
 
170
- This turns agent tuning into a closed feedback loop. One agent owns the production configuration, another agent iterates on it, and every change is versioned so you can roll back if a round of automated edits makes things worse. Combine this with [version targeting](#version-targeting-and-experimentation) to keep production traffic on the published version while the draft is being tested. See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for the full namespace API.
170
+ This turns agent tuning into a closed feedback loop. One agent owns the production configuration and another agent iterates on it, plus every change is versioned so you can roll back if a round of automated edits makes things worse. Combine this with [version targeting](#version-targeting-and-experimentation) to keep production traffic on the published version while the draft is being tested. See the [MastraEditor reference](https://mastra.ai/reference/editor/mastra-editor) for the full namespace API.
171
171
 
172
172
  ## What can be overridden
173
173
 
@@ -190,7 +190,7 @@ import { Agent } from '@mastra/core/agent'
190
190
  export const supportAgent = new Agent({
191
191
  id: 'support-agent',
192
192
  name: 'support-agent',
193
- model: 'openai/gpt-5.5',
193
+ model: 'openai/gpt-5.6-sol',
194
194
  editor: { instructions: true, tools: { description: true } },
195
195
  })
196
196
  ```
@@ -209,50 +209,56 @@ When a field is owned by code, Studio shows it as read-only and the server strip
209
209
 
210
210
  ## Versioning
211
211
 
212
- Every time you save changes to an agent or prompt block, a new version snapshot is created. Versions give you a full history of your agent's configuration. You can roll back to any previous state, compare what changed between two snapshots, and target specific versions per request for A/B testing or gradual rollouts.
212
+ Every time you save changes to an agent or prompt block, a new version snapshot is created. Versions give you a full history of your agent's configuration. You can roll back to any previous state and compare what changed between two snapshots, plus target specific versions per request for A/B testing or gradual rollouts.
213
213
 
214
214
  Version management is available through the server Studio, REST API, the Client SDK, and the React SDK. See the [Client SDK agents reference](https://mastra.ai/reference/client-js/agents) for endpoints, SDK methods, and code examples.
215
215
 
216
216
  ### Version lifecycle
217
217
 
218
- Each version has one of three statuses:
218
+ Version snapshots don't store a lifecycle status. Instead, the agent or prompt block stores an `activeVersionId` that identifies its published version.
219
219
 
220
- | Status | Description |
221
- | --------- | ----------------------------------------------------------------------------------- |
222
- | Draft | The latest working copy. Every save creates a new draft version. |
223
- | Published | The active version used in production. Only one version can be published at a time. |
224
- | Archived | A previous version that's no longer active. You can restore any archived version. |
220
+ | Term | Description |
221
+ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- |
222
+ | Latest | The most recently saved version snapshot. |
223
+ | Published | The version whose ID matches `activeVersionId`. Only one version can be active at a time. |
224
+ | Draft | The latest version when it differs from the active version. If `activeVersionId` isn't set, the latest version remains unpublished. |
225
+ | Historical | Any other saved version. Historical versions remain available for comparison, direct selection, and restoration. |
225
226
 
226
- The typical flow is: Edit the draft, test it, then activate it to make it the published version. The previously published version becomes archived so you can restore it if needed. You can do this through Studio or programmatically through the API.
227
+ Saving a database-backed resource creates a new latest version. If an active version already exists, it continues to handle requests until you publish the new version. Publishing sets `activeVersionId` to the selected version without deleting or changing the previous active version.
227
228
 
228
- This lifecycle makes it safe to experiment. Non-technical team members can iterate on a draft without affecting production traffic, then publish when ready. If something goes wrong, restoring a previous version is a single API call.
229
+ Restoring a historical version copies its configuration into a new draft that remains inactive until you publish it.
229
230
 
230
231
  ### Version targeting and experimentation
231
232
 
232
- Because every version has a unique ID, you can route different requests to different agent configurations. This opens up several patterns:
233
+ Because every version has a unique ID, you can route different requests to different agent configurations. This supports several patterns:
233
234
 
234
- - **A/B testing**: Split traffic between two published versions and compare performance metrics.
235
- - **Canary rollouts**: Send a small percentage of requests to a new version before promoting it.
236
- - **Per-user targeting**: Pin specific users or accounts to a version while others use the default.
237
- - **Environment separation**: Use the draft version in staging and the published version in production.
235
+ - **A/B testing**: Split traffic between specific version IDs and compare performance metrics.
236
+ - **Canary rollouts**: Send a small percentage of requests to a draft or historical version before publishing it.
237
+ - **Per-user targeting**: Pin specific users or accounts to a version while others use the active version.
238
+ - **Environment separation**: Use the latest version in staging and the active version in production.
238
239
 
239
- Pass a `versionId` or `status` when calling the agent through the Client SDK, server query parameters, or React SDK `requestContext`, and the correct version is loaded automatically.
240
+ Pass a `versionId` or `status` when calling the agent through the Client SDK, server query parameters, or React SDK `requestContext`. A `versionId` selects that exact snapshot, `status: 'draft'` selects the latest snapshot, and `status: 'published'` selects the active snapshot.
240
241
 
241
242
  ### Version selection
242
243
 
243
- By default, [`mastra.getAgentById()`](https://mastra.ai/reference/core/getAgentById) loads the published (active) version of the stored override. You can request a specific version, which is useful for testing a draft before publishing, running A/B experiments, or pinning a user to a known-good configuration:
244
+ Calling [`mastra.getAgentById()`](https://mastra.ai/reference/core/getAgentById) without a version selector returns the registered code-defined agent. Pass a selector to apply a published, draft, or specific stored override:
244
245
 
245
246
  ```typescript
246
- // Load the published version (default)
247
- const agent = mastra.getAgentById('support-agent')
247
+ // Load the registered code-defined agent without stored overrides
248
+ const codeAgent = mastra.getAgentById('support-agent')
248
249
 
249
- // Load the latest draft
250
- const agent = mastra.getAgentById('support-agent', {
250
+ // Load the active published override
251
+ const publishedAgent = await mastra.getAgentById('support-agent', {
252
+ status: 'published',
253
+ })
254
+
255
+ // Load the latest override
256
+ const draftAgent = await mastra.getAgentById('support-agent', {
251
257
  status: 'draft',
252
258
  })
253
259
 
254
260
  // Load a specific version
255
- const agent = mastra.getAgentById('support-agent', {
261
+ const versionedAgent = await mastra.getAgentById('support-agent', {
256
262
  versionId: 'abc-123',
257
263
  })
258
264
  ```
@@ -278,9 +284,9 @@ When a [supervisor agent](https://mastra.ai/docs/agents/supervisor-agents) deleg
278
284
 
279
285
  Set version overrides at three levels, with later levels taking priority:
280
286
 
281
- 1. **Mastra instance config** global defaults that apply to every `generate()` and `stream()` call.
282
- 2. **Per-invocation options** overrides passed directly to `generate()` or `stream()`.
283
- 3. **Server request body** overrides sent in the `versions` field of an API request.
287
+ 1. **Mastra instance config**: global defaults that apply to every `generate()` and `stream()` call.
288
+ 2. **Per-invocation options**: overrides passed directly to `generate()` or `stream()`.
289
+ 3. **Server request body**: overrides sent in the `versions` field of an API request.
284
290
 
285
291
  Resolution order: **per-invocation > request body > Mastra instance defaults > code-defined agent**.
286
292
 
@@ -25,7 +25,7 @@ const pinger = new Agent({
25
25
  id: 'pinger',
26
26
  name: 'Pinger',
27
27
  instructions: 'Report the current system status in one sentence.',
28
- model: 'openai/gpt-5.5',
28
+ model: 'openai/gpt-5.6-sol',
29
29
  })
30
30
 
31
31
  const mastra = new Mastra({
@@ -136,7 +136,7 @@ await mastra.schedules.create({
136
136
  })
137
137
  ```
138
138
 
139
- Workflow schedules created this way are independent of the declarative `schedule` field on `createWorkflow` see [scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows) for the declarative form and Studio views.
139
+ Workflow schedules created this way are independent of the declarative `schedule` field on `createWorkflow`, see [scheduled workflows](https://mastra.ai/docs/workflows/scheduled-workflows) for the declarative form and Studio views.
140
140
 
141
141
  ### Custom IDs
142
142
 
@@ -187,7 +187,7 @@ The hooks are:
187
187
 
188
188
  - `prepare`: runs before the fire. Return an object to override fire-time parameters such as `prompt` or `threadId`, `null` to skip the fire, or `undefined` to use the stored defaults.
189
189
  - `onFinish`: runs once per trigger that reached a non-error, non-abort terminal state.
190
- - `onError`: runs when `prepare`, the signal, or the agent run threw.
190
+ - `onError`: runs after a failure in `prepare` or the signal. It also runs when the agent run fails.
191
191
  - `onAbort`: runs when the run was aborted mid-stream.
192
192
 
193
193
  Every hook context includes `agentId` (the agent the schedule fired for) alongside `schedule` and `trigger`.
@@ -6,7 +6,7 @@
6
6
 
7
7
  > **Beta:** This feature is in beta. Breaking changes may occur without a major version bump until the API is stable.
8
8
 
9
- Signals are a way to interact with an agent through a thread. Instead of starting every interaction with `agent.stream()`, subscribe to a thread and send messages or signals. Mastra either wakes the agent when the thread is idle, drops input into the running agent loop, or queues input for the next turn.
9
+ Signals are a way to interact with an agent through a thread. Instead of starting every interaction with `agent.stream()`, subscribe to a thread and send messages or signals. Mastra either wakes the agent when the thread is idle or drops input into the running agent loop, or alternatively queues input for the next turn.
10
10
 
11
11
  Use message APIs for user-authored input. Use `sendSignal()` for lower-level system context, such as background task notifications, policy reminders, or processor-generated context.
12
12
 
@@ -29,7 +29,7 @@ const agent = new Agent({
29
29
  id: 'support-agent',
30
30
  name: 'Support Agent',
31
31
  instructions: 'Help the user compare options.',
32
- model: 'openai/gpt-5.5',
32
+ model: 'openai/gpt-5.6-sol',
33
33
  })
34
34
 
35
35
  const thread = {
@@ -143,7 +143,7 @@ The model receives the signal as context like this:
143
143
  <notification source="github" pr="123">PR #123 has a new review comment from User X about the API surface.</notification>
144
144
  ```
145
145
 
146
- Use XML-safe `tagName` and attribute names. They can contain letters, numbers, underscores, periods, and hyphens. They must start with a letter or underscore.
146
+ Use XML-safe `tagName` and attribute names. They can contain letters, numbers, shows, periods, and hyphens. They must start with a letter or underscore.
147
147
 
148
148
  #### Storage support
149
149
 
@@ -320,7 +320,9 @@ Use `createNotificationInboxTool()` to give agents one tool for inbox actions in
320
320
 
321
321
  Signals coordinate runs through a pub/sub backend. When a signal arrives on a backend that implements `LeaseProvider`, Mastra acquires a lease on the target thread so a single process owns the conversation at a time, then either wakes the agent or routes the input into the running loop. Backends without leasing fall back to a no-op that always grants ownership, which is fine in a single process but not across instances.
322
322
 
323
- The default in-memory pub/sub can't cross instance boundaries. On serverless platforms like Vercel, or any multi-instance deployment, a follow-up signal can land on a different instance than the one running the agent. Without a shared pub/sub, that instance can't reach the active run and starts its own, leaving the original run untouched and the thread processed twice.
323
+ The default in-memory pub/sub can't cross instance boundaries. On serverless platforms like Vercel, or any multi-instance deployment, a follow-up signal can be routed to a different instance than the one running the agent.
324
+
325
+ Without a shared pub/sub, that instance can't reach the active run and starts its own, leaving the original run untouched and the thread processed twice.
324
326
 
325
327
  Configure a shared pub/sub backed by Redis Streams on the `Mastra` instance so leases and signals coordinate across instances:
326
328
 
@@ -360,7 +362,9 @@ If you call Mastra over HTTP directly, use `POST /api/agents/:agentId/send-messa
360
362
 
361
363
  ### Use the client SDK
362
364
 
363
- The JavaScript client exposes thread signal APIs. Use `subscribeToThread()` before sending thread input so the client can render the stream that wakes from, or receives, the input.
365
+ The JavaScript client exposes thread signal APIs.
366
+
367
+ Use `subscribeToThread()` before sending thread input so the client can render the stream that receives the input or wakes in response to it.
364
368
 
365
369
  ```typescript
366
370
  const agent = client.getAgent('supportAgent')
@@ -93,11 +93,11 @@ The `MastraAuthFirebase` class can be configured through constructor options or
93
93
  - `FIREBASE_SERVICE_ACCOUNT`: Path to Firebase service account JSON file
94
94
  - `FIRESTORE_DATABASE_ID` or `FIREBASE_DATABASE_ID`: Firestore database ID
95
95
 
96
- > **Note:** When constructor options aren't provided, the class automatically reads these environment variables. This means you can call `new MastraAuthFirebase()` without any arguments if your environment variables are properly configured.
96
+ > **Note:** When constructor options aren't provided, the class automatically reads these environment variables. As a result, you can call `new MastraAuthFirebase()` without any arguments if your environment variables are properly configured.
97
97
 
98
98
  ### User Authorization
99
99
 
100
- By default, `MastraAuthFirebase` uses Firestore to manage user access. It expects a collection named `user_access` with documents keyed by user UIDs. The presence of a document in this collection determines whether a user is authorized.
100
+ By default, `MastraAuthFirebase` uses Firestore to manage user access. It expects a `user_access` collection with documents keyed by user UIDs. The presence of a document in this collection determines whether a user is authorized.
101
101
 
102
102
  ```text
103
103
  user_access/
@@ -138,7 +138,7 @@ Visit [MastraClient](https://mastra.ai/reference/client-js/mastra-client) for mo
138
138
 
139
139
  ## Credentials and session cookies
140
140
 
141
- **Authenticate Mastra API calls with session cookies** when your UI and Mastra API aren't on the same origindifferent host, subdomain, or port (for example Mastra Studio on one port and a custom server on another). Add **`credentials: 'include'`** to `MastraClient` so each request carries the cookies the user already has after sign-in. Skip this and you will often get **`401`** responses from Mastra even though login succeeded in the browser.
141
+ **Authenticate Mastra API calls with session cookies** when your UI and Mastra API aren't on the same origin, different host, subdomain, or port (for example Mastra Studio on one port and a custom server on another). Add **`credentials: 'include'`** to `MastraClient` so each request carries the cookies the user already has after sign-in. Skip this and you will often get **`401`** responses from Mastra even though login succeeded in the browser.
142
142
 
143
143
  ```typescript
144
144
  import { MastraClient } from '@mastra/client-js'
@@ -149,7 +149,7 @@ export const mastraClient = new MastraClient({
149
149
  })
150
150
  ```
151
151
 
152
- **Allow credentialed cross-origin requests on your server**—see [CORS: requests with credentials](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS#requests_with_credentials). You need a concrete `Access-Control-Allow-Origin` (not `*`) and `Access-Control-Allow-Credentials: true`, or the browser will block the call before it reaches Mastra.
152
+ **Allow credentialed cross-origin requests on your server**, see [CORS: requests with credentials](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS#requests_with_credentials). You need a concrete `Access-Control-Allow-Origin` (not `*`) and `Access-Control-Allow-Credentials: true`, or the browser will block the call before it reaches Mastra.
153
153
 
154
154
  **Using `@mastra/react`?** Wrap your app with `MastraReactProvider`, set `baseUrl` and `apiPrefix` to match your server, and rely on the default `credentials: 'include'`. Change `credentials` only when you want `same-origin` or `omit` behavior.
155
155
 
@@ -237,7 +237,7 @@ export const colorAgent = new Agent({
237
237
  instructions: `You are a helpful CSS assistant.
238
238
  You can change the background color of web pages.
239
239
  Respond with a hex reference for the color requested by the user`,
240
- model: 'openai/gpt-5.5',
240
+ model: 'openai/gpt-5.6-sol',
241
241
  })
242
242
  ```
243
243
 
@@ -727,6 +727,23 @@ const agent = await mastraClient.createStoredAgent({
727
727
  })
728
728
  ```
729
729
 
730
+ By default, `createStoredAgent()` publishes the initial version immediately. Set `autoPublish` to `false` to create an unpublished draft that you can review before calling [`activateVersion()`](#activateversion):
731
+
732
+ ```typescript
733
+ const draft = await mastraClient.createStoredAgent({
734
+ id: 'draft-agent',
735
+ name: 'Draft Assistant',
736
+ instructions: 'You are a helpful assistant.',
737
+ model: {
738
+ provider: 'openai',
739
+ name: 'gpt-5',
740
+ },
741
+ autoPublish: false,
742
+ })
743
+ ```
744
+
745
+ Editors configured with the `code` source always publish the initial version because saving writes the agent configuration to the file system.
746
+
730
747
  With all options:
731
748
 
732
749
  ```typescript