@easynet/agent-memory 1.0.54 → 1.0.56

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.
Files changed (2) hide show
  1. package/README.md +28 -38
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,34 +4,12 @@
4
4
 
5
5
  `@easynet/agent-memory` provides the memory layer for agents. It manages `thread`, `cross_thread`, and `knowledge` memory and registers the memory client into the default `AgentContext`.
6
6
 
7
- ## Exposed SDK
7
+ ## Exposed Interfaces
8
8
 
9
9
  | Export | Type | Purpose |
10
10
  | --- | --- | --- |
11
- | `createAgentMemory` | function | Creates the memory client and registers it into the default `AgentContext`. |
12
- | `CreateAgentMemoryOptions` | type | Options for loading memory configuration and initializing memory. |
13
-
14
- ## Usage
15
-
16
- ```bash
17
- npm i @easynet/agent-memory
18
- ```
19
-
20
- ```ts
21
- import { createAgentMemory } from "@easynet/agent-memory";
22
-
23
- const memory = await createAgentMemory("./config/memory.yaml");
24
-
25
- await memory.memorize("user:demo", "cross_thread", "User prefers concise answers.");
26
- const result = await memory.recall({
27
- namespace: "user:demo",
28
- query: "user preference",
29
- types: ["cross_thread"],
30
- topK: 5,
31
- });
32
-
33
- console.log(result.injectedText);
34
- ```
11
+ | `createAgentMemory` | function | Create the memory service and register it into the default `AgentContext`. |
12
+ | `CreateAgentMemoryOptions` | type | Options for memory initialization. |
35
13
 
36
14
  ## Configuration
37
15
 
@@ -47,27 +25,39 @@ spec:
47
25
  thread:
48
26
  store:
49
27
  type: in_memory
50
- allowWrite: true
51
- maxItems: 20
52
-
53
28
  cross_thread:
54
29
  store:
55
30
  type: in_memory
56
- allowWrite: true
57
- maxItems: 20
58
-
59
31
  knowledge:
60
32
  store:
61
33
  type: in_memory
62
- allowWrite: true
63
- maxItems: 20
64
34
  ```
65
35
 
66
36
  Key fields:
67
37
 
68
- - `spec.memory.thread`: current conversation memory
69
- - `spec.memory.cross_thread`: long-term memory across conversations
38
+ - `spec.memory.thread`: current-thread memory
39
+ - `spec.memory.cross_thread`: shared long-term memory
70
40
  - `spec.memory.knowledge`: document and knowledge memory
71
- - `store.type`: storage backend
72
- - `allowWrite`: whether writes are allowed
73
- - `maxItems`: recall limit
41
+ - `store.type`: backend type
42
+
43
+ ## Usage
44
+
45
+ ```bash
46
+ npm i @easynet/agent-memory
47
+ ```
48
+
49
+ ```ts
50
+ import { createAgentMemory } from "@easynet/agent-memory";
51
+
52
+ const memory = await createAgentMemory("./config/memory.yaml");
53
+
54
+ await memory.memorize("user:demo", "cross_thread", "User prefers concise answers.");
55
+ const result = await memory.recall({
56
+ namespace: "user:demo",
57
+ query: "user preference",
58
+ types: ["cross_thread"],
59
+ topK: 5,
60
+ });
61
+
62
+ console.log(result.injectedText);
63
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easynet/agent-memory",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "Unified memory layer for LangChain / LangGraph / DeepAgents",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",