agent-swarm-kit 1.1.71 → 1.1.73

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.
Files changed (2) hide show
  1. package/README.md +36 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -415,6 +415,42 @@ P.S. [openai threads](https://platform.openai.com/docs/api-reference/threads) do
415
415
 
416
416
  ---
417
417
 
418
+ ## 🔌 Tool and System Prompt Reflection
419
+
420
+ Enhance your LLMs with flexible, runtime-configurable tools and system prompts using `agent-swarm-kit`. The library allows you to define tools with dynamic interfaces, enabling agents to adapt their functionality based on context or agent-specific requirements. This makes it easy to integrate specialized capabilities, like fetching real-time data or generating reports without additional tool arguments, with minimal boilerplate. 🛠️
421
+
422
+ ```tsx
423
+ addTool({
424
+ toolName: ToolName.FetchShortRangeEmaSignals,
425
+ type: "function",
426
+ call: async ({ toolId, clientId, agentName, isLast }) => {
427
+ const symbol = ioc.signalMetaService.getSymbolForAgent(agentName);
428
+ const content =
429
+ await ioc.shortRangeMathService.generateShortRangeReport(symbol);
430
+ await commitToolOutput(toolId, content, clientId, agentName);
431
+ if (isLast) {
432
+ await execute("", clientId, agentName);
433
+ }
434
+ },
435
+ function: (_, agentName) => {
436
+ const displayName = ioc.signalMetaService.getDispayNameForAgent(agentName);
437
+ return {
438
+ name: ToolName.FetchShortRangeEmaSignals,
439
+ description: `Fetch a short range EMA signals table for ${displayName}.`,
440
+ parameters: {
441
+ type: "object",
442
+ properties: {},
443
+ required: [],
444
+ },
445
+ };
446
+ },
447
+ });
448
+ ```
449
+
450
+ **Example**: Below is a tool that dynamically fetches short-range EMA (Exponential Moving Average) signals for a trading agent, with a description tailored to the agent's display name 🌐
451
+
452
+ ---
453
+
418
454
  ## ✅ Tested & Reliable
419
455
 
420
456
  `agent-swarm-kit` comes with a robust test suite covering:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-swarm-kit",
3
- "version": "1.1.71",
3
+ "version": "1.1.73",
4
4
  "description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",