slm_task_planner · Productivity · 10-Plane Pure-CPU Agent

SLM Task Planner

Autonomous goal decomposition system. Breaks complex tasks into prioritized action items and assigns them to specialized local sub-agents.

01 / Overview & Capabilities

Autonomous goal decomposition system. Breaks complex tasks into prioritized action items and assigns them to specialized local sub-agents.

Key Features

  • Goal decomposition and sub-task scheduling
  • Dependency mapping for parallel execution branches
  • Runtime execution tracker with dynamic adjustment
  • Fallback handler to revise tasks if a sub-agent fails

02 / Standalone OS Harness Installers, CLI & Python SDK

In SLMAgents 2.0, SLM Task Planner executes inside the 10-Plane Pure-CPU Agent Harness (slm_harness). Download a self-extracting Individual Agent + Harness OS Installer for macOS, Windows, or Linux (bundling slm_task_planner + slm_harness + the ./slm CLI), install the full 26-agent desktop suite, or install via Python pip:

1. Individual SLM Task Planner + 10-Plane Harness Installers (All OSes)

2. Full 26-Agent Studio & Desktop OS Installers

3. 10-Plane Harness CLI (./slm) & Python pip Installation

Terminal — 10-Plane Harness CLI & Pip
# Option A: Install via PyPI or editable source with the 10-Plane Harness
$ pip install slm-task-planner
$ pip install -e ./slm_harness -e ./slm_task_planner

# Option B: Run directly through the Unified 10-Plane Pure-CPU Harness CLI (./slm)
$ ./slm ask "Decompose migrating a monolithic Flask app to FastAPI into a dependency-ordered task DAG"
$ ./slm chat   # Interactive Rich TUI with 18 slash commands (/trace, /models, /arena, /undo)
$ ./slm serve  # 100% Offline Web AI Studio + OpenAI /v1 API at http://127.0.0.1:7860

03 / 10-Plane Pure-CPU Harness Integration (slm_harness)

Rather than executing as an isolated prompt wrapper, SLM Task Planner is natively orchestrated by the SLMAgents 2.0 10-Plane Pure-CPU Harness (via slm_harness.runtime.legacy_bridge and CascadeRouter). Every call benefits from hybrid llama.cpp GGUF (Q4_K_M) + Quantized INT4/INT8 CPU execution, watermarked LRU memory governance, grammar-constrained decoding, and deterministic verification at $0 API cost:

Harness PlaneSubsystemHow It Powers SLM Task Planner on Pure CPU
Plane 6 CascadeRouter (<35ms) Stage 2 (DAG Decomposition / Milestone / Sub-Task Planning Intent) & Stage 3 (Embedding Margin)
Plane 2 & 5 MemoryArena & Hybrid CPU Runtime Specialist Role: primary (Qwen3-4B GGUF Q4_K_M / DeepSeek-R1-Distill-Qwen-7B GGUF). Managed inside Watermark LRU MemoryArena (lite 2.6 GB / balanced 4.7 GB / power 8.2 GB) with zero-copy session sharing and automatic OOM tier step-down (8B -> 4B -> 3B -> 0.8B).
Plane 7 & 8 Deterministic Verifier & Governance Plane 6 Topological DAG Cycle-Detection Verifier + Plane 2 GBNF JSON Task-Graph Schema
Plane 1, 3 & 4 Kernel, Artifact Scratchpad & 4-Tier Memory SQLite WAL CheckpointStore (/fork, /rewind, /undo), content-addressed artifact://<sha12> handles to prevent prompt bloat, and hybrid SQLite FTS5 BM25 + HNSW vector memory.

04 / Source Checkout (Git Sparse-Checkout)

Clone this agent alongside the 10-Plane Pure-CPU Harness (slm_harness) from the monorepo using Git sparse-checkout — no need to download all 26 agents:

Option 1 — Sparse Checkout with 10-Plane Harness (Recommended)

Terminal — Git Sparse Checkout
# 1. Create and enter a new directory
$ mkdir slm_task_planner_workspace && cd slm_task_planner_workspace

# 2. Initialise empty git repo and add remote
$ git init
$ git remote add origin https://github.com/t00114218-stack/SLMAgents.git

# 3. Enable sparse-checkout for both slm_harness and slm_task_planner
$ git sparse-checkout init --cone
$ git sparse-checkout set slm_harness slm_task_planner

# 4. Pull the 10-Plane Harness and agent source
$ git pull origin main

Option 2 — Full Repository Clone

Terminal — Full Clone
$ git clone https://github.com/t00114218-stack/SLMAgents.git
$ cd SLMAgents
$ ./slm doctor

Note: After checkout, install the harness and agent in editable mode with pip install -e ./slm_harness -e ./slm_task_planner or download the pre-packaged OS Harness Installer above.

05 / Configuration & API Reference

Constructor Parameters

Instantiate SLMTaskPlanner with performance options:

ParameterType / DefaultDescription
model_pathstr | NoneExplicit path to GGUF (Q4_K_M) or quantized ONNX model weights. If omitted, managed automatically by the 10-Plane Harness MemoryArena.
cache_dirstr | NoneDirectory to store model weights offline. Defaults to ~/.cache/slm-task-planner/. Also settable via SLM_TASK_PLANNER_CACHE_DIR.
n_threadsint | 4CPU thread count for 10-Plane Harness inference (auto-tuned to physical P-cores). Optimize for CPU core count. Also settable via SLM_TASK_PLANNER_N_THREADS.

Methods

Method SignatureReturn TypeDescription
build_plan(goal_text, system_prompt=None, user_input=None)dictDecomposes a high-level goal query string into a sequence of executable dependency steps.

Method Parameters (Execution Customization)

All main execution methods accept optional system routing parameters:

ParameterType / DefaultDescription
system_promptstr | NoneOptional custom system prompt instruction to override the default system template response parameters.
user_inputstr | NoneOptional additional user-supplied target text variables or contextual keys.

Quick Start

from slm_task_planner import SLMTaskPlanner

planner = SLMTaskPlanner()
plan = planner.build_plan(
    "Extract stats 1 from PDF",
    system_prompt="Limit plan depth to 3 steps maximum",
    user_input="Target PDF name: budget.pdf"
)
print(plan)

Environment Variables

Configure agent parameters globally using environment values:

Environment VariableDefaultPurpose
SLM_TASK_PLANNER_N_THREADS4Sets CPU inference execution threads.
SLM_TASK_PLANNER_CACHE_DIR~/.cache/slm-task-planner/Default directory to store local GGUF (Q4_K_M) and quantized INT4/INT8 model weights (shared with ~/.slm_harness/models).

CPU Performance Tuning

To run the SLMTaskPlanner engine efficiently on CPU under 1.5 GB memory footprint:

  • Match Threads to Core Count: Set n_threads or SLM_TASK_PLANNER_N_THREADS to match the physical CPU core count.
  • Sequential Processing: Avoid concurrent processing when batch files are large.
  • Garbage Collection: Clear variables and run gc.collect() to release model RAM blocks after execution.

Verified Input & Output Logs

Diagnostic execution console response running locally on CPU:

→ INPUT (Goal):
"Extract stats 1 from PDF"

← OUTPUT (Plan):
{
  'goal': 'Extract stats 1 from PDF',
  'tasks': [{'step': 1, 'task': 'Extract layout & tabular data from document', 'assigned_agent': 'SLMPDFChat / SLMDocumentParser'}],
  'total_steps': 1
}