How strands-labs/strands-decider works
Strands Decider is a compact decision model for answering typed questions about supplied state, returning option probabilities and calibrated confidence rather than generated text. The main workflow is request validation, prompt rendering, model scoring, and typed answer readout, exposed through a CLI or HTTP server. A second major branch prepares and trains the model; synthetic-data generation and evaluation support that lifecycle. Source-index references and README statements support the shown links; unsampled subsystem internals are represented only where the tree or README establishes the capability.
Main entry points: infer.py Inference engine · cli.py CLI · train.py Model training · schema.py Request schema
Components 23
Inference runtime
- Request schema
src/strands_decider/schema.py - Prompt renderer
src/strands_decider/prompting.py - Inference engine
src/strands_decider/infer.py - Decision model
src/strands_decider/modeling.py - MPS kernels
src/strands_decider/mps_kernels.py
Data and training
- Data recipes
src/strands_decider/data/recipes.py - Example format
src/strands_decider/data/format.py - Multistep data
src/strands_decider/data/multistep.py - Synthetic data
src/strands_decider/data/synth.py - Synthetic pairs
src/strands_decider/data/synth_pairs.py - Document generation
data/generators/gen_documents_openrouter.py - LLM client
data/generators/llm_client.py - Batch collator
src/strands_decider/data/collate.py - Data sampling
src/strands_decider/data/sampling.py - Distributed training
src/strands_decider/distributed.py - Model training
src/strands_decider/train.py
Evaluation and export
- Evaluation
src/strands_decider/evaluate.py - HF export
src/strands_decider/hf_export.py - Benchmark tools
evaluation/bench_local.py
Other components
- Model user
- LLM provider
Connections 31
- Model user → CLI: asks via
README.md - Model user → HTTP API: sends request
README.md - CLI → Inference engine: loads and evaluates
src/strands_decider/cli.py - CLI → Request schema: builds questions
src/strands_decider/cli.py - CLI → Data recipes: builds data
src/strands_decider/cli.py - CLI → Model training: starts training
src/strands_decider/cli.py - CLI → Evaluation: runs evaluation
src/strands_decider/cli.py - CLI → HTTP API: starts server
src/strands_decider/cli.py - HTTP API → Request schema: validates request
src/strands_decider/server.py - HTTP API → Inference engine: evaluates request
src/strands_decider/server.py - Inference engine → Request schema: reads typed request
src/strands_decider/infer.py - Inference engine → Prompt renderer: renders questions
src/strands_decider/infer.py - Inference engine → Decision model: scores options
src/strands_decider/infer.py - Inference engine → MPS kernels: installs on MPS
src/strands_decider/infer.py - Inference engine → Request schema: returns typed answers
src/strands_decider/infer.py - Data recipes → Example format: uses example format
src/strands_decider/data/recipes.py - Multistep data → Example format: uses example format
src/strands_decider/data/multistep.py - Document generation → LLM client: calls client
data/generators/gen_documents_openrouter.py - LLM client → LLM provider: sends completions
- Batch collator → Example format: batches examples
src/strands_decider/data/collate.py - Batch collator → Prompt renderer: renders training prompts
src/strands_decider/data/collate.py - Data sampling → Example format: samples examples
src/strands_decider/data/sampling.py - Model training → Batch collator: batches training data
src/strands_decider/train.py - Model training → Data sampling: uses sampler
src/strands_decider/train.py - Model training → Distributed training: coordinates workers
src/strands_decider/train.py - Model training → Decision model: optimizes model
src/strands_decider/train.py - Evaluation → Batch collator: batches evaluation data
src/strands_decider/evaluate.py - Evaluation → Decision model: scores predictions
src/strands_decider/evaluate.py - Benchmark tools → Inference engine: runs local inference
evaluation/bench_local.py - Benchmark tools → Request schema: uses question types
evaluation/bench_local.py - HF export → Decision model: exports model
src/strands_decider/hf_export.py