@mastra/memory 1.26.1-alpha.6 → 1.26.1-alpha.7
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 +11 -0
- package/dist/docs/SKILL.md +15 -9
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-agents-networks.md +2 -2
- package/dist/docs/references/docs-capabilities-subagents.md +2 -2
- package/dist/docs/references/docs-memory-memory-processors.md +5 -5
- package/dist/docs/references/docs-memory-message-history.md +1 -1
- package/dist/docs/references/docs-memory-observational-memory.md +1 -1
- package/dist/docs/references/docs-storage-overview.md +14 -13
- package/dist/docs/references/integrations-channels-github.md +103 -0
- package/dist/docs/references/{reference-storage-dsql.md → integrations-databases-aurora-dsql.md} +1 -1
- package/dist/docs/references/{reference-storage-dynamodb.md → integrations-databases-dynamodb.md} +1 -1
- package/dist/docs/references/{reference-storage-libsql.md → integrations-databases-libsql.md} +2 -2
- package/dist/docs/references/{reference-storage-mongodb.md → integrations-databases-mongodb.md} +1 -1
- package/dist/docs/references/{reference-storage-oracledb.md → integrations-databases-oracledb.md} +1 -1
- package/dist/docs/references/{reference-storage-postgresql.md → integrations-databases-postgresql.md} +1 -1
- package/dist/docs/references/{reference-storage-redis.md → integrations-databases-redis.md} +1 -1
- package/dist/docs/references/{reference-storage-upstash.md → integrations-databases-upstash.md} +1 -1
- package/dist/docs/references/reference-migrations-agentnetwork.md +100 -0
- package/dist/docs/references/reference-migrations-upgrade-to-v1-memory.md +288 -0
- package/dist/docs/references/reference-vectors-oracledb.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/processors/index.cjs +1 -1
- package/dist/processors/index.js +1 -1
- package/dist/processors/observational-memory/observation-strategies/async-buffer.d.ts.map +1 -1
- package/dist/{src-B2WSEEmS.cjs → src-CTwoCwmY.cjs} +10 -10
- package/dist/{src-B2WSEEmS.cjs.map → src-CTwoCwmY.cjs.map} +1 -1
- package/dist/{src-B_n15_Xg.js → src-DGdlH4fo.js} +10 -10
- package/dist/{src-B_n15_Xg.js.map → src-DGdlH4fo.js.map} +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 1.26.1-alpha.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed a crash where updating a thread without a title (for example during observational memory buffering) could write a null title and violate the database's not-null constraint when running a newer @mastra/memory against an older storage package. Memory now checks whether the connected storage adapter supports partial thread updates and backfills the existing title for older adapters, so mixed-version deployments keep working. See #21041 for the original title-clobbering fix this makes backward compatible. ([#21257](https://github.com/mastra-ai/mastra/pull/21257))
|
|
8
|
+
|
|
9
|
+
- Storage adapters now declare support for partial thread updates, letting newer @mastra/memory preserve existing thread titles instead of overwriting them, while remaining safe against older versions. ([#21257](https://github.com/mastra-ai/mastra/pull/21257))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b), [`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b)]:
|
|
12
|
+
- @mastra/core@1.58.0-alpha.15
|
|
13
|
+
|
|
3
14
|
## 1.26.1-alpha.6
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-memory
|
|
|
3
3
|
description: Documentation for @mastra/memory. Use when working with @mastra/memory APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/memory"
|
|
6
|
-
version: "1.26.1-alpha.
|
|
6
|
+
version: "1.26.1-alpha.7"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -31,6 +31,18 @@ Read the individual reference documents for detailed explanations and code examp
|
|
|
31
31
|
- [Working memory](references/docs-memory-working-memory.md) - Learn how to configure working memory in Mastra to store persistent user data, preferences.
|
|
32
32
|
- [Storage overview](references/docs-storage-overview.md) - Configure storage for Mastra to persist runtime state across agents, workflows, observability, evals, schedules, and memory.
|
|
33
33
|
|
|
34
|
+
### Integrations
|
|
35
|
+
|
|
36
|
+
- [GitHub](references/integrations-channels-github.md) - Notify a Mastra agent when subscribed GitHub pull requests change.
|
|
37
|
+
- [Aurora DSQL](references/integrations-databases-aurora-dsql.md) - Documentation for the Amazon Aurora DSQL storage implementation in Mastra.
|
|
38
|
+
- [DynamoDB](references/integrations-databases-dynamodb.md) - Documentation for the DynamoDB storage implementation in Mastra, using a single-table design with ElectroDB.
|
|
39
|
+
- [libSQL](references/integrations-databases-libsql.md) - Documentation for the libSQL storage implementation in Mastra.
|
|
40
|
+
- [MongoDB](references/integrations-databases-mongodb.md) - Documentation for the MongoDB storage implementation in Mastra.
|
|
41
|
+
- [OracleDB](references/integrations-databases-oracledb.md) - Documentation for the Oracle Database storage provider in Mastra.
|
|
42
|
+
- [PostgreSQL](references/integrations-databases-postgresql.md) - Documentation for the PostgreSQL storage implementation in Mastra.
|
|
43
|
+
- [Redis](references/integrations-databases-redis.md) - Documentation for the Redis storage implementation in Mastra.
|
|
44
|
+
- [Upstash](references/integrations-databases-upstash.md) - Documentation for the Upstash storage implementation in Mastra.
|
|
45
|
+
|
|
34
46
|
### Reference
|
|
35
47
|
|
|
36
48
|
- [Reference: Mastra.getMemory()](references/reference-core-getMemory.md) - Documentation for the `Mastra.getMemory()` method in Mastra, which retrieves a registered memory instance by its registry key.
|
|
@@ -45,15 +57,9 @@ Read the individual reference documents for detailed explanations and code examp
|
|
|
45
57
|
- [Reference: Observational Memory](references/reference-memory-observational-memory.md) - API reference for Observational Memory in Mastra: a three-tier memory system that uses Observer and Reflector agents to maintain long-term memory across conversations.
|
|
46
58
|
- [Reference: summarizeConversation()](references/reference-memory-summarizeConversation.md) - Documentation for the standalone `summarizeConversation()` function in Mastra, which summarizes messages you pass in and extracts structured values from them.
|
|
47
59
|
- [Reference: Memory.summarizeThread()](references/reference-memory-summarizeThread.md) - Documentation for the `Memory.summarizeThread()` method in Mastra, which summarizes a thread's conversation in one shot and extracts structured values from it.
|
|
60
|
+
- [Migration: AgentNetwork to .network()](references/reference-migrations-agentnetwork.md) - Learn how to migrate from AgentNetwork primitives to .network() in Mastra.
|
|
61
|
+
- [Memory](references/reference-migrations-upgrade-to-v1-memory.md) - Learn how to migrate memory-related changes when upgrading to v1.
|
|
48
62
|
- [Reference: TokenLimiterProcessor](references/reference-processors-token-limiter-processor.md) - Documentation for the TokenLimiterProcessor in Mastra, which limits the number of tokens in messages.
|
|
49
|
-
- [Reference: Aurora DSQL Storage](references/reference-storage-dsql.md) - Documentation for the Amazon Aurora DSQL storage implementation in Mastra.
|
|
50
|
-
- [Reference: DynamoDB storage](references/reference-storage-dynamodb.md) - Documentation for the DynamoDB storage implementation in Mastra, using a single-table design with ElectroDB.
|
|
51
|
-
- [Reference: libSQL storage](references/reference-storage-libsql.md) - Documentation for the libSQL storage implementation in Mastra.
|
|
52
|
-
- [Reference: MongoDB storage](references/reference-storage-mongodb.md) - Documentation for the MongoDB storage implementation in Mastra.
|
|
53
|
-
- [Reference: OracleDB storage](references/reference-storage-oracledb.md) - Documentation for the Oracle Database storage provider in Mastra.
|
|
54
|
-
- [Reference: PostgreSQL storage](references/reference-storage-postgresql.md) - Documentation for the PostgreSQL storage implementation in Mastra.
|
|
55
|
-
- [Reference: Redis Storage](references/reference-storage-redis.md) - Documentation for the Redis storage implementation in Mastra.
|
|
56
|
-
- [Reference: Upstash storage](references/reference-storage-upstash.md) - Documentation for the Upstash storage implementation in Mastra.
|
|
57
63
|
- [Reference: libSQL vector store](references/reference-vectors-libsql.md) - Documentation for the LibSQLVector class in Mastra, which provides vector search using libSQL with vector extensions.
|
|
58
64
|
- [Reference: MongoDB vector store](references/reference-vectors-mongodb.md) - Documentation for the MongoDBVector class in Mastra, which provides vector search using MongoDB Atlas and Atlas Vector Search.
|
|
59
65
|
- [Reference: OracleDB vector store](references/reference-vectors-oracledb.md) - Documentation for the Oracle Database vector provider in Mastra.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> **Deprecated:** Agent networks are deprecated and will be removed in a future major release. [Supervisor agents](https://mastra.ai/docs/capabilities/subagents) using `agent.stream()` or `agent.generate()` are now the recommended approach. It provides the same multi-agent coordination with better control, a simpler API, and easier debugging.
|
|
6
6
|
>
|
|
7
|
-
> See the [migration guide](https://mastra.ai/
|
|
7
|
+
> See the [migration guide](https://mastra.ai/reference/migrations/network-to-supervisor) to upgrade.
|
|
8
8
|
|
|
9
9
|
A **routing agent** uses an LLM to interpret a request and decide which primitives (subagents, workflows, or tools) to call, in what order, and with what data.
|
|
10
10
|
|
|
@@ -181,4 +181,4 @@ Requirements for automatic resumption:
|
|
|
181
181
|
## Related
|
|
182
182
|
|
|
183
183
|
- [Supervisor agents](https://mastra.ai/docs/capabilities/subagents)
|
|
184
|
-
- [Migration: `.network()` to supervisor agents](https://mastra.ai/
|
|
184
|
+
- [Migration: `.network()` to supervisor agents](https://mastra.ai/reference/migrations/network-to-supervisor)
|
|
@@ -16,7 +16,7 @@ Common use cases:
|
|
|
16
16
|
- Multi-step tasks that need different expertise at each stage
|
|
17
17
|
- Tasks where you need fine-grained control over delegation behavior
|
|
18
18
|
|
|
19
|
-
> **Note:** A parent agent that coordinates subagents is often called a supervisor. The supervisor pattern is one approach to building multi-agent systems in Mastra. For other patterns, read the [conceptual overview](https://mastra.ai/guides/
|
|
19
|
+
> **Note:** A parent agent that coordinates subagents is often called a supervisor. The supervisor pattern is one approach to building multi-agent systems in Mastra. For other patterns, read the [conceptual overview](https://mastra.ai/docs/guides/multi-agent-systems).
|
|
20
20
|
|
|
21
21
|
## Quickstart
|
|
22
22
|
|
|
@@ -453,5 +453,5 @@ Version overrides propagate automatically through delegation. See [Subagent vers
|
|
|
453
453
|
- [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
|
|
454
454
|
- [Agent approval](https://mastra.ai/docs/agents/agent-approval)
|
|
455
455
|
- [Memory in multi-agent systems](https://mastra.ai/docs/memory/overview)
|
|
456
|
-
- [Concept: Multi-agent systems](https://mastra.ai/guides/
|
|
456
|
+
- [Concept: Multi-agent systems](https://mastra.ai/docs/guides/multi-agent-systems)
|
|
457
457
|
- 📹 [Mastra supervisor agents workshop](https://www.youtube.com/watch?v=FNb2fL9WhQg\&t=1872s)
|
|
@@ -313,11 +313,11 @@ Both scenarios are safe - guardrails prevent inappropriate content from being pe
|
|
|
313
313
|
|
|
314
314
|
Some storage providers enforce record size limits that base64-encoded file attachments can exceed:
|
|
315
315
|
|
|
316
|
-
| Provider
|
|
317
|
-
|
|
|
318
|
-
| [DynamoDB](https://mastra.ai/
|
|
319
|
-
| [Convex](https://mastra.ai/
|
|
320
|
-
| [Cloudflare D1](https://mastra.ai/
|
|
316
|
+
| Provider | Record size limit |
|
|
317
|
+
| ----------------------------------------------------------------------- | ----------------- |
|
|
318
|
+
| [DynamoDB](https://mastra.ai/integrations/databases/dynamodb) | 400 KB |
|
|
319
|
+
| [Convex](https://mastra.ai/integrations/databases/convex) | 1 MiB |
|
|
320
|
+
| [Cloudflare D1](https://mastra.ai/integrations/databases/cloudflare-d1) | 1 MiB |
|
|
321
321
|
|
|
322
322
|
PostgreSQL, MongoDB, and libSQL have higher limits and are usually unaffected.
|
|
323
323
|
|
|
@@ -12,7 +12,7 @@ You can also retrieve message history to display past conversations in your UI.
|
|
|
12
12
|
>
|
|
13
13
|
> Sending the full history is redundant because Mastra loads messages from storage, and it can cause message ordering bugs when client-side timestamps conflict with stored timestamps.
|
|
14
14
|
>
|
|
15
|
-
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/
|
|
15
|
+
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/integrations/agentic-ui/ai-sdk-ui).
|
|
16
16
|
|
|
17
17
|
## Threads and resources
|
|
18
18
|
|
|
@@ -92,7 +92,7 @@ See [configuration options](https://mastra.ai/reference/memory/observational-mem
|
|
|
92
92
|
>
|
|
93
93
|
> Observational memory still relies on stored conversation history. Sending the full history is redundant and can cause message ordering bugs when client-side timestamps conflict with stored timestamps.
|
|
94
94
|
>
|
|
95
|
-
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/
|
|
95
|
+
> For an AI SDK example, see [Using Mastra Memory](https://mastra.ai/integrations/agentic-ui/ai-sdk-ui).
|
|
96
96
|
|
|
97
97
|
> **Note:** OM currently only supports `@mastra/pg`, `@mastra/libsql`, `@mastra/mysql`, `@mastra/mongodb`, `@mastra/convex`, and `@mastra/oracledb` storage adapters. It uses background agents for managing memory. When no model is set, the default model is `google/gemini-2.5-flash`.
|
|
98
98
|
|
|
@@ -190,19 +190,20 @@ You can also route `observability` to a dedicated analytics backend. See the [ob
|
|
|
190
190
|
|
|
191
191
|
Each provider page includes installation instructions, configuration parameters, and usage examples:
|
|
192
192
|
|
|
193
|
-
- [
|
|
194
|
-
- [
|
|
195
|
-
- [
|
|
196
|
-
- [
|
|
197
|
-
- [
|
|
198
|
-
- [
|
|
199
|
-
- [
|
|
200
|
-
- [
|
|
201
|
-
- [
|
|
202
|
-
- [
|
|
203
|
-
- [
|
|
204
|
-
- [
|
|
205
|
-
- [
|
|
193
|
+
- [Cloudflare D1](https://mastra.ai/integrations/databases/cloudflare-d1)
|
|
194
|
+
- [Cloudflare KV & Durable Objects](https://mastra.ai/integrations/databases/cloudflare-kv)
|
|
195
|
+
- [Convex](https://mastra.ai/integrations/databases/convex)
|
|
196
|
+
- [DynamoDB](https://mastra.ai/integrations/databases/dynamodb)
|
|
197
|
+
- [Google Cloud Spanner](https://mastra.ai/integrations/databases/spanner)
|
|
198
|
+
- [LanceDB](https://mastra.ai/integrations/databases/lancedb)
|
|
199
|
+
- [libSQL](https://mastra.ai/integrations/databases/libsql)
|
|
200
|
+
- [Microsoft SQL Server](https://mastra.ai/integrations/databases/mssql)
|
|
201
|
+
- [MongoDB](https://mastra.ai/integrations/databases/mongodb)
|
|
202
|
+
- [Neon Postgres](https://mastra.ai/integrations/databases/neon)
|
|
203
|
+
- [OracleDB](https://mastra.ai/integrations/databases/oracledb)
|
|
204
|
+
- [PostgreSQL](https://mastra.ai/integrations/databases/postgresql)
|
|
205
|
+
- [Redis](https://mastra.ai/integrations/databases/redis)
|
|
206
|
+
- [Upstash](https://mastra.ai/integrations/databases/upstash)
|
|
206
207
|
|
|
207
208
|
> **Tip:** libSQL is the fastest path for local development because it doesn't require running a separate database server.
|
|
208
209
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# GitHub
|
|
4
|
+
|
|
5
|
+
The `@mastra/github-signals` provider lets an agent follow pull requests (PRs). It polls subscribed PRs and sends [notification signals](https://mastra.ai/docs/long-running-agents/signals) to the agent thread when relevant activity occurs.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install GitHub Signals and the memory packages used in this example:
|
|
10
|
+
|
|
11
|
+
**npm**:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @mastra/github-signals @mastra/libsql @mastra/memory
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**pnpm**:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Yarn**:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
yarn add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Bun**:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bun add @mastra/github-signals @mastra/libsql @mastra/memory
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
GitHub Signals requires:
|
|
38
|
+
|
|
39
|
+
- A Mastra storage adapter with memory and notification support. The provider stores each subscription in the thread's metadata, so the thread must already exist.
|
|
40
|
+
- The `gitcrawl` command on `PATH`, configured to access the repositories you want to monitor. The provider runs `gitcrawl sync` and reads its SQLite database.
|
|
41
|
+
- The `sqlite3` command on `PATH`.
|
|
42
|
+
- The [GitHub CLI](https://cli.github.com/) installed and authenticated. The provider uses `gh api` to check whether comment authors have access to the repository before notifying the agent.
|
|
43
|
+
|
|
44
|
+
By default, comments from users with `admin`, `maintain`, or `write` access can trigger notifications. CodeRabbit and Devin bot comments are also allowed. Configure `authorizedPermissions`, `authorizedBots`, or `ignoredBots` when you need different rules.
|
|
45
|
+
|
|
46
|
+
## Agent and subscription
|
|
47
|
+
|
|
48
|
+
Create one `GithubSignals` instance and register it on the agent. Register the agent and a storage adapter on the Mastra instance:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { Agent } from '@mastra/core/agent'
|
|
52
|
+
import { Mastra } from '@mastra/core/mastra'
|
|
53
|
+
import { Memory } from '@mastra/memory'
|
|
54
|
+
import { GithubSignals } from '@mastra/github-signals'
|
|
55
|
+
import { LibSQLStore } from '@mastra/libsql'
|
|
56
|
+
|
|
57
|
+
export const githubSignals = new GithubSignals()
|
|
58
|
+
|
|
59
|
+
export const devAgent = new Agent({
|
|
60
|
+
id: 'dev-agent',
|
|
61
|
+
name: 'Development Agent',
|
|
62
|
+
instructions: 'Triage pull request activity and help resolve issues.',
|
|
63
|
+
model: 'openai/gpt-5.6-sol',
|
|
64
|
+
memory: new Memory(),
|
|
65
|
+
signals: [githubSignals],
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
export const mastra = new Mastra({
|
|
69
|
+
agents: { devAgent },
|
|
70
|
+
storage: new LibSQLStore({
|
|
71
|
+
id: 'mastra-storage',
|
|
72
|
+
url: 'file:./mastra.db',
|
|
73
|
+
}),
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
After the agent has created a memory thread, subscribe that thread to a PR. Passing `owner` and `repo` works from any directory:
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
await githubSignals.subscribeThreadToPR({
|
|
81
|
+
threadId: 'thread-123',
|
|
82
|
+
resourceId: 'user-123',
|
|
83
|
+
pr: {
|
|
84
|
+
owner: 'acme',
|
|
85
|
+
repo: 'web-app',
|
|
86
|
+
number: 42,
|
|
87
|
+
},
|
|
88
|
+
})
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The provider syncs the PR immediately, stores the subscription, and starts polling every five minutes. Set `pollIntervalMs` in the `GithubSignals` constructor to change the interval. If the process restarts, call `startPollingForThread()` for each persisted thread subscription to resume polling.
|
|
92
|
+
|
|
93
|
+
## Pull request notifications
|
|
94
|
+
|
|
95
|
+
GitHub Signals notifies the agent when a subscribed PR has:
|
|
96
|
+
|
|
97
|
+
- A new authorized comment, commit, or other pull request activity.
|
|
98
|
+
- A change in unresolved review threads.
|
|
99
|
+
- Continuous integration (CI) checks that start, fail, or recover.
|
|
100
|
+
- Merge conflicts that appear or are resolved.
|
|
101
|
+
- A state change to closed, reopened, or merged.
|
|
102
|
+
|
|
103
|
+
The initial sync sends a baseline notification with the current PR state. A merge automatically removes the thread's subscription to that PR.
|
package/dist/docs/references/{reference-storage-dynamodb.md → integrations-databases-dynamodb.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# DynamoDB
|
|
3
|
+
# DynamoDB
|
|
4
4
|
|
|
5
5
|
The DynamoDB storage implementation provides a high-capacity and performant NoSQL database solution for Mastra, using a single-table design pattern with [ElectroDB](https://electrodb.dev/).
|
|
6
6
|
|
package/dist/docs/references/{reference-storage-libsql.md → integrations-databases-libsql.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# libSQL
|
|
3
|
+
# libSQL
|
|
4
4
|
|
|
5
5
|
[libSQL](https://docs.turso.tech/libsql) is an open-source, SQLite-compatible database that supports both local and remote deployments. It can be used to store message history, workflow snapshots, traces, and eval scores.
|
|
6
6
|
|
|
@@ -140,4 +140,4 @@ const thread = await memoryStore?.getThreadById({ threadId: '...' })
|
|
|
140
140
|
|
|
141
141
|
libSQL supports observability and is ideal for local development. Use the `realtime` [tracing strategy](https://mastra.ai/docs/observability/integrations/exporters/mastra-storage) for immediate visibility while debugging.
|
|
142
142
|
|
|
143
|
-
For production environments with higher trace volumes, consider using [PostgreSQL](https://mastra.ai/
|
|
143
|
+
For production environments with higher trace volumes, consider using [PostgreSQL](https://mastra.ai/integrations/databases/postgresql) or [ClickHouse via composite storage](https://mastra.ai/reference/storage/composite).
|
package/dist/docs/references/{reference-storage-mongodb.md → integrations-databases-mongodb.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# MongoDB
|
|
3
|
+
# MongoDB
|
|
4
4
|
|
|
5
5
|
The MongoDB storage implementation provides a high-capacity storage solution using MongoDB databases with support for both document storage and vector operations.
|
|
6
6
|
|
package/dist/docs/references/{reference-storage-oracledb.md → integrations-databases-oracledb.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# OracleDB
|
|
3
|
+
# OracleDB
|
|
4
4
|
|
|
5
5
|
The OracleDB storage provider stores Mastra application state in Oracle Database. It implements Mastra's composite storage interface, so one `OracleStore` instance can back memory, workflow snapshots, observability, scores, scorer definitions, MCP client metadata, and agent registry data.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# Redis
|
|
3
|
+
# Redis
|
|
4
4
|
|
|
5
5
|
The Redis storage implementation provides a high-performance storage solution using direct Redis connections via [`node-redis`](https://github.com/redis/node-redis) (the official Redis client for Node.js). It supports standalone Redis, and through custom client configuration, Redis Sentinel and Cluster deployments.
|
|
6
6
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
+
|
|
3
|
+
# Migrate from AgentNetwork to `.network()`
|
|
4
|
+
|
|
5
|
+
As of `v0.20.0` for `@mastra/core`, the following changes apply.
|
|
6
|
+
|
|
7
|
+
## Upgrade from AI SDK v4 to v5
|
|
8
|
+
|
|
9
|
+
- Bump all your model provider packages by a major version.
|
|
10
|
+
|
|
11
|
+
> **Note:** This will ensure that they're all v5 models now.
|
|
12
|
+
|
|
13
|
+
## Memory is required
|
|
14
|
+
|
|
15
|
+
- Memory is now required for the agent network to function properly.
|
|
16
|
+
|
|
17
|
+
> **Note:** You must configure memory for the agent.
|
|
18
|
+
|
|
19
|
+
## Migration paths
|
|
20
|
+
|
|
21
|
+
If you were using the `AgentNetwork` primitive, you can replace the `AgentNetwork` with `Agent`.
|
|
22
|
+
|
|
23
|
+
Before:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { AgentNetwork } from '@mastra/core/network'
|
|
27
|
+
|
|
28
|
+
const agent = new AgentNetwork({
|
|
29
|
+
name: 'agent-network',
|
|
30
|
+
agents: [agent1, agent2],
|
|
31
|
+
tools: { tool1, tool2 },
|
|
32
|
+
model: 'openai/gpt-5.6-sol',
|
|
33
|
+
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
await agent.stream('Find me the weather in Tokyo.')
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
After:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { Agent } from '@mastra/core/agent'
|
|
43
|
+
import { Memory } from '@mastra/memory'
|
|
44
|
+
|
|
45
|
+
const memory = new Memory()
|
|
46
|
+
|
|
47
|
+
const agent = new Agent({
|
|
48
|
+
id: 'agent-network',
|
|
49
|
+
name: 'agent-network',
|
|
50
|
+
agents: { agent1, agent2 },
|
|
51
|
+
tools: { tool1, tool2 },
|
|
52
|
+
model: 'openai/gpt-5.6-sol',
|
|
53
|
+
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
54
|
+
memory,
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
await agent.network('Find me the weather in Tokyo.')
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If you were using the `NewAgentNetwork` primitive, you can replace the `NewAgentNetwork` with `Agent`.
|
|
61
|
+
|
|
62
|
+
Before:
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
import { NewAgentNetwork } from '@mastra/core/network/vnext'
|
|
66
|
+
|
|
67
|
+
const agent = new NewAgentNetwork({
|
|
68
|
+
id: 'agent-network',
|
|
69
|
+
name: 'agent-network',
|
|
70
|
+
agents: { agent1, agent2 },
|
|
71
|
+
workflows: { workflow1 },
|
|
72
|
+
tools: { tool1, tool2 },
|
|
73
|
+
model: 'openai/gpt-5.6-sol',
|
|
74
|
+
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
await agent.loop('Find me the weather in Tokyo.')
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
After:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
import { Agent } from '@mastra/core/agent'
|
|
84
|
+
import { Memory } from '@mastra/memory'
|
|
85
|
+
|
|
86
|
+
const memory = new Memory()
|
|
87
|
+
|
|
88
|
+
const agent = new Agent({
|
|
89
|
+
id: 'agent-network',
|
|
90
|
+
name: 'agent-network',
|
|
91
|
+
agents: { agent1, agent2 },
|
|
92
|
+
workflows: { workflow1 },
|
|
93
|
+
tools: { tool1, tool2 },
|
|
94
|
+
model: 'openai/gpt-5.6-sol',
|
|
95
|
+
instructions: 'You are a network agent that can help users with a variety of tasks.',
|
|
96
|
+
memory,
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
await agent.network('Find me the weather in Tokyo.')
|
|
100
|
+
```
|