Get the FREE Ultimate OpenClaw Setup Guide →
d

Smart Spawn

Verified

@deeflect

npx machina-cli add skill @deeflect/smart-spawn --openclaw
Files (1)
SKILL.md
3.1 KB

Smart Spawn API

Pick the best AI model for any task. Call the API, get a model recommendation, spawn with it.

No plugin required. Works with any OpenClaw instance or any HTTP client.

Quick Start

1. GET ss.deeflect.com/api/pick?task=<description>&budget=<tier>
2. Use the returned model ID in sessions_spawn

Pick Best Model

GET https://ss.deeflect.com/api/pick?task=build+a+react+dashboard&budget=medium

Response:

{
  "data": {
    "id": "anthropic/claude-opus-4.6",
    "name": "Claude Opus 4.6",
    "score": 86,
    "pricing": { "prompt": 5, "completion": 25 },
    "reason": "Best general model at medium budget ($0-5/M) — score: 86"
  }
}

Then spawn:

sessions_spawn(task="Build a React dashboard with auth", model="anthropic/claude-opus-4.6")

Parameters

ParamRequiredDescription
taskYesTask description or category: coding, reasoning, creative, vision, research, fast-cheap, general
budgetNolow ($0-1/M), medium ($0-5/M, default), high ($2-20/M), any
excludeNoComma-separated model IDs to skip
contextNoTags like vision,long-context for routing boost

Get Multiple Recommendations

GET https://ss.deeflect.com/api/recommend?task=coding&budget=low&count=3

Returns diverse models from different providers. Use for collective/parallel spawning.

Compare Models

GET https://ss.deeflect.com/api/compare?models=anthropic/claude-opus-4.6,openai/gpt-5.2

Side-by-side scores, pricing, capabilities.

Browse All Models

GET https://ss.deeflect.com/api/models?category=coding&sort=score&limit=10

Sort by score, cost, efficiency, or any category name.

Decompose Complex Tasks

POST https://ss.deeflect.com/api/decompose
{"task": "Build and deploy a SaaS app", "budget": "medium"}

Returns sequential steps with optimal model per step.

Swarm (Parallel DAG)

POST https://ss.deeflect.com/api/swarm
{"task": "Research competitors and build pitch deck", "budget": "low"}

Returns a dependency graph of parallel tasks with models assigned.

Usage Pattern

For any task that needs a sub-agent:

  1. Decide budgetlow for cheap/fast, medium for quality, high for best available
  2. Call /api/pick with the task description
  3. Use the returned id as the model parameter in sessions_spawn
  4. If task is complex — use /api/decompose or /api/swarm to break it into subtasks, spawn each with its recommended model

Error Handling

  • API down → skip model selection, use sessions_spawn without a model (falls back to default)
  • No model found (404) → widen budget to any and retry
  • Rate limited (429) → wait and retry, or fall back to default

API Status

GET https://ss.deeflect.com/api/status

Shows model count, data freshness, source health. Data refreshes every 6 hours from 5 benchmark sources.

Source

git clone https://clawhub.ai/deeflect/smart-spawnView on GitHub

Overview

Smart Spawn lets you select the best AI model for any task via the Smart Spawn API with no plugins required. It works with any OpenClaw instance or HTTP client, returning a model ID you can immediately spawn with sessions_spawn. This streamlines model selection and deployment directly from HTTP calls.

How This Skill Works

Send a GET to /api/pick with a task description and an optional budget to receive a recommended model ID, name, and score. Use the returned id as the model parameter in sessions_spawn to start the task. For complex work, decompose the task with /api/decompose or coordinate subtasks with /api/swarm, then spawn each subtask with its recommended model.

When to Use It

  • You need a single best model quickly for a well-scoped task.
  • You want budget-aware model selection (low/medium/high).
  • You want diverse models in parallel for comparison or ensemble work.
  • You have a complex task that benefits from decomposition into subtasks.
  • You want to compare models side-by-side before committing to a spawn.

Quick Start

  1. Step 1: Decide budget — low, medium, high (default is medium).
  2. Step 2: GET https://ss.deeflect.com/api/pick?task=<description>&budget=<tier> to receive a model id.
  3. Step 3: Use the returned id in sessions_spawn, e.g., sessions_spawn(task="Your task", model="<returned-id>")

Best Practices

  • Decide budget first (low, medium, high) before calling /api/pick.
  • Describe the task clearly in the task parameter to improve model fit.
  • Use the returned id as the model parameter in sessions_spawn to execute the task.
  • If the task is complex, use /api/decompose or /api/swarm to break into subtasks and spawn each with its recommended model.
  • Use /api/recommend or /api/compare to evaluate multiple models before spawning.

Example Use Cases

  • Build a React dashboard with auth by calling /api/pick?task=Build+a+React+dashboard&budget=medium and spawning with the returned model ID (e.g., anthropic/claude-opus-4.6).
  • Research competitors and build a pitch deck using /api/swarm to generate parallel subtasks with assigned models.
  • Decompose a SaaS app build and deployment workflow via /api/decompose, then spawn each step with its optimal model.
  • Compare Claude Opus vs GPT-5.2 for a coding task using /api/compare and then choose the best model to spawn.
  • Request three diverse model recommendations with /api/recommend for parallel spawning of multiple subtasks.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers