
Running AWS Strands Decider 2B Locally: A Complete WSL2 Guide for Deterministic AI Routing
A complete guide to decoupling AI decision-making from generation by running AWS Strands Decider 2B locally on WSL2 for Multi-RAG architectures.
Modern Generative AI architectures frequently fall into a common trap: relying on massive, general-purpose LLMs to handle basic routing and decision-making.
When an AI agent needs to decide whether to fetch data from Jira, a PLM system, or Confluence, asking a standard LLM often leads to higher latency, unpredictable hallucinations, and wasted compute.
A cleaner, more robust approach is decoupling the decision layer from the generation layer. This is where AWS Strands Decider 2B shines. It is a lightweight model purpose-built for classification, routing, and workflow orchestration. Instead of generating open-ended text, it selects from predefined criteria and outputs a confidence score—making it the ideal traffic cop for Agentic AI and Multi-RAG setups.
Here is how to get this dedicated decision engine running locally on a Windows machine using WSL2.
Phase 1: Environment Provisioning
To run the model locally, you need a standard WSL2 Ubuntu environment with Python and essential build tools.
Launch your Ubuntu terminal and prepare the workspace:
1
2
3
4
5
6
7
8
9
10
# Update and install core dependencies
sudo apt update && sudo apt install -y python3 python3-pip python3-venv python3-dev build-essential gcc g++
# Initialize the project directory
mkdir -p /mnt/c/GENAI/strands && cd /mnt/c/GENAI/strands
# Spin up and activate a fresh virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip setuptools wheel
Phase 2: Model Acquisition & Serving
Strands Decider is hosted on Hugging Face. You will need to install the core package, authenticate with Hugging Face, and pull the specific 2B model weights.
1
2
3
4
5
6
# Install the core framework and Hugging Face hub
pip install strands-decider huggingface_hub
hf auth login
# Boot up the local inference server (downloads weights on first run)
strands-decider serve StrandsAgents/strands-decider-2B-hobson-v19 --device cpu
Once you see the Uvicorn success message, your local API is live at
[http://127.0.0.1:8000](http://127.0.0.1:8000).Phase 3: The Routing Architecture in Action
Strands Decider fundamentally changes how you prompt. Instead of asking for a text response, you format requests as specific decision types:
- Choice: Select one option from a defined list (Perfect for RAG routing).
- Noul: A strict binary True/False evaluation.
- Score: Rank an input against a predefined scale.
Here is how you implement a Multi-RAG router in Python. This script evaluates a user's prompt and routes it to the correct enterprise database based on the model's confidence score.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import requests
import json
def route_query(user_state):
payload = {
"state": user_state,
"questions": {
"target_database": {
"type": "choice",
"instructions": "Analyze the user state and select the best datasource.",
"criteria": {
"PLM": "Engineering changes and parts data",
"JIRA": "Issue tracking and bug reports",
"CONFLUENCE": "Internal documentation and wikis",
"UNKNOWN": "Query does not match available sources"
}
}
}
}
response = requests.post("http://127.0.0.1:8000/v1/systemone", json=payload).json()
decision = response["answers"]["target_database"]["choice"]
confidence = response["answers"]["target_database"]["confidence"]
print(f"Routing to: {decision} (Confidence: {confidence})")
return decision
# Test the router
route_query("User wants ECO information")
When you execute this, the model processes the context and definitively outputs
"PLM" with a high confidence metric (e.g., 0.94), bypassing the need to parse arbitrary LLM text.By injecting this lightweight decision layer right before your retrieval logic, you create AI applications that are significantly easier to debug, govern, and scale. You stop hoping the LLM will guess the right database, and instead mathematically enforce the correct workflow before generation even begins.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article