@deeflectcom/smart-spawn 1.0.0 → 1.0.2

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 +80 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Smart Spawn — OpenClaw Plugin
2
+
3
+ Intelligent model routing for [OpenClaw](https://github.com/openclaw/openclaw). Automatically picks the best AI model for any task based on real benchmark data from 5 sources.
4
+
5
+ Instead of hardcoding models or guessing, Smart Spawn analyzes what you're doing and routes to the optimal model — factoring in task type, budget, benchmarks, speed, and your own feedback history.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ openclaw plugins install @deeflectcom/smart-spawn
11
+ openclaw gateway restart
12
+ ```
13
+
14
+ That's it. The plugin talks to the public API at `ss.deeflect.com` — no self-hosting needed.
15
+
16
+ ## Usage
17
+
18
+ Just use your agent normally. Smart Spawn adds a `smart_spawn` tool that the agent calls when spawning sub-agents:
19
+
20
+ > "Research the latest developments in WebGPU"
21
+ >
22
+ > → Picks Gemini 2.5 Flash (fast, free, great context) and spawns a research sub-agent
23
+
24
+ > "Build me a React dashboard with auth"
25
+ >
26
+ > → Picks the best coding model in your budget tier and spawns a coder sub-agent
27
+
28
+ ## Spawn Modes
29
+
30
+ - **Single** — Pick the best model, spawn one agent
31
+ - **Collective** — Pick N diverse models, run in parallel, merge results
32
+ - **Cascade** — Start cheap, escalate to premium if needed
33
+ - **Swarm** — Decompose complex tasks into a DAG of sub-tasks with optimal model per step
34
+
35
+ ## Configuration
36
+
37
+ Optional — add to your OpenClaw config under `plugins.entries.smart-spawn.config`:
38
+
39
+ ```json
40
+ {
41
+ "apiUrl": "https://ss.deeflect.com",
42
+ "defaultBudget": "medium",
43
+ "defaultMode": "single"
44
+ }
45
+ ```
46
+
47
+ | Setting | Default | Options |
48
+ |---------|---------|---------|
49
+ | `apiUrl` | `https://ss.deeflect.com` | Your own API URL if self-hosting |
50
+ | `defaultBudget` | `medium` | `low`, `medium`, `high`, `any` |
51
+ | `defaultMode` | `single` | `single`, `collective`, `cascade`, `swarm` |
52
+ | `collectiveCount` | `3` | Number of models for collective mode (2-5) |
53
+ | `telemetryOptIn` | `false` | Opt-in to anonymous community telemetry |
54
+
55
+ ## How It Works
56
+
57
+ The plugin calls the Model Intelligence API which:
58
+
59
+ 1. Pulls model data from **5 sources** — OpenRouter, Artificial Analysis, HuggingFace Leaderboard, LMArena (Chatbot Arena), LiveBench
60
+ 2. **Z-score normalizes** benchmarks across sources so scores are comparable
61
+ 3. Scores models per category — coding, reasoning, creative, vision, research, fast-cheap, general
62
+ 4. Factors in **budget tiers**, speed, cost efficiency, and your personal feedback
63
+ 5. Returns the optimal model for the task
64
+
65
+ ### Budget Tiers
66
+
67
+ | Budget | Price Range (per 1M input tokens) |
68
+ |--------|----------------------------------|
69
+ | `low` | $0 – $1 |
70
+ | `medium` | $0 – $5 |
71
+ | `high` | $2 – $20 |
72
+ | `any` | No limit |
73
+
74
+ ## Self-Hosting the API
75
+
76
+ The API source is in the [same repo](https://github.com/deeflect/smart-spawn). If you want full control, run your own instance and point `apiUrl` to it.
77
+
78
+ ## License
79
+
80
+ MIT — [@deeflect](https://github.com/deeflect)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeflectcom/smart-spawn",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Intelligent sub-agent spawning with automatic model selection for OpenClaw",
5
5
  "main": "index.ts",
6
6
  "type": "module",
@@ -8,7 +8,8 @@
8
8
  "index.ts",
9
9
  "src/",
10
10
  "skills/",
11
- "openclaw.plugin.json"
11
+ "openclaw.plugin.json",
12
+ "README.md"
12
13
  ],
13
14
  "openclaw": {
14
15
  "extensions": ["./index.ts"]