agent-swarm-kit 1.0.164 → 1.0.166

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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Unleash the power of collaborative AI with `agent-swarm-kit`! This library empowers you to create intelligent, modular agent networks that work together seamlessly—perfect for automating workflows, solving complex problems, or designing next-gen AI systems. With a simple API, robust validation, and flexible architecture, it’s your toolkit for building smarter solutions, faster.
6
6
 
7
- 📚 **[Full Documentation](https://agent-swarm.github.io/documents/agent-swarm-kit.html)** | 🌟 **[Try It Now](#quick-example)**
7
+ 📚 **[Full Documentation](https://agent-swarm.github.io/documents/agent-swarm-kit.html)** | 🌟 **[Try It Now](https://github.com/tripolskypetr/agent-swarm-kit/blob/master/demo/repl-phone-seller/src/logic/agent/sales.agent.ts)**
8
8
 
9
9
  ![Agent Swarm Schema](https://raw.githubusercontent.com/tripolskypetr/agent-swarm-kit/master/schema.png)
10
10
 
@@ -22,6 +22,8 @@ Unleash the power of collaborative AI with `agent-swarm-kit`! This library empow
22
22
 
23
23
  ## 🚀 Getting Started
24
24
 
25
+ **Want a real-world demo?** Check out our **[REPL Phone Seller App](https://github.com/tripolskypetr/agent-swarm-kit/blob/master/demo/repl-phone-seller/src/logic/agent/sales.agent.ts)**—a practical example of a sales agent in action!
26
+
25
27
  ### Installation
26
28
 
27
29
  Get up and running in seconds:
@@ -201,15 +203,15 @@ complete("I need a refund!").then(console.log);
201
203
  - **`addSwarm`**: Group agents into a coordinated network.
202
204
  - **`session`**: Start a client session with real-time message handling.
203
205
  - **`addTool`**: Create reusable tools with validation and execution logic.
204
- - **`Storage.take`**: Search and retrieve data using embeddings (e.g., vector search).
206
+ - **`Storage.take`**: Search and retrieve data using embeddings (e.g., vector search, RAG).
205
207
 
206
- Check out the **[API Reference](https://github.com/tripolskypetr/agent-swarm-kit/blob/master/docs/api-reference.md)** for more!
208
+ Check out the **[API Reference](https://agent-swarm.github.io/documents/agent-swarm-kit.html)** for more!
207
209
 
208
210
  ---
209
211
 
210
212
  ## 🛠 Advanced Example: Vector Search with Embeddings
211
213
 
212
- Integrate vector search with embeddings for smarter agents:
214
+ Integrate vector search with embeddings (RAG) for smarter agents:
213
215
 
214
216
  ```typescript
215
217
  import { addAgent, addSwarm, addStorage, addEmbedding, session, Storage } from "agent-swarm-kit";
@@ -252,8 +254,8 @@ const TEST_STORAGE = addStorage({
252
254
  // Create an agent with storage
253
255
  const TEST_AGENT = addAgent({
254
256
  agentName: "test_agent",
255
- completion: {/* completion config */},
256
- prompt: "Search and assist.",
257
+ completion: TEST_COMPLETION
258
+ prompt: "...",
257
259
  storages: [TEST_STORAGE],
258
260
  });
259
261
 
@@ -268,9 +270,24 @@ const TEST_SWARM = addSwarm({
268
270
  const { complete } = session("client-123", TEST_SWARM);
269
271
  complete("I need a refund!").then(console.log);
270
272
 
273
+ ...
274
+
275
+ export interface PhoneModel {
276
+ id: number;
277
+ title: string;
278
+ description: string;
279
+ diagonal: number;
280
+ }
281
+
271
282
  // Use vector search in a tool call
272
- Storage.take("reduce pain, fever", 1, "client-xyz", TEST_AGENT, TEST_STORAGE)
273
- .then(result => console.log("Found:", result));
283
+ Storage.take<PhoneModel>({
284
+ search: "8 inch phone",
285
+ agentName: AgentName.TestAgent,
286
+ clientId,
287
+ storageName: StorageName.PhoneStorage,
288
+ total: 1,
289
+ score: 0.68,
290
+ }).then((phones) => console.log(phones));
274
291
  ```
275
292
 
276
293
  ## ❓ Orchestration Principles
package/build/index.cjs CHANGED
@@ -10528,7 +10528,7 @@ class DocService {
10528
10528
  this.loggerService.info("docService dumpPerfomance", {
10529
10529
  dirName,
10530
10530
  });
10531
- if (!(await functoolsKit.not(exists(dirName)))) {
10531
+ if (await functoolsKit.not(exists(dirName))) {
10532
10532
  await fs.mkdir(dirName, { recursive: true });
10533
10533
  }
10534
10534
  await writeFileAtomic(path.join(dirName, `${clientId}.${getMomentStamp.getMomentStamp()}.json`), JSON.stringify(await this.perfService.toClientRecord(clientId)));
package/build/index.mjs CHANGED
@@ -10526,7 +10526,7 @@ class DocService {
10526
10526
  this.loggerService.info("docService dumpPerfomance", {
10527
10527
  dirName,
10528
10528
  });
10529
- if (!(await not(exists(dirName)))) {
10529
+ if (await not(exists(dirName))) {
10530
10530
  await mkdir(dirName, { recursive: true });
10531
10531
  }
10532
10532
  await writeFileAtomic(join(dirName, `${clientId}.${getMomentStamp()}.json`), JSON.stringify(await this.perfService.toClientRecord(clientId)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.0.164",
3
+ "version": "1.0.166",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",