@aigne/example-afs-memory 0.10.72 → 0.10.73-beta.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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/index.ts +6 -5
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -128,7 +128,7 @@ This example uses two complementary memory modules that work together to provide
128
128
  $ pnpm start --input "I'm Bob, and I like blue color"
129
129
  Response: Nice to meet you, Bob — I've saved that your favorite color is blue...
130
130
 
131
- # The conversation is automatically saved to /history/{uuid}
131
+ # The conversation is automatically saved to history.sqlite3
132
132
  ```
133
133
 
134
134
  ### 2. UserProfileMemory Module - User Information Extraction
@@ -139,7 +139,7 @@ Response: Nice to meet you, Bob — I've saved that your favorite color is blue.
139
139
  1. **Listens** to conversation history events
140
140
  2. **Analyzes** each conversation using AI to identify user information
141
141
  3. **Extracts** relevant details (name, interests, location, family, projects, etc.)
142
- 4. **Stores** in a structured JSON profile at `/user-profile-memory`
142
+ 4. **Stores** in a structured JSON profile in user_profile.sqlite3
143
143
  5. **Updates** incrementally using JSON Patch operations
144
144
 
145
145
  **What it remembers**:
package/index.ts CHANGED
@@ -8,11 +8,12 @@ import { AIAgent } from "@aigne/core";
8
8
 
9
9
  const aigne = await loadAIGNEWithCmdOptions();
10
10
 
11
- const sharedStorage = { url: "file:./memory.sqlite3" };
12
-
13
- const afs = new AFS()
14
- .mount(new AFSHistory({ storage: sharedStorage }))
15
- .mount(new UserProfileMemory({ storage: sharedStorage, context: aigne.newContext() }));
11
+ const afs = new AFS().mount(new AFSHistory({ storage: { url: "file:./history.sqlite3" } })).mount(
12
+ new UserProfileMemory({
13
+ storage: { url: "file:./user_profile.sqlite3" },
14
+ context: aigne.newContext(),
15
+ }),
16
+ );
16
17
 
17
18
  const agent = AIAgent.from({
18
19
  instructions: "You are a friendly chatbot",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/example-afs-memory",
3
- "version": "0.10.72",
3
+ "version": "0.10.73-beta.1",
4
4
  "description": "A demonstration of using AIGNE Framework with memory-based AFS modules",
5
5
  "author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
6
6
  "homepage": "https://github.com/AIGNE-io/aigne-framework/tree/main/examples/afs-memory",
@@ -17,14 +17,14 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "@aigne/afs": "^1.2.1",
20
- "@aigne/cli": "^1.55.2",
21
- "@aigne/afs-user-profile-memory": "^1.1.2",
22
- "@aigne/afs-history": "^1.0.2",
23
- "@aigne/core": "^1.68.2"
20
+ "@aigne/afs-history": "^1.0.3-beta.1",
21
+ "@aigne/afs-user-profile-memory": "^1.1.3-beta.1",
22
+ "@aigne/cli": "^1.55.3-beta.1",
23
+ "@aigne/core": "^1.68.3-beta.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/bun": "^1.2.22",
27
- "@aigne/test-utils": "^0.5.62"
27
+ "@aigne/test-utils": "^0.5.63-beta.1"
28
28
  },
29
29
  "scripts": {
30
30
  "start": "bun run index.ts",