@mastra/memory 1.26.2 → 1.27.0-alpha.1
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 +62 -0
- package/dist/docs/SKILL.md +6 -6
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/{docs-agents-agent-approval.md → docs-agents-human-in-the-loop.md} +7 -5
- package/dist/docs/references/docs-agents-networks.md +3 -3
- package/dist/docs/references/{docs-long-running-agents-background-tasks.md → docs-harness-background-tasks.md} +5 -5
- package/dist/docs/references/{docs-long-running-agents-goals.md → docs-harness-goals.md} +6 -6
- package/dist/docs/references/docs-memory-message-history.md +1 -1
- package/dist/docs/references/docs-memory-overview.md +4 -4
- package/dist/docs/references/docs-memory-working-memory.md +1 -1
- package/dist/docs/references/{docs-storage-overview.md → docs-storage.md} +1 -1
- package/dist/docs/references/{docs-capabilities-subagents.md → docs-subagents.md} +35 -5
- package/dist/docs/references/integrations-channels-github.md +1 -1
- package/dist/docs/references/integrations-databases-postgresql.md +3 -1
- package/dist/docs/references/reference-file-based-agents-memory.md +2 -2
- package/dist/docs/references/reference-memory-observational-memory.md +4 -0
- 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/built-in-extractors.d.ts +13 -4
- package/dist/processors/observational-memory/built-in-extractors.d.ts.map +1 -1
- package/dist/processors/observational-memory/index.d.ts +1 -1
- package/dist/processors/observational-memory/index.d.ts.map +1 -1
- package/dist/processors/observational-memory/observation-turn/step.d.ts.map +1 -1
- package/dist/processors/observational-memory/observation-turn/turn.d.ts +4 -0
- package/dist/processors/observational-memory/observation-turn/turn.d.ts.map +1 -1
- package/dist/processors/observational-memory/observational-memory.d.ts +5 -1
- package/dist/processors/observational-memory/observational-memory.d.ts.map +1 -1
- package/dist/processors/observational-memory/observer-agent.d.ts +13 -0
- package/dist/processors/observational-memory/observer-agent.d.ts.map +1 -1
- package/dist/processors/observational-memory/processor.d.ts.map +1 -1
- package/dist/processors/observational-memory/reflector-agent.d.ts +1 -0
- package/dist/processors/observational-memory/reflector-agent.d.ts.map +1 -1
- package/dist/processors/observational-memory/token-counter.d.ts +1 -0
- package/dist/processors/observational-memory/token-counter.d.ts.map +1 -1
- package/dist/processors/observational-memory/types.d.ts +31 -0
- package/dist/processors/observational-memory/types.d.ts.map +1 -1
- package/dist/{src-BYD6Wp5m.js → src-BKRU-0Fx.js} +164 -64
- package/dist/{src-BYD6Wp5m.js.map → src-BKRU-0Fx.js.map} +1 -1
- package/dist/{src-b5E69E65.cjs → src-_7ADtEwc.cjs} +164 -64
- package/dist/{src-b5E69E65.cjs.map → src-_7ADtEwc.cjs.map} +1 -1
- package/dist/tools/working-memory.d.ts +3 -1
- package/dist/tools/working-memory.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,67 @@
|
|
|
1
1
|
# @mastra/memory
|
|
2
2
|
|
|
3
|
+
## 1.27.0-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Restored the Studio memory bar token counts after a reload by reading them from the stored observational memory record. ([#21604](https://github.com/mastra-ai/mastra/pull/21604))
|
|
8
|
+
|
|
9
|
+
- Fixed schema-based working memory so that `null` consistently deletes a field. Previously, a `null` only removed a field that already existed: on the very first write, or inside a nested object created for the first time, the `null` was stored literally. This mattered because strict-mode model providers pad every field they are not updating with `null`, so a first write could be saved as `{ "role": null }`. Working memory updates are also no longer stored by reference to the object passed in. ([#21687](https://github.com/mastra-ai/mastra/pull/21687))
|
|
10
|
+
|
|
11
|
+
- Fixed `MockMemory` so its working memory merge keeps parity with `@mastra/memory`: a `null` now deletes a field on the first write and inside newly created nested objects, instead of being stored literally. ([#21687](https://github.com/mastra-ai/mastra/pull/21687))
|
|
12
|
+
|
|
13
|
+
- Fixed observational memory status updates so they remain available to live clients without creating standalone messages in stored conversation history. ([#21604](https://github.com/mastra-ai/mastra/pull/21604))
|
|
14
|
+
|
|
15
|
+
- Added regression coverage for resource-scoped observational memory: context loaded from a resource's other threads is accepted on the current thread, keeps its original thread ID, and is never re-saved onto the current thread. ([#21702](https://github.com/mastra-ai/mastra/pull/21702))
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`4e7a421`](https://github.com/mastra-ai/mastra/commit/4e7a421dce8a48742f785d1e93ad2f43a572b282), [`242e324`](https://github.com/mastra-ai/mastra/commit/242e3241e73cbd5c9bb86a31ebb49ca0256488d4), [`217e967`](https://github.com/mastra-ai/mastra/commit/217e9672d8b3160eb729d8e9f0044949e88da239), [`d774e89`](https://github.com/mastra-ai/mastra/commit/d774e8930c781df8c9effe3763e6b501c099b6cc), [`9c27a53`](https://github.com/mastra-ai/mastra/commit/9c27a53cd9d3de4f3f025bc387d94ce371c33f95), [`dff25a1`](https://github.com/mastra-ai/mastra/commit/dff25a1103fa72ee082a9b6f805ebeb5ce400753), [`217e967`](https://github.com/mastra-ai/mastra/commit/217e9672d8b3160eb729d8e9f0044949e88da239), [`7f78585`](https://github.com/mastra-ai/mastra/commit/7f785857e401570e2ffb316911f126ed363aa537), [`f2a4afd`](https://github.com/mastra-ai/mastra/commit/f2a4afd7e37e809669001ed17724b341a5c1f45e), [`d438148`](https://github.com/mastra-ai/mastra/commit/d438148e222c1e2fb3c652725ce75680962ebec4), [`ba05fe0`](https://github.com/mastra-ai/mastra/commit/ba05fe0738f70cb686777546e968237d09269142), [`d26a8d4`](https://github.com/mastra-ai/mastra/commit/d26a8d4281f28414715b333c85bedaf70d0b2890), [`677cdc6`](https://github.com/mastra-ai/mastra/commit/677cdc6af564dec29a13464d12b7ab2a4efc22e9), [`a318490`](https://github.com/mastra-ai/mastra/commit/a318490e17da32f338d50929c770d901a9b3dd72), [`763e0c6`](https://github.com/mastra-ai/mastra/commit/763e0c61e04d76ad9a9efd301aa57525ca0cbea9), [`23e0be2`](https://github.com/mastra-ai/mastra/commit/23e0be261381e49534b4ff3101c60ee64a946cbf), [`7fc8806`](https://github.com/mastra-ai/mastra/commit/7fc880627d3cbf995d31ea0e8b807bf15417e651), [`0e02eac`](https://github.com/mastra-ai/mastra/commit/0e02eacdb2e30e1697a41910b41163742a181dc1), [`4df174c`](https://github.com/mastra-ai/mastra/commit/4df174c32bddf093a82f273070b8380aef7c9e90), [`f7c25b5`](https://github.com/mastra-ai/mastra/commit/f7c25b5106ddfb48e591f98df7a51e0f2dd01dba), [`dc09cc1`](https://github.com/mastra-ai/mastra/commit/dc09cc1083d861cde192c1cd235324dc75b8c731), [`36b4649`](https://github.com/mastra-ai/mastra/commit/36b4649045a3a380cbab8ceca866db4086223aff), [`377eb81`](https://github.com/mastra-ai/mastra/commit/377eb81ce43b964e3a6b541df172da74a8ff3716)]:
|
|
18
|
+
- @mastra/core@1.60.0-alpha.8
|
|
19
|
+
|
|
20
|
+
## 1.27.0-alpha.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- Added `continuationHints` to observational memory configuration, so an agent that drives its ([#20665](https://github.com/mastra-ai/mastra/pull/20665))
|
|
25
|
+
own control flow can stop memory from proposing what it says next.
|
|
26
|
+
|
|
27
|
+
`<current-task>` and `<suggested-response>` were always requested and there was no way to turn
|
|
28
|
+
them off. A `<suggested-response>` is injected into the agent's context and the continuation
|
|
29
|
+
reminder tells the agent to follow it, which makes memory a second controller competing with
|
|
30
|
+
the agent's own. Pass `false` to disable both sections, or an object to disable them
|
|
31
|
+
individually — keeping `<current-task>` while dropping `<suggested-response>` is the common
|
|
32
|
+
case.
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { Memory } from '@mastra/memory';
|
|
36
|
+
|
|
37
|
+
const memory = new Memory({
|
|
38
|
+
options: {
|
|
39
|
+
observationalMemory: {
|
|
40
|
+
observation: { continuationHints: { suggestedResponse: false } },
|
|
41
|
+
reflection: { continuationHints: false },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Disabling a section removes it fully: the Observer and Reflector no longer describe or
|
|
48
|
+
reference it, and a previously stored hint stops being injected into the agent's context once
|
|
49
|
+
both observation and reflection disable it.
|
|
50
|
+
|
|
51
|
+
Defaults are unchanged — existing configurations keep both sections enabled.
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Fixed observational memory removing Markdown link labels from the observation ([#20665](https://github.com/mastra-ai/mastra/pull/20665))
|
|
56
|
+
context given to agents. Links shared in observations previously collapsed to
|
|
57
|
+
bare, unlabelled URLs; their label text is now preserved. Semantic tags are
|
|
58
|
+
still stripped and collapsed-item markers behave as before.
|
|
59
|
+
|
|
60
|
+
- Improved observational memory step latency by reusing loaded records and token counts across repeated status checks. ([#21562](https://github.com/mastra-ai/mastra/pull/21562))
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [[`d7e6745`](https://github.com/mastra-ai/mastra/commit/d7e67456954863c55440ea9c49bc6ceb9949972d), [`9acb50f`](https://github.com/mastra-ai/mastra/commit/9acb50f71cec9c362f06820033f90ae6b1f8282f), [`46e9e3f`](https://github.com/mastra-ai/mastra/commit/46e9e3f73babe1bc70080a596cf2ac0b9da48519), [`3f9a190`](https://github.com/mastra-ai/mastra/commit/3f9a19057c027155867b9317294ee4ca7bd0581a), [`e8808e3`](https://github.com/mastra-ai/mastra/commit/e8808e3d8eb585a2565be53e56a7e0e1477352a4), [`d4be8c1`](https://github.com/mastra-ai/mastra/commit/d4be8c1739d22d621e3f78790e1dd5eb5ecc3589), [`a5d2eb1`](https://github.com/mastra-ai/mastra/commit/a5d2eb10347eade1ae2816d88f466c25186c54a5), [`e81744c`](https://github.com/mastra-ai/mastra/commit/e81744cd13c46619c142dc521dc0baac47607a84)]:
|
|
63
|
+
- @mastra/core@1.60.0-alpha.4
|
|
64
|
+
|
|
3
65
|
## 1.26.2
|
|
4
66
|
|
|
5
67
|
### 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.
|
|
6
|
+
version: "1.27.0-alpha.1"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -16,12 +16,11 @@ Read the individual reference documents for detailed explanations and code examp
|
|
|
16
16
|
|
|
17
17
|
### Docs
|
|
18
18
|
|
|
19
|
-
- [Human-in-the-loop](references/docs-agents-
|
|
19
|
+
- [Human-in-the-loop](references/docs-agents-human-in-the-loop.md) - Learn how to require approvals and suspend tool execution, plus automatically resume suspended tools while keeping humans in control of agent workflows.
|
|
20
20
|
- [Agent networks](references/docs-agents-networks.md) - Coordinate multiple agents, workflows, and tools using agent networks for complex, non-deterministic task execution.
|
|
21
|
-
- [Subagents](references/docs-capabilities-subagents.md) - Learn how to coordinate multiple agents with delegation hooks, iteration monitoring, message filtering, and task completion scoring.
|
|
22
21
|
- [Evals with memory](references/docs-evals-evals-with-memory.md) - Run scorers against memory-enabled agents, including observational memory in thread scope, using runEvals and dataset experiments.
|
|
23
|
-
- [Background tasks](references/docs-
|
|
24
|
-
- [Goals](references/docs-
|
|
22
|
+
- [Background tasks](references/docs-harness-background-tasks.md) - Learn how to dispatch long-running tool calls in the background and keep the stream open until they complete, plus orchestrate subagents asynchronously.
|
|
23
|
+
- [Goals](references/docs-harness-goals.md) - Learn how to set a durable objective on an agent that's judged in the execution loop, so the agent keeps working until the goal is complete or the run budget is exhausted.
|
|
25
24
|
- [Memory processors](references/docs-memory-memory-processors.md) - Learn how to use memory processors in Mastra to filter, trim, and transform messages before they're sent to the language model to manage context window limits.
|
|
26
25
|
- [Message history](references/docs-memory-message-history.md) - Learn how to configure message history in Mastra to store recent messages from the current conversation.
|
|
27
26
|
- [Multi-user threads](references/docs-memory-multi-user-threads.md) - Share one Mastra thread between multiple users by carrying speaker identity in the message body.
|
|
@@ -29,7 +28,8 @@ Read the individual reference documents for detailed explanations and code examp
|
|
|
29
28
|
- [Memory](references/docs-memory-overview.md) - Learn how Mastra's memory system works with working memory, message history, semantic recall, and observational memory.
|
|
30
29
|
- [Semantic recall](references/docs-memory-semantic-recall.md) - Learn how to use semantic recall in Mastra to retrieve relevant messages from past conversations using vector search and embeddings.
|
|
31
30
|
- [Working memory](references/docs-memory-working-memory.md) - Learn how to configure working memory in Mastra to store persistent user data, preferences.
|
|
32
|
-
- [Storage](references/docs-storage
|
|
31
|
+
- [Storage](references/docs-storage.md) - Configure storage for Mastra to persist runtime state across agents, workflows, observability, evals, schedules, and memory.
|
|
32
|
+
- [Subagents](references/docs-subagents.md) - Learn how to coordinate multiple agents with delegation hooks, iteration monitoring, message filtering, and task completion scoring.
|
|
33
33
|
|
|
34
34
|
### Integrations
|
|
35
35
|
|
package/dist/docs/references/{docs-agents-agent-approval.md → docs-agents-human-in-the-loop.md}
RENAMED
|
@@ -48,7 +48,7 @@ for await (const chunk of stream.fullStream) {
|
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
> **Note:** Human-in-the-loop uses snapshots to capture request state. Configure a [storage provider](https://mastra.ai/docs/storage
|
|
51
|
+
> **Note:** Human-in-the-loop uses snapshots to capture request state. Configure a [storage provider](https://mastra.ai/docs/storage) on your Mastra instance or you'll see a "snapshot not found" error.
|
|
52
52
|
>
|
|
53
53
|
> Snapshots for agent runs are minimal resume artifacts: they hold only what's needed to resume the suspended run and are deleted once the run finishes. Use [tracing](https://mastra.ai/docs/observability/overview) for the execution record and [memory](https://mastra.ai/docs/memory/overview) for the conversation history.
|
|
54
54
|
|
|
@@ -391,6 +391,8 @@ const agent = new Agent({
|
|
|
391
391
|
|
|
392
392
|
When enabled, the agent detects suspended tools from message history on the next user message. It extracts `resumeData` based on the tool's `resumeSchema`, then automatically resumes the tool.
|
|
393
393
|
|
|
394
|
+
Automatic resumption applies to data-bearing `suspend()` flows. It doesn't approve tools that use `requireApproval`; those tools remain suspended until an explicit approval or decline is submitted through `approveToolCall()`, `declineToolCall()`, `resumeStream({ approved: boolean })`, or an equivalent UI or API action.
|
|
395
|
+
|
|
394
396
|
The following example shows a complete conversational flow:
|
|
395
397
|
|
|
396
398
|
```typescript
|
|
@@ -508,11 +510,11 @@ Each returned run includes the suspended tool calls (`toolCallId`, `toolName`, `
|
|
|
508
510
|
|
|
509
511
|
The same discovery is available over HTTP as `GET /agents/:agentId/suspended-runs` and in the client SDK as [`agent.listSuspendedRuns()`](https://mastra.ai/reference/client-js/agents), so browser-based approval UIs can rediscover pending runs directly.
|
|
510
512
|
|
|
511
|
-
> **Note:** Suspended runs only survive restarts when your Mastra instance is configured with a persistent [storage provider](https://mastra.ai/docs/storage
|
|
513
|
+
> **Note:** Suspended runs only survive restarts when your Mastra instance is configured with a persistent [storage provider](https://mastra.ai/docs/storage). The default in-memory store loses snapshots when the process exits.
|
|
512
514
|
|
|
513
515
|
## Tool approval: Supervisor agents
|
|
514
516
|
|
|
515
|
-
A [supervisor agent](https://mastra.ai/docs/
|
|
517
|
+
A [supervisor agent](https://mastra.ai/docs/subagents) coordinates multiple subagents using `.stream()` or `.generate()`. When a subagent calls a tool that requires approval, the request propagates up through the delegation chain and surfaces at the supervisor level:
|
|
516
518
|
|
|
517
519
|
1. The supervisor delegates a task to a subagent.
|
|
518
520
|
2. The subagent calls a tool that has `requireApproval: true` or uses `suspend()`.
|
|
@@ -671,8 +673,8 @@ if (output.finishReason === 'suspended') {
|
|
|
671
673
|
|
|
672
674
|
## Related
|
|
673
675
|
|
|
674
|
-
- [Tools](https://mastra.ai/docs/agents/
|
|
676
|
+
- [Tools](https://mastra.ai/docs/agents/tools)
|
|
675
677
|
- [Agent overview](https://mastra.ai/docs/agents/overview)
|
|
676
|
-
- [MCP overview](https://mastra.ai/docs/mcp
|
|
678
|
+
- [MCP overview](https://mastra.ai/docs/connections/mcp)
|
|
677
679
|
- [Memory](https://mastra.ai/docs/memory/overview)
|
|
678
680
|
- [Request context](https://mastra.ai/docs/server/request-context)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Agent networks
|
|
4
4
|
|
|
5
|
-
> **Deprecated:** Agent networks are deprecated and will be removed in a future major release. [Supervisor agents](https://mastra.ai/docs/
|
|
5
|
+
> **Deprecated:** Agent networks are deprecated and will be removed in a future major release. [Supervisor agents](https://mastra.ai/docs/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
7
|
> See the [migration guide](https://mastra.ai/reference/migrations/network-to-supervisor) to upgrade.
|
|
8
8
|
|
|
@@ -95,7 +95,7 @@ console.log(final?.summary)
|
|
|
95
95
|
|
|
96
96
|
When a primitive requires approval, the stream emits an `agent-execution-approval` or `tool-execution-approval` chunk. Use `approveNetworkToolCall()` or `declineNetworkToolCall()` to respond.
|
|
97
97
|
|
|
98
|
-
Network approval uses snapshots to capture execution state. Ensure a [storage provider](https://mastra.ai/docs/storage
|
|
98
|
+
Network approval uses snapshots to capture execution state. Ensure a [storage provider](https://mastra.ai/docs/storage) is enabled in your Mastra instance.
|
|
99
99
|
|
|
100
100
|
```typescript
|
|
101
101
|
const stream = await routingAgent.network('Perform some sensitive action', {
|
|
@@ -180,5 +180,5 @@ Requirements for automatic resumption:
|
|
|
180
180
|
|
|
181
181
|
## Related
|
|
182
182
|
|
|
183
|
-
- [Supervisor agents](https://mastra.ai/docs/
|
|
183
|
+
- [Supervisor agents](https://mastra.ai/docs/subagents)
|
|
184
184
|
- [Migration: `.network()` to supervisor agents](https://mastra.ai/reference/migrations/network-to-supervisor)
|
|
@@ -16,7 +16,7 @@ Use background tasks when a tool call may take long enough that the user shouldn
|
|
|
16
16
|
|
|
17
17
|
For tool calls that return quickly, foreground execution using `agent.stream()` and `agent.generate()` is simpler.
|
|
18
18
|
|
|
19
|
-
> **Note:** Background tasks require a configured [storage](https://mastra.ai/docs/storage
|
|
19
|
+
> **Note:** Background tasks require a configured [storage](https://mastra.ai/docs/storage) backend on the Mastra instance. Tasks are persisted so they survive process restarts.
|
|
20
20
|
|
|
21
21
|
## Quickstart
|
|
22
22
|
|
|
@@ -121,7 +121,7 @@ If the agent has `backgroundTasks.disabled: true`, every tool call runs synchron
|
|
|
121
121
|
|
|
122
122
|
## Background tasks related stream chunks
|
|
123
123
|
|
|
124
|
-
When a tool call dispatches as a background task, two streams may surface lifecycle events for it: the agent's own stream and the [`backgroundTaskManager.stream()`](https://mastra.ai/docs/
|
|
124
|
+
When a tool call dispatches as a background task, two streams may surface lifecycle events for it: the agent's own stream and the [`backgroundTaskManager.stream()`](https://mastra.ai/docs/harness/background-tasks) SSE stream. Each stream covers a different set of chunk types:
|
|
125
125
|
|
|
126
126
|
| Chunk type | When it fires | Emitted by |
|
|
127
127
|
| --------------------------- | -------------------------------------------------------------------------------------- | -------------- |
|
|
@@ -376,7 +376,7 @@ These read from storage rather than the pubsub stream, so they're suitable for p
|
|
|
376
376
|
|
|
377
377
|
- [`Agent.stream()` reference](https://mastra.ai/reference/streaming/agents/stream)
|
|
378
378
|
- [backgroundTasks configuration reference](https://mastra.ai/reference/configuration)
|
|
379
|
-
- [Durable agents](https://mastra.ai/docs/
|
|
380
|
-
- [Supervisor agents](https://mastra.ai/docs/
|
|
379
|
+
- [Durable agents](https://mastra.ai/docs/harness/durable-agents)
|
|
380
|
+
- [Supervisor agents](https://mastra.ai/docs/subagents)
|
|
381
381
|
- [Stream chunk types](https://mastra.ai/reference/streaming/ChunkType)
|
|
382
|
-
- [Storage](https://mastra.ai/docs/storage
|
|
382
|
+
- [Storage](https://mastra.ai/docs/storage)
|
|
@@ -10,7 +10,7 @@ A goal is a durable, thread-scoped objective: a standing instruction the agent k
|
|
|
10
10
|
|
|
11
11
|
The objective is persisted in thread state, so it survives reloads and is evaluated in-loop, even when a new message arrives in the middle of an already-running turn.
|
|
12
12
|
|
|
13
|
-
Goals build on the same machinery as [`isTaskComplete`](https://mastra.ai/docs/
|
|
13
|
+
Goals build on the same machinery as [`isTaskComplete`](https://mastra.ai/docs/subagents): an LLM-as-judge scores the agent's output each iteration and gates the loop. The difference is that a goal is **durable** (stored in thread state, not passed per call) and is set and updated through `Agent` methods rather than per-`stream()` options.
|
|
14
14
|
|
|
15
15
|
## When to use goals
|
|
16
16
|
|
|
@@ -20,11 +20,11 @@ Use a goal when you want an agent to keep working toward a single objective acro
|
|
|
20
20
|
- Work that should continue across mid-run messages (a message delivered into a live run is still judged against the goal).
|
|
21
21
|
- An objective that must persist across thread reloads or process restarts.
|
|
22
22
|
|
|
23
|
-
For a one-off completion check within a single `stream()` call, use [`isTaskComplete`](https://mastra.ai/docs/
|
|
23
|
+
For a one-off completion check within a single `stream()` call, use [`isTaskComplete`](https://mastra.ai/docs/subagents) instead.
|
|
24
24
|
|
|
25
25
|
## Quickstart
|
|
26
26
|
|
|
27
|
-
Goals require a configured [storage](https://mastra.ai/docs/storage
|
|
27
|
+
Goals require a configured [storage](https://mastra.ai/docs/storage) backend and a memory-backed thread. Add a `goal` config to the agent, a judge model is required for the goal to do anything, then set an objective for a thread:
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
30
|
import { Agent } from '@mastra/core/agent'
|
|
@@ -113,7 +113,7 @@ Per-objective values written by `setObjective` / `updateObjectiveOptions` take p
|
|
|
113
113
|
|
|
114
114
|
## Related
|
|
115
115
|
|
|
116
|
-
- [Supervisor agents](https://mastra.ai/docs/
|
|
117
|
-
- [Signal providers](https://mastra.ai/docs/
|
|
118
|
-
- [Memory storage](https://mastra.ai/docs/storage
|
|
116
|
+
- [Supervisor agents](https://mastra.ai/docs/subagents): `isTaskComplete` and the rubric scorer
|
|
117
|
+
- [Signal providers](https://mastra.ai/docs/harness/signal-providers): How the objective is projected into context
|
|
118
|
+
- [Memory storage](https://mastra.ai/docs/storage): The storage backend goals require
|
|
119
119
|
- [Mastra Factory](https://factory.mastra.ai) and [Mastra Code](https://code.mastra.ai): Examples of goal-driven coding agents
|
|
@@ -25,7 +25,7 @@ Studio automatically generates a thread and resource ID for you. When calling `s
|
|
|
25
25
|
|
|
26
26
|
## Getting started
|
|
27
27
|
|
|
28
|
-
Install the Mastra memory module along with a [storage adapter](https://mastra.ai/docs/storage
|
|
28
|
+
Install the Mastra memory module along with a [storage adapter](https://mastra.ai/docs/storage) for your database. The examples below use `@mastra/libsql`, which stores data locally in a `mastra.db` file.
|
|
29
29
|
|
|
30
30
|
**npm**:
|
|
31
31
|
|
|
@@ -13,7 +13,7 @@ Mastra agents can be configured to store [message history](https://mastra.ai/doc
|
|
|
13
13
|
|
|
14
14
|
If the combined memory exceeds the model's context limit, [memory processors](https://mastra.ai/docs/memory/memory-processors) can filter, trim, or prioritize content so the most relevant information is preserved.
|
|
15
15
|
|
|
16
|
-
Memory results will be stored in one or more of your configured [storage providers](https://mastra.ai/docs/storage
|
|
16
|
+
Memory results will be stored in one or more of your configured [storage providers](https://mastra.ai/docs/storage).
|
|
17
17
|
|
|
18
18
|
> **📹 Watch:** Watch [Mastra memory concepts](https://www.youtube.com/watch?v=18iIHQtIPmc) for a conceptual overview of the memory layers agents can use.
|
|
19
19
|
|
|
@@ -77,7 +77,7 @@ Use memory when your agent needs to maintain multi-turn conversations that refer
|
|
|
77
77
|
bun add @mastra/libsql@latest
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
For more details on available providers and how storage works in Mastra, visit the [storage](https://mastra.ai/docs/storage
|
|
80
|
+
For more details on available providers and how storage works in Mastra, visit the [storage](https://mastra.ai/docs/storage) documentation.
|
|
81
81
|
|
|
82
82
|
3. Add the storage provider to your main Mastra instance to enable memory across all configured agents.
|
|
83
83
|
|
|
@@ -188,7 +188,7 @@ Conversation messages are ordered by timestamp and deduplicated by message ID, s
|
|
|
188
188
|
|
|
189
189
|
## Memory in multi-agent systems
|
|
190
190
|
|
|
191
|
-
When a [supervisor agent](https://mastra.ai/docs/
|
|
191
|
+
When a [supervisor agent](https://mastra.ai/docs/subagents) delegates to a subagent, Mastra isolates subagent memory automatically. No flag enables this as it happens on every delegation. Understanding how this scoping works lets you decide what stays private and what to share intentionally.
|
|
192
192
|
|
|
193
193
|
### How delegation scopes memory
|
|
194
194
|
|
|
@@ -200,7 +200,7 @@ Each delegation creates a fresh `threadId` and a deterministic `resourceId` for
|
|
|
200
200
|
|
|
201
201
|
> **Note:** Title generation (`generateTitle`) is a top-level thread concern and **isn't** applied to inherited subagent threads. Because each delegation creates an ephemeral thread that no one sees, running title generation for it would waste an LLM call per delegation. To generate titles for a subagent's own threads, give that subagent its own memory configuration.
|
|
202
202
|
|
|
203
|
-
The supervisor forwards its conversation context to the subagent so it has enough background to complete the task. Only the delegation prompt and the subagent's response are saved, the full parent conversation isn't stored. You can control which messages reach the subagent with the [`messageFilter`](https://mastra.ai/docs/
|
|
203
|
+
The supervisor forwards its conversation context to the subagent so it has enough background to complete the task. Only the delegation prompt and the subagent's response are saved, the full parent conversation isn't stored. You can control which messages reach the subagent with the [`messageFilter`](https://mastra.ai/docs/subagents) callback.
|
|
204
204
|
|
|
205
205
|
> **Note:** Subagent resource IDs are always suffixed with the agent name (`{parentResourceId}-{agentName}`). Different subagents under the same supervisor never share a resource ID through delegation.
|
|
206
206
|
|
|
@@ -400,7 +400,7 @@ const response = await agent.generate('What do you know about me?', {
|
|
|
400
400
|
|
|
401
401
|
## Opt in to state signals (experimental)
|
|
402
402
|
|
|
403
|
-
By default, working memory reaches the model as part of the system message. You can opt into delivering it as a [state signal](https://mastra.ai/docs/
|
|
403
|
+
By default, working memory reaches the model as part of the system message. You can opt into delivering it as a [state signal](https://mastra.ai/docs/harness/signals) instead by setting `useStateSignals: true`:
|
|
404
404
|
|
|
405
405
|
```typescript
|
|
406
406
|
const memory = new Memory({
|
|
@@ -10,7 +10,7 @@ Storage powers:
|
|
|
10
10
|
- [Workflows](https://mastra.ai/docs/workflows/overview): Durable snapshots for suspended and resumed workflow runs.
|
|
11
11
|
- [Observability](https://mastra.ai/docs/observability/overview): Traces, spans, metrics, logs, and feedback.
|
|
12
12
|
- [Evals](https://mastra.ai/docs/evals/overview): Scores, datasets, experiments, and evaluation results.
|
|
13
|
-
- [Long-running agents](https://mastra.ai/docs/
|
|
13
|
+
- [Long-running agents](https://mastra.ai/docs/harness/durable-agents): Background tasks, schedules, goals, and thread state.
|
|
14
14
|
|
|
15
15
|
## When to configure storage
|
|
16
16
|
|
|
@@ -166,6 +166,36 @@ The `context` object includes:
|
|
|
166
166
|
| `error` | Error if the delegation failed |
|
|
167
167
|
| `bail()` | Function to stop the parent agent's loop |
|
|
168
168
|
|
|
169
|
+
### Hook errors
|
|
170
|
+
|
|
171
|
+
If a delegation hook throws, the delegation continues by default: `onDelegationStart` proceeds with the original prompt, `messageFilter` falls back to the unfiltered context, and `onDelegationComplete` keeps the subagent's original result. Set `hookErrorStrategy: 'throw'` to fail the delegation instead.
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
const stream = await parentAgent.stream('Research AI trends', {
|
|
175
|
+
maxSteps: 10,
|
|
176
|
+
delegation: {
|
|
177
|
+
hookErrorStrategy: 'throw',
|
|
178
|
+
onDelegationComplete: async ({ result }) => {
|
|
179
|
+
// If this throws, the parent sees a failed delegation instead of a
|
|
180
|
+
// successful one whose result was silently dropped.
|
|
181
|
+
await reportToAnalytics(result)
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
})
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Either way, every hook failure is recorded on the run's request context under `__mastra_delegationHookErrors` as a list of `{ hook, primitiveId, toolCallId, runId, name, message }` entries, so you can detect a hook failure programmatically:
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
const requestContext = new RequestContext()
|
|
191
|
+
|
|
192
|
+
await parentAgent.generate('Research AI trends', { maxSteps: 10, requestContext })
|
|
193
|
+
|
|
194
|
+
const hookErrors = requestContext.get('__mastra_delegationHookErrors') ?? []
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
When `hookErrorStrategy` is `'throw'`, a throwing `onDelegationStart` blocks the subagent from running at all, and a throwing `messageFilter` or `onDelegationComplete` surfaces to the parent as a failed tool call. If `onDelegationComplete` throws while handling a failed delegation, the original delegation error is still what surfaces, and the hook is never re-invoked for its own failure.
|
|
198
|
+
|
|
169
199
|
## Message filtering
|
|
170
200
|
|
|
171
201
|
By default, subagents receive the full conversation context from the parent agent. Use `messageFilter` to control what messages are shared, for example, to remove sensitive data or limit context size.
|
|
@@ -399,7 +429,7 @@ Success criteria:
|
|
|
399
429
|
|
|
400
430
|
## Running subagents in the background
|
|
401
431
|
|
|
402
|
-
Subagent invocations are dispatched as tool calls, so they can run as [background tasks](https://mastra.ai/docs/
|
|
432
|
+
Subagent invocations are dispatched as tool calls, so they can run as [background tasks](https://mastra.ai/docs/harness/background-tasks). This is useful when one or more delegations are long-running and you don't want them to block the parent agent's response.
|
|
403
433
|
|
|
404
434
|
Enable the [backgroundTasks manager](https://mastra.ai/reference/configuration) on the Mastra instance, then opt subagents in on the parent agent:
|
|
405
435
|
|
|
@@ -424,11 +454,11 @@ const stream = await parentAgent.streamUntilIdle('Research AI in education and w
|
|
|
424
454
|
|
|
425
455
|
Use [`streamUntilIdle()`](https://mastra.ai/reference/streaming/agents/streamUntilIdle) instead of `stream()` so the stream stays open until the subagents complete and the parent agent has had a chance to respond to their results.
|
|
426
456
|
|
|
427
|
-
If a subagent isn't listed under the parent agent's `backgroundTasks.tools` but has its own background-eligible tools, the parent agent still dispatches the subagent as a background task and inherits its config. See [Inheriting from the subagent](https://mastra.ai/docs/
|
|
457
|
+
If a subagent isn't listed under the parent agent's `backgroundTasks.tools` but has its own background-eligible tools, the parent agent still dispatches the subagent as a background task and inherits its config. See [Inheriting from the subagent](https://mastra.ai/docs/harness/background-tasks) for details.
|
|
428
458
|
|
|
429
459
|
## Subagent versioning
|
|
430
460
|
|
|
431
|
-
When using the [editor](https://mastra.ai/docs/editor
|
|
461
|
+
When using the [editor](https://mastra.ai/docs/studio/editor), you can control which stored version of each subagent the parent agent uses at runtime. Set version overrides on the Mastra instance or per invocation:
|
|
432
462
|
|
|
433
463
|
```typescript
|
|
434
464
|
const result = await parentAgent.generate('Research and write about AI safety', {
|
|
@@ -445,13 +475,13 @@ Version overrides propagate automatically through delegation. See [Subagent vers
|
|
|
445
475
|
|
|
446
476
|
## Related
|
|
447
477
|
|
|
448
|
-
- [Background tasks](https://mastra.ai/docs/
|
|
478
|
+
- [Background tasks](https://mastra.ai/docs/harness/background-tasks)
|
|
449
479
|
- [Subagent versioning](https://mastra.ai/reference/editor/versioning)
|
|
450
480
|
- [Guide: Research coordinator](https://mastra.ai/blog/build-a-research-coordinator-with-supervisor-agents)
|
|
451
481
|
- [Agent.stream() reference](https://mastra.ai/reference/streaming/agents/stream)
|
|
452
482
|
- [Agent.streamUntilIdle() reference](https://mastra.ai/reference/streaming/agents/streamUntilIdle)
|
|
453
483
|
- [Agent.generate() reference](https://mastra.ai/reference/agents/generate)
|
|
454
|
-
- [Agent approval](https://mastra.ai/docs/agents/
|
|
484
|
+
- [Agent approval](https://mastra.ai/docs/agents/human-in-the-loop)
|
|
455
485
|
- [Memory in multi-agent systems](https://mastra.ai/docs/memory/overview)
|
|
456
486
|
- [Concept: Multi-agent systems](https://mastra.ai/docs/guides/multi-agent-systems)
|
|
457
487
|
- 📹 [Mastra supervisor agents workshop](https://www.youtube.com/watch?v=FNb2fL9WhQg\&t=1872s)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# GitHub
|
|
4
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/
|
|
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/harness/signals) to the agent thread when relevant activity occurs.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -407,8 +407,10 @@ PostgreSQL storage creates composite indexes during initialization for common qu
|
|
|
407
407
|
- `mastra_ai_spans_name_startedat_idx`: (name, startedAt DESC)
|
|
408
408
|
- `mastra_ai_spans_scope_startedat_idx`: (scope, startedAt DESC)
|
|
409
409
|
- `mastra_scores_trace_id_span_id_created_at_idx`: (traceId, spanId, createdAt DESC)
|
|
410
|
+
- `mastra_workflow_snapshot_name_createdat_idx`: (workflow\_name, createdAt DESC)
|
|
411
|
+
- `mastra_workflow_snapshot_name_status_createdat_idx`: (workflow\_name, snapshot->>'status', createdAt DESC), created only when the `snapshot` column is `jsonb`
|
|
410
412
|
|
|
411
|
-
These indexes improve performance for filtered queries with sorting, including `dateRange` filters on message queries.
|
|
413
|
+
These indexes improve performance for filtered queries with sorting, including `dateRange` filters on message queries and Studio's workflow runs-list.
|
|
412
414
|
|
|
413
415
|
### Configuring Indexes
|
|
414
416
|
|
|
@@ -18,7 +18,7 @@ import { Memory } from '@mastra/memory'
|
|
|
18
18
|
export default new Memory()
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
The exported instance becomes the agent's `memory`. If your app configures a storage provider on the main Mastra instance, memory data is stored there. See [storage](https://mastra.ai/docs/storage
|
|
21
|
+
The exported instance becomes the agent's `memory`. If your app configures a storage provider on the main Mastra instance, memory data is stored there. See [storage](https://mastra.ai/docs/storage) for more information.
|
|
22
22
|
|
|
23
23
|
Use the same `resource` and `thread` values when calling the agent to continue a conversation:
|
|
24
24
|
|
|
@@ -51,7 +51,7 @@ export default new Memory({
|
|
|
51
51
|
|
|
52
52
|
Visit the [`Memory` reference](https://mastra.ai/reference/memory/memory-class) for constructor options. Use these pages for related memory features:
|
|
53
53
|
|
|
54
|
-
- [Storage](https://mastra.ai/docs/storage
|
|
54
|
+
- [Storage](https://mastra.ai/docs/storage): configure persistence for memory data.
|
|
55
55
|
- [Semantic recall](https://mastra.ai/docs/memory/semantic-recall): retrieve relevant past messages by semantic meaning.
|
|
56
56
|
- [Memory processors](https://mastra.ai/docs/memory/memory-processors): filter, trim, or transform messages before memory adds them to model context.
|
|
57
57
|
|
|
@@ -57,6 +57,8 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
|
|
|
57
57
|
|
|
58
58
|
**observation.instruction** (`string`): Custom instruction appended to the Observer's system prompt. Use this to customize what the Observer focuses on, such as domain-specific preferences or priorities.
|
|
59
59
|
|
|
60
|
+
**observation.continuationHints** (`boolean | { currentTask?: boolean; suggestedResponse?: boolean }`): Which continuation-hint sections the Observer emits. Pass false to disable both, or an object to disable them individually. Agents that drive their own control flow generally want { suggestedResponse: false } so memory does not compete for what the agent says next. A previously stored hint stops being injected into context once both observation and reflection disable its section.
|
|
61
|
+
|
|
60
62
|
**observation.threadTitle** (`boolean`): When true, the Observer suggests short thread titles and updates the thread title when the conversation topic meaningfully changes. This is opt-in and defaults to disabled.
|
|
61
63
|
|
|
62
64
|
**observation.extract** (`Extractor[]`): Custom values to extract after observation. Schema-less extractors are requested inline in the Observer output. Schema-backed extractors run as a follow-up structured output call and are stored in thread OM metadata.
|
|
@@ -97,6 +99,8 @@ OM performs thresholding with fast local token estimation. Text uses `tokenx`, a
|
|
|
97
99
|
|
|
98
100
|
**reflection.instruction** (`string`): Custom instruction appended to the Reflector's system prompt. Use this to customize how the Reflector consolidates observations, such as prioritizing certain types of information.
|
|
99
101
|
|
|
102
|
+
**reflection.continuationHints** (`boolean | { currentTask?: boolean; suggestedResponse?: boolean }`): Which continuation-hint sections the Reflector emits. Pass false to disable both, or an object to disable them individually. A previously stored hint stops being injected into context once both observation and reflection disable its section.
|
|
103
|
+
|
|
100
104
|
**reflection.extract** (`Extractor[]`): Custom values to extract after reflection. Schema-less extractors are requested inline in the Reflector output. Schema-backed extractors run as a follow-up structured output call and are stored in thread OM metadata.
|
|
101
105
|
|
|
102
106
|
**reflection.observationTokens** (`number`): Token count of observations that triggers reflection. When observation tokens exceed this threshold, the Reflector agent is called to condense them.
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-_7ADtEwc.cjs");
|
|
3
3
|
let _mastra_core_processors = require("@mastra/core/processors");
|
|
4
4
|
exports.Extractor = require_src.Extractor;
|
|
5
5
|
exports.Memory = require_src.Memory;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as WorkingMemoryExtractor, R as Extractor, S as deepMergeWorkingMemory, T as summarizeConversation, a as extractWorkingMemoryContent, c as WORKING_MEMORY_STATE_ID, d as getObservationsAsOf, i as WorkingMemory, l as WORKING_MEMORY_STATE_PROCESSOR_ID, n as MessageHistory, o as extractWorkingMemoryTags, r as SemanticRecall, s as removeWorkingMemoryTags, t as Memory, u as WorkingMemoryStateProcessor, w as SUMMARIZE_THREAD_DEFAULTS, x as ModelByInputTokens } from "./src-
|
|
1
|
+
import { C as WorkingMemoryExtractor, R as Extractor, S as deepMergeWorkingMemory, T as summarizeConversation, a as extractWorkingMemoryContent, c as WORKING_MEMORY_STATE_ID, d as getObservationsAsOf, i as WorkingMemory, l as WORKING_MEMORY_STATE_PROCESSOR_ID, n as MessageHistory, o as extractWorkingMemoryTags, r as SemanticRecall, s as removeWorkingMemoryTags, t as Memory, u as WorkingMemoryStateProcessor, w as SUMMARIZE_THREAD_DEFAULTS, x as ModelByInputTokens } from "./src-BKRU-0Fx.js";
|
|
2
2
|
export { Extractor, Memory, MessageHistory, ModelByInputTokens, SUMMARIZE_THREAD_DEFAULTS, SemanticRecall, WORKING_MEMORY_STATE_ID, WORKING_MEMORY_STATE_PROCESSOR_ID, WorkingMemory, WorkingMemoryExtractor, WorkingMemoryStateProcessor, deepMergeWorkingMemory, extractWorkingMemoryContent, extractWorkingMemoryTags, getObservationsAsOf, removeWorkingMemoryTags, summarizeConversation };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("../src-
|
|
2
|
+
const require_src = require("../src-_7ADtEwc.cjs");
|
|
3
3
|
exports.Extractor = require_src.Extractor;
|
|
4
4
|
exports.ModelByInputTokens = require_src.ModelByInputTokens;
|
|
5
5
|
exports.OBSERVATIONAL_MEMORY_DEFAULTS = require_src.OBSERVATIONAL_MEMORY_DEFAULTS;
|
package/dist/processors/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as extractCurrentTask, B as OBSERVATION_CONTEXT_INSTRUCTIONS, C as WorkingMemoryExtractor, D as OBSERVER_SYSTEM_PROMPT, E as TokenCounter, F as injectAnchorIds, H as OBSERVATION_CONTINUATION_HINT, I as parseAnchorId, L as stripEphemeralAnchorIds, M as hasCurrentTaskSection, N as optimizeObservationsForContext, O as buildObserverPrompt, P as parseObserverOutput, R as Extractor, T as summarizeConversation, V as OBSERVATION_CONTEXT_PROMPT, _ as reconcileObservationGroupsFromReflection, b as wrapInObservationGroup, d as getObservationsAsOf, f as ObservationalMemoryProcessor, g as parseObservationGroups, h as deriveObservationGroupProvenance, j as formatMessagesForObserver, k as buildObserverSystemPrompt, m as combineObservationGroupRanges, p as ObservationalMemory, v as renderObservationGroupsForReflection, x as ModelByInputTokens, y as stripObservationGroups, z as OBSERVATIONAL_MEMORY_DEFAULTS } from "../src-
|
|
1
|
+
import { A as extractCurrentTask, B as OBSERVATION_CONTEXT_INSTRUCTIONS, C as WorkingMemoryExtractor, D as OBSERVER_SYSTEM_PROMPT, E as TokenCounter, F as injectAnchorIds, H as OBSERVATION_CONTINUATION_HINT, I as parseAnchorId, L as stripEphemeralAnchorIds, M as hasCurrentTaskSection, N as optimizeObservationsForContext, O as buildObserverPrompt, P as parseObserverOutput, R as Extractor, T as summarizeConversation, V as OBSERVATION_CONTEXT_PROMPT, _ as reconcileObservationGroupsFromReflection, b as wrapInObservationGroup, d as getObservationsAsOf, f as ObservationalMemoryProcessor, g as parseObservationGroups, h as deriveObservationGroupProvenance, j as formatMessagesForObserver, k as buildObserverSystemPrompt, m as combineObservationGroupRanges, p as ObservationalMemory, v as renderObservationGroupsForReflection, x as ModelByInputTokens, y as stripObservationGroups, z as OBSERVATIONAL_MEMORY_DEFAULTS } from "../src-BKRU-0Fx.js";
|
|
2
2
|
export { Extractor, ModelByInputTokens, OBSERVATIONAL_MEMORY_DEFAULTS, OBSERVATION_CONTEXT_INSTRUCTIONS, OBSERVATION_CONTEXT_PROMPT, OBSERVATION_CONTINUATION_HINT, OBSERVER_SYSTEM_PROMPT, ObservationalMemory, ObservationalMemoryProcessor, TokenCounter, WorkingMemoryExtractor, buildObserverPrompt, buildObserverSystemPrompt, combineObservationGroupRanges, deriveObservationGroupProvenance, extractCurrentTask, formatMessagesForObserver, getObservationsAsOf, hasCurrentTaskSection, injectAnchorIds, optimizeObservationsForContext, parseAnchorId, parseObservationGroups, parseObserverOutput, reconcileObservationGroupsFromReflection, renderObservationGroupsForReflection, stripEphemeralAnchorIds, stripObservationGroups, summarizeConversation, wrapInObservationGroup };
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { Extractor } from './extractor.js';
|
|
2
|
-
import type { ObservationConfig, ReflectionConfig, ResolvedObservationConfig } from './types.js';
|
|
2
|
+
import type { ContinuationHintsConfig, ObservationConfig, ReflectionConfig, ResolvedObservationConfig } from './types.js';
|
|
3
3
|
export declare function createCurrentTaskExtractor(): Extractor<string>;
|
|
4
4
|
export declare function createSuggestedResponseExtractor(): Extractor<string>;
|
|
5
5
|
export declare function createThreadTitleExtractor(): Extractor<string>;
|
|
6
|
+
export interface ResolvedContinuationHints {
|
|
7
|
+
currentTask: boolean;
|
|
8
|
+
suggestedResponse: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Normalize the user-facing `continuationHints` config into explicit per-section flags.
|
|
12
|
+
* Both sections stay enabled unless the caller opts out, so omitting the config is a no-op.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveContinuationHints(config: ContinuationHintsConfig | undefined): ResolvedContinuationHints;
|
|
6
15
|
interface ComposeExtractorOptions {
|
|
7
|
-
|
|
16
|
+
continuationHints?: ContinuationHintsConfig;
|
|
8
17
|
includeThreadTitle?: boolean;
|
|
9
18
|
userExtractors?: readonly Extractor<any>[];
|
|
10
19
|
}
|
|
11
20
|
export declare function composeExtractors(options: ComposeExtractorOptions): Extractor<any>[];
|
|
12
|
-
export declare function composeObservationExtractors(config: Pick<ResolvedObservationConfig, 'threadTitle'> & Pick<ObservationConfig, 'extract'>): Extractor[];
|
|
13
|
-
export declare function composeReflectionExtractors(config: Pick<ReflectionConfig, 'extract'>): Extractor[];
|
|
21
|
+
export declare function composeObservationExtractors(config: Pick<ResolvedObservationConfig, 'threadTitle'> & Pick<ObservationConfig, 'extract' | 'continuationHints'>): Extractor[];
|
|
22
|
+
export declare function composeReflectionExtractors(config: Pick<ReflectionConfig, 'extract' | 'continuationHints'>): Extractor[];
|
|
14
23
|
export {};
|
|
15
24
|
//# sourceMappingURL=built-in-extractors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in-extractors.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/built-in-extractors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAyB,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"built-in-extractors.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/built-in-extractors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAyB,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAmBvH,wBAAgB,0BAA0B,IAAI,SAAS,CAAC,MAAM,CAAC,CAU9D;AAED,wBAAgB,gCAAgC,IAAI,SAAS,CAAC,MAAM,CAAC,CAUpE;AAED,wBAAgB,0BAA0B,IAAI,SAAS,CAAC,MAAM,CAAC,CAU9D;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,uBAAuB,GAAG,SAAS,GAAG,yBAAyB,CAW/G;AAED,UAAU,uBAAuB;IAC/B,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAC5C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,SAAS,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;CAC5C;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,uBAAuB,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE,CAcpF;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,IAAI,CAAC,yBAAyB,EAAE,aAAa,CAAC,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,mBAAmB,CAAC,GAChH,SAAS,EAAE,CAMb;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,mBAAmB,CAAC,GAC9D,SAAS,EAAE,CAKb"}
|
|
@@ -21,7 +21,7 @@ export type { ExtractorConfig, ExtractorOnExtractedContext, ExtractorRuntimeCont
|
|
|
21
21
|
export { WorkingMemoryExtractor } from './working-memory-extractor.js';
|
|
22
22
|
export { summarizeConversation } from './summarize.js';
|
|
23
23
|
export type { SummarizeConversationOptions, SummarizeConversationResult, SummarizeModel } from './summarize.js';
|
|
24
|
-
export type { ObservationalMemoryConfig, ObservationDebugEvent, ObserveHooks, ObserveHookContext, ObserveHookUsage, ObserveTrigger, ObservationConfig, ReflectionConfig, ObserverResult, ReflectorResult, ObservationMarkerConfig, DataOmObservationStartPart, DataOmObservationEndPart, DataOmObservationFailedPart, DataOmStatusPart, DataOmThreadUpdatePart, DataOmObservationPart, DataOmBufferingStartPart, DataOmBufferingEndPart, DataOmBufferingFailedPart, DataOmBufferingPart, DataOmActivationPart, DataOmPart, } from './types.js';
|
|
24
|
+
export type { ObservationalMemoryConfig, ObservationDebugEvent, ObserveHooks, ObserveHookContext, ObserveHookUsage, ObserveTrigger, ObservationConfig, ReflectionConfig, ContinuationHintsConfig, ObserverResult, ReflectorResult, ObservationMarkerConfig, DataOmObservationStartPart, DataOmObservationEndPart, DataOmObservationFailedPart, DataOmStatusPart, DataOmThreadUpdatePart, DataOmObservationPart, DataOmBufferingStartPart, DataOmBufferingEndPart, DataOmBufferingFailedPart, DataOmBufferingPart, DataOmActivationPart, DataOmPart, } from './types.js';
|
|
25
25
|
export { OBSERVER_SYSTEM_PROMPT, buildObserverSystemPrompt, buildObserverPrompt, parseObserverOutput, optimizeObservationsForContext, formatMessagesForObserver, hasCurrentTaskSection, extractCurrentTask, type ObserverResult as ObserverAgentResult, } from './observer-agent.js';
|
|
26
26
|
export type { ObservationalMemoryRecord, ObservationalMemoryScope, ObservationalMemoryOriginType, CreateObservationalMemoryInput, UpdateActiveObservationsInput, UpdateBufferedObservationsInput, CreateReflectionGenerationInput, } from '@mastra/core/storage';
|
|
27
27
|
export { TokenCounter } from './token-counter.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,YAAY,EAAE,qBAAqB,EAAE,M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EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,oCAAoC,EACpC,wCAAwC,EACxC,gCAAgC,EAChC,6BAA6B,EAC7B,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processors/observational-memory/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,EAAE,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EACV,eAAe,EACf,2BAA2B,EAC3B,uBAAuB,EACvB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,YAAY,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7G,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,eAAe,EAEf,uBAAuB,EAEvB,0BAA0B,EAC1B,wBAAwB,EACxB,2BAA2B,EAC3B,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EAErB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EAEnB,oBAAoB,EACpB,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,8BAA8B,EAC9B,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,cAAc,IAAI,mBAAmB,GAC3C,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,oCAAoC,EACpC,wCAAwC,EACxC,gCAAgC,EAChC,6BAA6B,EAC7B,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-turn/step.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;GAMG;AACH,qBAAa,eAAe;IAWxB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAX7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAc;IAC/B;;;;OAIG;IACH,OAAO,CAAC,qBAAqB,CAAS;gBAGnB,IAAI,EAAE,eAAe,EAC7B,UAAU,EAAE,MAAM;IAG7B,2CAA2C;IAC3C,IAAI,QAAQ,YAEX;IAED;;;;;;;;OAQG;IACH,MAAM;;;;IAIN,2EAA2E;IAC3E,IAAI,OAAO,IAAI,WAAW,CAGzB;IAED;;;;;;OAMG;IACG,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-turn/step.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;GAMG;AACH,qBAAa,eAAe;IAWxB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,QAAQ,CAAC,UAAU,EAAE,MAAM;IAX7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAc;IAC/B;;;;OAIG;IACH,OAAO,CAAC,qBAAqB,CAAS;gBAGnB,IAAI,EAAE,eAAe,EAC7B,UAAU,EAAE,MAAM;IAG7B,2CAA2C;IAC3C,IAAI,QAAQ,YAEX;IAED;;;;;;;;OAQG;IACH,MAAM;;;;IAIN,2EAA2E;IAC3E,IAAI,OAAO,IAAI,WAAW,CAGzB;IAED;;;;;;OAMG;IACG,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC;IAwTrC;;;;OAIG;YACW,uBAAuB;CA4ItC"}
|
|
@@ -86,6 +86,10 @@ export declare class ObservationTurn {
|
|
|
86
86
|
* them to the MessageList. Without a provider, only fetches/caches the record.
|
|
87
87
|
*/
|
|
88
88
|
start(memory?: MemoryContextProvider): Promise<TurnContext>;
|
|
89
|
+
/** Replace the cached turn record with a specific instance. */
|
|
90
|
+
setRecord(record: ObservationalMemoryRecord): void;
|
|
91
|
+
/** Patch the cached turn record with merged fields. */
|
|
92
|
+
patchRecord(patch: Partial<ObservationalMemoryRecord>): void;
|
|
89
93
|
/**
|
|
90
94
|
* Create a step handle. If a previous step exists, it is finalized
|
|
91
95
|
* (its output messages will be saved at the start of the new step's prepare()).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-turn/turn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAItE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,OAAO,CAAC,CAA4B;IAC5C,OAAO,CAAC,QAAQ,CAAC,CAAc;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAkB;IACvC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;IAEvB,8FAA8F;IAC9F,OAAO,CAAC,uBAAuB,CAAM;IAErC,6FAA6F;IAC7F,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAE/B,mDAAmD;IACnD,MAAM,CAA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C;IACzC,IAAI,OAAO,IAAI,WAAW,CAGzB;IAED,uCAAuC;IACvC,IAAI,WAAW,IAAI,eAAe,GAAG,SAAS,CAE7C;IAED,QAAQ,CAAC,KAAK,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAK5C;;;;;OAKG;IACG,KAAK,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,WAAW,CAAC;IAoCjE;;;OAGG;IACH,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe;IAQzC;;;;;;;OAOG;IACG,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;IA6ChC;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC;;;OAGG;IACG,0BAA0B,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAW/D;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM;;;;;;;CASP"}
|
|
1
|
+
{"version":3,"file":"turn.d.ts","sourceRoot":"","sources":["../../../../src/processors/observational-memory/observation-turn/turn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAItE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,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