@tabbybyte/kimten 0.1.2 → 0.1.3
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 +40 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,11 +54,17 @@ Perfect for:
|
|
|
54
54
|
Feed the cat some treats:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
npm i kimten ai zod @ai-sdk/openai
|
|
57
|
+
npm i @tabbybyte/kimten ai zod @ai-sdk/openai
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
That’s it. No ceremony. No rituals. 🍗
|
|
61
61
|
|
|
62
|
+
### Requirements
|
|
63
|
+
|
|
64
|
+
- Node `>=22`
|
|
65
|
+
- AI SDK Core `>=6`
|
|
66
|
+
- Zod `>=3`
|
|
67
|
+
|
|
62
68
|
---
|
|
63
69
|
|
|
64
70
|
## 🚀 Usage
|
|
@@ -68,7 +74,7 @@ Summon your little helper (with or without `toys`) and let it `play`.
|
|
|
68
74
|
```js
|
|
69
75
|
import { openai } from '@ai-sdk/openai'; // or, any other provider
|
|
70
76
|
import { z } from 'zod';
|
|
71
|
-
import Kimten from 'kimten';
|
|
77
|
+
import Kimten from '@tabbybyte/kimten';
|
|
72
78
|
|
|
73
79
|
const cat = Kimten({
|
|
74
80
|
brain: openai('gpt-4o-mini'), // or, any other available model
|
|
@@ -153,6 +159,12 @@ Create a new cat.
|
|
|
153
159
|
* `hops` → max agent loop steps (default: `10`)
|
|
154
160
|
prevents infinite zoomies 🌀
|
|
155
161
|
|
|
162
|
+
### Tool semantics (important)
|
|
163
|
+
|
|
164
|
+
- Tool inputs are validated only if you provide `inputSchema` (shorthand tools accept anything).
|
|
165
|
+
- Tool results should be JSON-serializable; `undefined` becomes `null`.
|
|
166
|
+
- If a tool throws, Kimten returns `{ error, toolName }` as the tool result (it does not re-throw).
|
|
167
|
+
|
|
156
168
|
### Returns
|
|
157
169
|
|
|
158
170
|
* `play(input, schema?)`
|
|
@@ -167,10 +179,18 @@ Create a new cat.
|
|
|
167
179
|
|
|
168
180
|
---
|
|
169
181
|
|
|
170
|
-
## 🧩 Design Philosophy
|
|
182
|
+
## 🧩 Design Philosophy & Vibes
|
|
171
183
|
|
|
172
184
|
Kimten intentionally avoids “big agent framework energy”.
|
|
173
185
|
|
|
186
|
+
It’s meant to be:
|
|
187
|
+
|
|
188
|
+
* small
|
|
189
|
+
* opinionated
|
|
190
|
+
* dependency-light
|
|
191
|
+
* short-term memory by design
|
|
192
|
+
* easy to embed anywhere
|
|
193
|
+
|
|
174
194
|
No:
|
|
175
195
|
|
|
176
196
|
* streaming APIs
|
|
@@ -180,6 +200,7 @@ No:
|
|
|
180
200
|
* persistence/storage
|
|
181
201
|
* hidden background processes
|
|
182
202
|
* TypeScript runtime/build nonsense
|
|
203
|
+
* full fledged orchestration system
|
|
183
204
|
|
|
184
205
|
If you need those… use something heavier.
|
|
185
206
|
|
|
@@ -226,6 +247,22 @@ toys: {
|
|
|
226
247
|
}
|
|
227
248
|
```
|
|
228
249
|
|
|
250
|
+
### Small “real” example
|
|
251
|
+
|
|
252
|
+
```js
|
|
253
|
+
toys: {
|
|
254
|
+
fetchJson: {
|
|
255
|
+
description: 'Fetch JSON from a URL (GET).',
|
|
256
|
+
inputSchema: z.object({ url: z.string().url() }),
|
|
257
|
+
async execute({ url }) {
|
|
258
|
+
const res = await fetch(url);
|
|
259
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
260
|
+
return res.json();
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
229
266
|
### Structured output = sanity
|
|
230
267
|
|
|
231
268
|
Use Zod schemas whenever possible.
|
|
@@ -242,28 +279,6 @@ Cats don’t hold grudges (or context). 🐾
|
|
|
242
279
|
|
|
243
280
|
---
|
|
244
281
|
|
|
245
|
-
## 🐾 Vibes
|
|
246
|
-
|
|
247
|
-
Kimten is:
|
|
248
|
-
|
|
249
|
-
* small
|
|
250
|
-
* opinionated
|
|
251
|
-
* dependency-light
|
|
252
|
-
* short-memory by design
|
|
253
|
-
* easy to embed anywhere
|
|
254
|
-
|
|
255
|
-
It’s not trying to be LangChain or a full orchestration system.
|
|
256
|
-
|
|
257
|
-
It’s just a cat.
|
|
258
|
-
|
|
259
|
-
A helpful one.
|
|
260
|
-
|
|
261
|
-
In your terminal.
|
|
262
|
-
|
|
263
|
-
Typing. 🐈⬛
|
|
264
|
-
|
|
265
|
-
---
|
|
266
|
-
|
|
267
282
|
## License
|
|
268
283
|
|
|
269
284
|
MIT
|