@aigne/example-workflow-code-execution 1.18.4 → 1.18.5-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 (2) hide show
  1. package/README.md +43 -25
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -57,9 +57,9 @@ Coder ->> User: The value of \(10!\) (10 factorial) is 3,628,800.
57
57
 
58
58
  ## Quick Start (No Installation Required)
59
59
 
60
- ```bash
61
- export OPENAI_API_KEY=YOUR_OPENAI_API_KEY # Set your OpenAI API key
60
+ ### Run the Example
62
61
 
62
+ ```bash
63
63
  # Run in one-shot mode (default)
64
64
  npx -y @aigne/example-workflow-code-execution
65
65
 
@@ -70,44 +70,62 @@ npx -y @aigne/example-workflow-code-execution --chat
70
70
  echo 'Calculate 15!' | npx -y @aigne/example-workflow-code-execution
71
71
  ```
72
72
 
73
- ## Installation
73
+ ### Connect to an AI Model
74
74
 
75
- ### Clone the Repository
75
+ As an example, running `npx -y @aigne/example-workflow-code-execution --chat` requires an AI model. If this is your first run, you need to connect one.
76
+
77
+ ![run example](./run-example.png)
78
+
79
+ - Connect via the official AIGNE Hub
80
+
81
+ 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.
82
+
83
+ ![connect to official aigne hub](../images/connect-to-aigne-hub.png)
84
+
85
+ - Connect via a self-hosted AIGNE Hub
86
+
87
+ 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).
88
+
89
+ ![connect to self hosted aigne hub](../images/connect-to-self-hosted-aigne-hub.png)
90
+
91
+ - Connect via a third-party model provider
92
+
93
+ Using OpenAI as an example, you can configure the provider's API key via environment variables. After configuration, run the example again:
76
94
 
77
95
  ```bash
78
- git clone https://github.com/AIGNE-io/aigne-framework
96
+ export OPENAI_API_KEY="" # Set your OpenAI API key here
79
97
  ```
98
+ For more details on third-party model configuration (e.g., OpenAI, DeepSeek, Google Gemini), see [.env.local.example](./.env.local.example).
80
99
 
81
- ### Install Dependencies
100
+ After configuration, run the example again.
82
101
 
83
- ```bash
84
- cd aigne-framework/examples/workflow-code-execution
102
+ ### Debugging
85
103
 
86
- pnpm install
87
- ```
104
+ 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.
105
+
106
+ Start the observation server.
88
107
 
89
- ### Setup Environment Variables
108
+ ![aigne-observe-execute](../images/aigne-observe-execute.png)
109
+
110
+ View a list of recent executions.
111
+
112
+ ![aigne-observe-list](../images/aigne-observe-list.png)
113
+
114
+ ## Installation
90
115
 
91
- Setup your OpenAI API key in the `.env.local` file:
116
+ ### Clone the Repository
92
117
 
93
118
  ```bash
94
- OPENAI_API_KEY="" # Set your OpenAI API key here
119
+ git clone https://github.com/AIGNE-io/aigne-framework
95
120
  ```
96
121
 
97
- #### Using Different Models
98
-
99
- You can use different AI models by setting the `MODEL` environment variable along with the corresponding API key. The framework supports multiple providers:
122
+ ### Install Dependencies
100
123
 
101
- * **OpenAI**: `MODEL="openai:gpt-4.1"` with `OPENAI_API_KEY`
102
- * **Anthropic**: `MODEL="anthropic:claude-3-7-sonnet-latest"` with `ANTHROPIC_API_KEY`
103
- * **Google Gemini**: `MODEL="gemini:gemini-2.0-flash"` with `GEMINI_API_KEY`
104
- * **AWS Bedrock**: `MODEL="bedrock:us.amazon.nova-premier-v1:0"` with AWS credentials
105
- * **DeepSeek**: `MODEL="deepseek:deepseek-chat"` with `DEEPSEEK_API_KEY`
106
- * **OpenRouter**: `MODEL="openrouter:openai/gpt-4o"` with `OPEN_ROUTER_API_KEY`
107
- * **xAI**: `MODEL="xai:grok-2-latest"` with `XAI_API_KEY`
108
- * **Ollama**: `MODEL="ollama:llama3.2"` with `OLLAMA_DEFAULT_BASE_URL`
124
+ ```bash
125
+ cd aigne-framework/examples/workflow-code-execution
109
126
 
110
- For detailed configuration examples, please refer to the `.env.local.example` file in this directory.
127
+ pnpm install
128
+ ```
111
129
 
112
130
  ### Run the Example
113
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/example-workflow-code-execution",
3
- "version": "1.18.4",
3
+ "version": "1.18.5-beta.1",
4
4
  "description": "A demonstration of using AIGNE Framework to build a code-execution workflow",
5
5
  "author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
6
6
  "homepage": "https://github.com/AIGNE-io/aigne-framework/tree/main/examples/workflow-code-execution",
@@ -17,15 +17,15 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "zod": "^3.25.67",
20
- "@aigne/agent-library": "^1.22.4",
21
- "@aigne/cli": "^1.57.3",
22
- "@aigne/core": "^1.70.1",
23
- "@aigne/default-memory": "^1.3.4",
24
- "@aigne/openai": "^0.16.14"
20
+ "@aigne/agent-library": "^1.23.0-beta.1",
21
+ "@aigne/cli": "^1.58.0-beta.1",
22
+ "@aigne/core": "^1.71.0-beta.1",
23
+ "@aigne/openai": "^0.16.15-beta.1",
24
+ "@aigne/default-memory": "^1.3.5-beta.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/bun": "^1.2.22",
28
- "@aigne/test-utils": "^0.5.67"
28
+ "@aigne/test-utils": "^0.5.68-beta.1"
29
29
  },
30
30
  "scripts": {
31
31
  "start": "bun run index.ts",