@aigne/example-mcp-sqlite 1.19.5-beta → 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
|
@@ -76,9 +76,9 @@ AI ->> User: There are 10 products in the database.
|
|
|
76
76
|
|
|
77
77
|
## Quick Start (No Installation Required)
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
export OPENAI_API_KEY=YOUR_OPENAI_API_KEY # Set your OpenAI API key
|
|
79
|
+
### Run the Example
|
|
81
80
|
|
|
81
|
+
```bash
|
|
82
82
|
# Run in one-shot mode (default)
|
|
83
83
|
npx -y @aigne/example-mcp-sqlite
|
|
84
84
|
|
|
@@ -89,44 +89,62 @@ npx -y @aigne/example-mcp-sqlite --chat
|
|
|
89
89
|
echo "create a product table with columns name description and createdAt" | npx -y @aigne/example-mcp-sqlite
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
### Connect to an AI Model
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
As an example, running `npx -y @aigne/example-mcp-sqlite --chat"` requires an AI model. If this is your first run, you need to connect one.
|
|
95
|
+
|
|
96
|
+

|
|
97
|
+
|
|
98
|
+
- Connect via the official AIGNE Hub
|
|
99
|
+
|
|
100
|
+
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.
|
|
101
|
+
|
|
102
|
+

|
|
103
|
+
|
|
104
|
+
- Connect via a self-hosted AIGNE Hub
|
|
105
|
+
|
|
106
|
+
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).
|
|
107
|
+
|
|
108
|
+

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

|
|
128
|
+
|
|
129
|
+
View a list of recent executions.
|
|
130
|
+
|
|
131
|
+

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