@voltagent/libsql 1.0.0 → 1.0.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 +10 -8
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -95,10 +95,10 @@ This command guides you through setup.
|
|
|
95
95
|
You'll see the starter code in `src/index.ts`, which now registers both an agent and a comprehensive workflow example found in `src/workflows/index.ts`.
|
|
96
96
|
|
|
97
97
|
```typescript
|
|
98
|
-
import { VoltAgent, Agent } from "@voltagent/core";
|
|
99
|
-
import {
|
|
98
|
+
import { VoltAgent, Agent, Memory } from "@voltagent/core";
|
|
99
|
+
import { LibSQLMemoryAdapter } from "@voltagent/libsql";
|
|
100
100
|
import { createPinoLogger } from "@voltagent/logger";
|
|
101
|
-
import {
|
|
101
|
+
import { honoServer } from "@voltagent/server-hono";
|
|
102
102
|
import { openai } from "@ai-sdk/openai";
|
|
103
103
|
import { expenseApprovalWorkflow } from "./workflows";
|
|
104
104
|
import { weatherTool } from "./tools";
|
|
@@ -109,17 +109,18 @@ const logger = createPinoLogger({
|
|
|
109
109
|
level: "info",
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
+
// Optional persistent memory (remove to use default in-memory)
|
|
113
|
+
const memory = new Memory({
|
|
114
|
+
storage: new LibSQLMemoryAdapter({ url: "file:./.voltagent/memory.db" }),
|
|
115
|
+
});
|
|
116
|
+
|
|
112
117
|
// A simple, general-purpose agent for the project.
|
|
113
118
|
const agent = new Agent({
|
|
114
119
|
name: "my-agent",
|
|
115
120
|
instructions: "A helpful assistant that can check weather and help with various tasks",
|
|
116
|
-
llm: new VercelAIProvider(),
|
|
117
121
|
model: openai("gpt-4o-mini"),
|
|
118
122
|
tools: [weatherTool],
|
|
119
|
-
memory
|
|
120
|
-
url: "file:./.voltagent/memory.db",
|
|
121
|
-
logger: logger.child({ component: "libsql" }),
|
|
122
|
-
}),
|
|
123
|
+
memory,
|
|
123
124
|
});
|
|
124
125
|
|
|
125
126
|
// Initialize VoltAgent with your agent(s) and workflow(s)
|
|
@@ -130,6 +131,7 @@ new VoltAgent({
|
|
|
130
131
|
workflows: {
|
|
131
132
|
expenseApprovalWorkflow,
|
|
132
133
|
},
|
|
134
|
+
server: honoServer(),
|
|
133
135
|
logger,
|
|
134
136
|
});
|
|
135
137
|
```
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltagent/libsql",
|
|
3
3
|
"description": "VoltAgent LibSQL - LibSQL/Turso Memory provider integration for VoltAgent",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@libsql/client": "^0.15.0",
|
|
7
|
-
"@voltagent/internal": "^0.0.
|
|
7
|
+
"@voltagent/internal": "^0.0.10"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@types/node": "^24.2.1",
|
|
11
11
|
"@vitest/coverage-v8": "^3.2.4",
|
|
12
|
-
"@voltagent/core": "^1.
|
|
13
|
-
"@voltagent/logger": "^1.0.
|
|
12
|
+
"@voltagent/core": "^1.1.4",
|
|
13
|
+
"@voltagent/logger": "^1.0.1",
|
|
14
14
|
"ai": "^5.0.12",
|
|
15
15
|
"tsup": "^8.5.0",
|
|
16
16
|
"typescript": "^5.8.2",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"module": "dist/index.mjs",
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@voltagent/core": "^1.0.0-next.0",
|
|
39
|
-
"@voltagent/logger": "^1.0.0
|
|
39
|
+
"@voltagent/logger": "^1.0.0",
|
|
40
40
|
"ai": "^5.0.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|