@aigne/example-mcp-puppeteer 1.19.4 → 1.19.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.
- package/README.md +43 -25
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -70,9 +70,9 @@ AI ->> User: The content is as follows: ...
|
|
|
70
70
|
|
|
71
71
|
## Quick Start (No Installation Required)
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
export OPENAI_API_KEY=YOUR_OPENAI_API_KEY # Set your OpenAI API key
|
|
73
|
+
### Run the Example
|
|
75
74
|
|
|
75
|
+
```bash
|
|
76
76
|
# Run in one-shot mode (default)
|
|
77
77
|
npx -y @aigne/example-mcp-puppeteer
|
|
78
78
|
|
|
@@ -83,44 +83,62 @@ npx -y @aigne/example-mcp-puppeteer --chat
|
|
|
83
83
|
echo "extract content from https://www.arcblock.io" | npx -y @aigne/example-mcp-puppeteer
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
### Connect to an AI Model
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
As an example, running `npx -y @aigne/example-mcp-puppeteer --chat` requires an AI model. If this is your first run, you need to connect one.
|
|
89
|
+
|
|
90
|
+

|
|
91
|
+
|
|
92
|
+
- Connect via the official AIGNE Hub
|
|
93
|
+
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+

|
|
97
|
+
|
|
98
|
+
- Connect via a self-hosted AIGNE Hub
|
|
99
|
+
|
|
100
|
+
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).
|
|
101
|
+
|
|
102
|
+

|
|
103
|
+
|
|
104
|
+
- Connect via a third-party model provider
|
|
105
|
+
|
|
106
|
+
Using OpenAI as an example, you can configure the provider's API key via environment variables. After configuration, run the example again:
|
|
89
107
|
|
|
90
108
|
```bash
|
|
91
|
-
|
|
109
|
+
export OPENAI_API_KEY="" # Set your OpenAI API key here
|
|
92
110
|
```
|
|
111
|
+
For more details on third-party model configuration (e.g., OpenAI, DeepSeek, Google Gemini), see [.env.local.example](./.env.local.example).
|
|
93
112
|
|
|
94
|
-
|
|
113
|
+
After configuration, run the example again.
|
|
95
114
|
|
|
96
|
-
|
|
97
|
-
cd aigne-framework/examples/mcp-puppeteer
|
|
115
|
+
### Debugging
|
|
98
116
|
|
|
99
|
-
|
|
100
|
-
|
|
117
|
+
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.
|
|
118
|
+
|
|
119
|
+
Start the observation server.
|
|
101
120
|
|
|
102
|
-
|
|
121
|
+

|
|
122
|
+
|
|
123
|
+
View a list of recent executions.
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
127
|
+
## Installation
|
|
103
128
|
|
|
104
|
-
|
|
129
|
+
### Clone the Repository
|
|
105
130
|
|
|
106
131
|
```bash
|
|
107
|
-
|
|
132
|
+
git clone https://github.com/AIGNE-io/aigne-framework
|
|
108
133
|
```
|
|
109
134
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
You can use different AI models by setting the `MODEL` environment variable along with the corresponding API key. The framework supports multiple providers:
|
|
135
|
+
### Install Dependencies
|
|
113
136
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
* **Google Gemini**: `MODEL="gemini:gemini-2.0-flash"` with `GEMINI_API_KEY`
|
|
117
|
-
* **AWS Bedrock**: `MODEL="bedrock:us.amazon.nova-premier-v1:0"` with AWS credentials
|
|
118
|
-
* **DeepSeek**: `MODEL="deepseek:deepseek-chat"` with `DEEPSEEK_API_KEY`
|
|
119
|
-
* **OpenRouter**: `MODEL="openrouter:openai/gpt-4o"` with `OPEN_ROUTER_API_KEY`
|
|
120
|
-
* **xAI**: `MODEL="xai:grok-2-latest"` with `XAI_API_KEY`
|
|
121
|
-
* **Ollama**: `MODEL="ollama:llama3.2"` with `OLLAMA_DEFAULT_BASE_URL`
|
|
137
|
+
```bash
|
|
138
|
+
cd aigne-framework/examples/mcp-puppeteer
|
|
122
139
|
|
|
123
|
-
|
|
140
|
+
pnpm install
|
|
141
|
+
```
|
|
124
142
|
|
|
125
143
|
### Run the Example
|
|
126
144
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/example-mcp-puppeteer",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.5-beta.1",
|
|
4
4
|
"description": "A demonstration of using AIGNE Framework and Puppeteer MCP Server to extract content from websites using Puppeteer",
|
|
5
5
|
"author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
|
|
6
6
|
"homepage": "https://github.com/AIGNE-io/aigne-framework/tree/main/examples/mcp-puppeteer",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"README.md"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@aigne/agent-library": "^1.
|
|
20
|
-
"@aigne/cli": "^1.
|
|
21
|
-
"@aigne/core": "^1.
|
|
22
|
-
"@aigne/default-memory": "^1.3.
|
|
23
|
-
"@aigne/openai": "^0.16.
|
|
19
|
+
"@aigne/agent-library": "^1.23.0-beta.1",
|
|
20
|
+
"@aigne/cli": "^1.58.0-beta.1",
|
|
21
|
+
"@aigne/core": "^1.71.0-beta.1",
|
|
22
|
+
"@aigne/default-memory": "^1.3.5-beta.1",
|
|
23
|
+
"@aigne/openai": "^0.16.15-beta.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/bun": "^1.2.22",
|
|
27
|
-
"@aigne/test-utils": "^0.5.
|
|
27
|
+
"@aigne/test-utils": "^0.5.68-beta.1"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"start": "bun run index.ts",
|