@aigne/example-chat-bot 1.15.89 → 1.15.90-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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.15.90-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/example-chat-bot-v1.15.90-beta...example-chat-bot-v1.15.90-beta.1) (2025-12-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * correct run example & doc improvements ([#707](https://github.com/AIGNE-io/aigne-framework/issues/707)) ([f98fc5d](https://github.com/AIGNE-io/aigne-framework/commit/f98fc5df28fd6ce6134128c2f0e5395c1554b740))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @aigne/cli bumped to 1.58.0-beta.1
16
+
17
+ ## [1.15.90-beta](https://github.com/AIGNE-io/aigne-framework/compare/example-chat-bot-v1.15.89...example-chat-bot-v1.15.90-beta) (2025-12-07)
18
+
19
+
20
+ ### Dependencies
21
+
22
+ * The following workspace dependencies were updated
23
+ * dependencies
24
+ * @aigne/cli bumped to 1.58.0-beta
25
+
3
26
  ## [1.15.89](https://github.com/AIGNE-io/aigne-framework/compare/example-chat-bot-v1.15.89-beta...example-chat-bot-v1.15.89) (2025-12-06)
4
27
 
5
28
 
package/README.md CHANGED
@@ -17,9 +17,9 @@ This example demonstrates how to create and run an agent-based chatbot using the
17
17
 
18
18
  ## Quick Start (No Installation Required)
19
19
 
20
- ```bash
21
- export OPENAI_API_KEY=YOUR_OPENAI_API_KEY # Set your OpenAI API key
20
+ ### Run the Example
22
21
 
22
+ ```bash
23
23
  # Run in one-shot mode (default)
24
24
  npx -y @aigne/example-chat-bot
25
25
 
@@ -30,55 +30,73 @@ npx -y @aigne/example-chat-bot --chat
30
30
  echo "Tell me about AIGNE Framework" | npx -y @aigne/example-chat-bot
31
31
  ```
32
32
 
33
- ## Installation
33
+ ### Connect to an AI Model
34
34
 
35
- ### Install AIGNE CLI
35
+ As an example, running `npx -y @aigne/example-chat-bot --chat` requires an AI model. If this is your first run, you need to connect one.
36
+
37
+ ![run example](./run-example.png)
38
+
39
+ - Connect via the official AIGNE Hub
40
+
41
+ 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.
42
+
43
+ ![connect to official aigne hub](../images/connect-to-aigne-hub.png)
44
+
45
+ - Connect via a self-hosted AIGNE Hub
46
+
47
+ 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).
48
+
49
+ ![connect to self hosted aigne hub](../images/connect-to-self-hosted-aigne-hub.png)
50
+
51
+ - Connect via a third-party model provider
52
+
53
+ Using OpenAI as an example, you can configure the provider's API key via environment variables. After configuration, run the example again:
36
54
 
37
55
  ```bash
38
- npm install -g @aigne/cli
56
+ export OPENAI_API_KEY="" # Set your OpenAI API key here
39
57
  ```
58
+ For more details on third-party model configuration (e.g., OpenAI, DeepSeek, Google Gemini), see [.env.local.example](./.env.local.example).
40
59
 
41
- ### Clone the Repository
60
+ After configuration, run the example again.
42
61
 
43
- ```bash
44
- git clone https://github.com/AIGNE-io/aigne-framework
62
+ ### Debugging
45
63
 
46
- cd aigne-framework/examples/chat-bot
47
- ```
64
+ 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.
65
+
66
+ Start the observation server.
48
67
 
49
- ### Setup Environment Variables
68
+ ![aigne-observe-execute](../images/aigne-observe-execute.png)
69
+
70
+ View a list of recent executions.
71
+
72
+ ![aigne-observe-list](../images/aigne-observe-list.png)
73
+
74
+ ## Installation
50
75
 
51
- Setup your OpenAI API key in the `.env.local` file (you can rename `.env.local.example` to `.env.local`):
76
+ ### Install AIGNE CLI
52
77
 
53
78
  ```bash
54
- OPENAI_API_KEY="" # Set your OpenAI API key here
79
+ npm install -g @aigne/cli
55
80
  ```
56
81
 
57
- #### Using Different Models
58
-
59
- You can use different AI models by setting the `MODEL` environment variable along with the corresponding API key. The framework supports multiple providers:
82
+ ### Clone the Repository
60
83
 
61
- * **OpenAI**: `MODEL="openai:gpt-4.1"` with `OPENAI_API_KEY`
62
- * **Anthropic**: `MODEL="anthropic:claude-3-7-sonnet-latest"` with `ANTHROPIC_API_KEY`
63
- * **Google Gemini**: `MODEL="gemini:gemini-2.0-flash"` with `GEMINI_API_KEY`
64
- * **AWS Bedrock**: `MODEL="bedrock:us.amazon.nova-premier-v1:0"` with AWS credentials
65
- * **DeepSeek**: `MODEL="deepseek:deepseek-chat"` with `DEEPSEEK_API_KEY`
66
- * **OpenRouter**: `MODEL="openrouter:openai/gpt-4o"` with `OPEN_ROUTER_API_KEY`
67
- * **xAI**: `MODEL="xai:grok-2-latest"` with `XAI_API_KEY`
68
- * **Ollama**: `MODEL="ollama:llama3.2"` with `OLLAMA_DEFAULT_BASE_URL`
84
+ ```bash
85
+ git clone https://github.com/AIGNE-io/aigne-framework
69
86
 
70
- For detailed configuration examples, please refer to the `.env.local.example` file in this directory.
87
+ cd aigne-framework/examples/chat-bot
88
+ ```
71
89
 
72
90
  ### Run the Example
73
91
 
74
92
  ```bash
75
- aigne run # Run in one-shot mode (default)
93
+ pnpm start # Run in one-shot mode (default)
76
94
 
77
95
  # Run in interactive chat mode
78
- aigne run --chat
96
+ pnpm start --chat
79
97
 
80
98
  # Use pipeline input
81
- echo "Tell me about AIGNE Framework" | aigne run
99
+ echo "Tell me about AIGNE Framework" | pnpm start
82
100
  ```
83
101
 
84
102
  ### Run Options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/example-chat-bot",
3
- "version": "1.15.89",
3
+ "version": "1.15.90-beta.1",
4
4
  "description": "A demonstration of using AIGNE Framework to build a chat bot",
5
5
  "author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
6
6
  "homepage": "https://github.com/AIGNE-io/aigne-framework/tree/main/examples/chat-bot",
@@ -12,9 +12,10 @@
12
12
  "type": "module",
13
13
  "bin": "aigne.yaml",
14
14
  "dependencies": {
15
- "@aigne/cli": "^1.57.3"
15
+ "@aigne/cli": "^1.58.0-beta.1"
16
16
  },
17
17
  "scripts": {
18
+ "start": "aigne run",
18
19
  "test": "aigne test",
19
20
  "test:llm": "aigne run --input 'What can AIGNE do?'"
20
21
  }
Binary file