slm_search_orchestrator · Web & Search · 10-Plane Pure-CPU Agent

SLM Search Orchestrator

Local search planner that generates query variations, crawls web snippets, and filters/structures contexts offline using local neural reasoning.

01 / Overview & Capabilities

The SLM Search Orchestrator acts as a pre-retrieval query planner. It expands inputs into 3 targeted terms, crawls DuckDuckGo, and structures raw search snippets into clean markdown segments ready for RAG injection.

02 / Standalone OS Harness Installers, CLI & Python SDK

In SLMAgents 2.0, SLM Search Orchestrator 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_search_orchestrator + slm_harness + the ./slm CLI), install the full 26-agent desktop suite, or install via Python pip:

1. Individual SLM Search Orchestrator + 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-search-orchestrator
$ pip install -e ./slm_harness -e ./slm_search_orchestrator

# Option B: Run directly through the Unified 10-Plane Pure-CPU Harness CLI (./slm)
$ ./slm ask "Expand into 3 search queries and synthesize findings on CPU inference thread optimization"
$ ./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 Search Orchestrator 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 Search Orchestrator on Pure CPU
Plane 6 CascadeRouter (<35ms) Stage 2 (Multi-Query Research & Web Synthesis Intent) & Stage 3 (Embedding Margin)
Plane 2 & 5 MemoryArena & Hybrid CPU Runtime Specialist Role: primary (Qwen3-4B GGUF Q4_K_M) + reranker (bge-reranker-base INT8). 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 2 GBNF 3-Query Array Grammar + Plane 4 Cross-Encoder Reranking & URL Deduplication Verifier
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_search_orchestrator_workspace && cd slm_search_orchestrator_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_search_orchestrator
$ git sparse-checkout init --cone
$ git sparse-checkout set slm_harness slm_search_orchestrator

# 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_search_orchestrator or download the pre-packaged OS Harness Installer above.

🤖 Truly Agentic Pre-Retrieval Planning

The Search Orchestrator implements an offline planning logic:

  • Query Expansion: Automatically translates raw technical prompts into exactly 3 diverse query terms to cover synonyms and sub-topics.
  • Consolidation & De-duplication: Groups search result snippets, removing redundant links to reduce noise.
  • Off-Grid Fail-safe: Automatically switches to mock local data sources if internet connectivity is missing.

CPU Performance Tuning Guidelines

Follow these guidelines to optimize retrieval latency:

  • Result Throttling: Set max_results_per_query=2 (default) to limit snippet processing overhead on CPU threads.
  • In-Memory Keep-alive: The 10-Plane Harness MemoryArena automatically pins active GGUF and INT4/INT8 sessions in RAM with watermark LRU eviction.

Accuracy Improvement Tips

Tip for Query Expansion: Instruct the model to return a strict, parsable JSON array of strings (e.g. ["query_1", "query_2", "query_3"]) without conversational filler.
De-duplication: De-duplicate URLs before routing snippets to RAG models to avoid wasting context tokens on duplicate content.

05 / Configuration & API Reference

SLMSearchOrchestrator Initialization

from slm_search_orchestrator.search_orchestrator import SLMSearchOrchestrator

orchestrator = SLMSearchOrchestrator()
ParameterTypeDescription
model_pathstrLocal path to model weights.
system_promptstr | NoneOptional custom system prompt instructions overriding the default template.
user_inputstr | NoneOptional additional user-supplied target parameters or variables.

retrieve Method

Expands the query into 3 variations, scrapes search engines, and formats snippets. Include search inputs:

from slm_search_orchestrator.search_orchestrator import SLMSearchOrchestrator

orchestrator = SLMSearchOrchestrator()

# Run query planner and retrieval
result = orchestrator.retrieve("CPU inference thread optimization settings")
print(result)
Retrieved Search Results Output:
[
  {
    "title": "Configuring OMP_NUM_THREADS for CPU Inference",
    "href": "https://docs.slmagents.ai/cpu-threads",
    "body": "For optimal ONNX CPU inference, set OMP_NUM_THREADS to match the physical core count, disabling hyperthreading overhead."
  },
  {
    "title": "Optimizing Local SLM Performance on CPU",
    "href": "https://blog.slmagents.ai/slm-cpu-tuning",
    "body": "Small Language Models run highly efficiently on CPU by mapping threads to core boundaries, keeping memory allocations flat."
  }
]