agent-swarm-kit 1.0.164 → 1.0.165
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 +20 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -203,7 +203,7 @@ complete("I need a refund!").then(console.log);
|
|
|
203
203
|
- **`addTool`**: Create reusable tools with validation and execution logic.
|
|
204
204
|
- **`Storage.take`**: Search and retrieve data using embeddings (e.g., vector search).
|
|
205
205
|
|
|
206
|
-
Check out the **[API Reference](https://github.
|
|
206
|
+
Check out the **[API Reference](https://agent-swarm.github.io/documents/agent-swarm-kit.html)** for more!
|
|
207
207
|
|
|
208
208
|
---
|
|
209
209
|
|
|
@@ -252,8 +252,8 @@ const TEST_STORAGE = addStorage({
|
|
|
252
252
|
// Create an agent with storage
|
|
253
253
|
const TEST_AGENT = addAgent({
|
|
254
254
|
agentName: "test_agent",
|
|
255
|
-
completion:
|
|
256
|
-
prompt: "
|
|
255
|
+
completion: TEST_COMPLETION
|
|
256
|
+
prompt: "...",
|
|
257
257
|
storages: [TEST_STORAGE],
|
|
258
258
|
});
|
|
259
259
|
|
|
@@ -268,9 +268,24 @@ const TEST_SWARM = addSwarm({
|
|
|
268
268
|
const { complete } = session("client-123", TEST_SWARM);
|
|
269
269
|
complete("I need a refund!").then(console.log);
|
|
270
270
|
|
|
271
|
+
...
|
|
272
|
+
|
|
273
|
+
export interface PhoneModel {
|
|
274
|
+
id: number;
|
|
275
|
+
title: string;
|
|
276
|
+
description: string;
|
|
277
|
+
diagonal: number;
|
|
278
|
+
}
|
|
279
|
+
|
|
271
280
|
// Use vector search in a tool call
|
|
272
|
-
Storage.take(
|
|
273
|
-
|
|
281
|
+
Storage.take<PhoneModel>({
|
|
282
|
+
search: "8 inch phone",
|
|
283
|
+
agentName: AgentName.TestAgent,
|
|
284
|
+
clientId,
|
|
285
|
+
storageName: StorageName.PhoneStorage,
|
|
286
|
+
total: 1,
|
|
287
|
+
score: 0.68,
|
|
288
|
+
}).then((phones) => console.log(phones));
|
|
274
289
|
```
|
|
275
290
|
|
|
276
291
|
## ❓ Orchestration Principles
|