@aigne/example-afs-memory 0.10.78-beta → 0.10.78-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +41 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -43,6 +43,47 @@ npx -y @aigne/example-afs-memory --input "Tell me all info about me you known"
43
43
  npx -y @aigne/example-afs-memory --chat
44
44
  ```
45
45
 
46
+ ### Connect to an AI Model
47
+
48
+ As an example, running `npx -y @aigne/example-afs-memory --input "I'm Bob, and I like blue color"` requires an AI model. If this is your first run, you need to connect one.
49
+
50
+ ![run example](./run-example.png)
51
+
52
+ - Connect via the official AIGNE Hub
53
+
54
+ Choose the first option and your browser will open the official AIGNE Hub page. Follow the prompts to complete the connection. If you're a new user, the system automatically grants 400,000 tokens for you to use.
55
+
56
+ ![connect to official aigne hub](../images/connect-to-aigne-hub.png)
57
+
58
+ - Connect via a self-hosted AIGNE Hub
59
+
60
+ Choose the second option, enter the URL of your self-hosted AIGNE Hub, and follow the prompts to complete the connection. If you need to set up a self-hosted AIGNE Hub, visit the Blocklet Store to install and deploy it: [Blocklet Store](https://store.blocklet.dev/blocklets/z8ia3xzq2tMq8CRHfaXj1BTYJyYnEcHbqP8cJ?utm_source=www.arcblock.io&utm_medium=blog_link&utm_campaign=default&utm_content=store.blocklet.dev#:~:text=%F0%9F%9A%80%20Get%20Started%20in%20Minutes).
61
+
62
+ ![connect to self hosted aigne hub](../images/connect-to-self-hosted-aigne-hub.png)
63
+
64
+ - Connect via a third-party model provider
65
+
66
+ Using OpenAI as an example, you can configure the provider's API key via environment variables. After configuration, run the example again:
67
+
68
+ ```bash
69
+ export OPENAI_API_KEY="" # Set your OpenAI API key here
70
+ ```
71
+ For more details on third-party model configuration (e.g., OpenAI, DeepSeek, Google Gemini), see [.env.local.example](./.env.local.example).
72
+
73
+ After configuration, run the example again.
74
+
75
+ ### Debugging
76
+
77
+ The `aigne observe` command starts a local web server to monitor and analyze agent execution data. It provides a user-friendly interface to inspect traces, view detailed call information, and understand your agent’s behavior during runtime. This tool is essential for debugging, performance tuning, and gaining insight into how your agent processes information and interacts with tools and models.
78
+
79
+ Start the observation server.
80
+
81
+ ![aigne-observe-execute](../images/aigne-observe-execute.png)
82
+
83
+ View a list of recent executions.
84
+
85
+ ![aigne-observe-list](../images/aigne-observe-list.png)
86
+
46
87
  ## Installation
47
88
 
48
89
  ### Clone the Repository
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/example-afs-memory",
3
- "version": "0.10.78-beta",
3
+ "version": "0.10.78-beta.2",
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",
@@ -18,13 +18,13 @@
18
18
  "dependencies": {
19
19
  "@aigne/afs": "^1.3.0-beta",
20
20
  "@aigne/afs-history": "^1.1.3-beta",
21
- "@aigne/afs-user-profile-memory": "^1.2.5-beta",
22
- "@aigne/cli": "^1.58.0-beta",
23
- "@aigne/core": "^1.71.0-beta"
21
+ "@aigne/core": "^1.71.0-beta.1",
22
+ "@aigne/cli": "^1.58.0-beta.2",
23
+ "@aigne/afs-user-profile-memory": "^1.2.5-beta.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/bun": "^1.2.22",
27
- "@aigne/test-utils": "^0.5.68-beta"
27
+ "@aigne/test-utils": "^0.5.68-beta.1"
28
28
  },
29
29
  "scripts": {
30
30
  "start": "bun run index.ts",