Let's Strands Decider our Role-Playing Game A developer built a sample role-playing game that uses Strands Decider, a small decision model from Strands Labs, to let an AI Game Master act on confident answers and ask the player when unsure. The model returns a typed answer with a confidence score in a few hundred milliseconds on a laptop, and the app compares that score against a developer-set threshold (0.8 in the sample) to decide whether to commit, ask the player, or route to a specialist agent. If you build agents that call tools, you can let them act when they're sure and ask when they're not. That is the job Strands Decider https://github.com/strands-labs/strands-decider does. It is a small decision model that answers a typed question yes/no, pick one, or a score in a few hundred milliseconds on a laptop. re:Using our Once Upon Agentic AI Series' Articles https://dev.to/thewitcherish/series/46409 , let's play with Strands Decider to give our AI Game Master three useful reactions: commit to an answer, ask the player first, or pick the right specialist agent before answering. You need a terminal and uv https://docs.astral.sh/uv/getting-started/installation/ , the Python package and project manager. No uv yet? Its install page has a one-line installer for macOS, Linux and Windows, and uv fetches the right Python for you. Clone the sample, install its dependencies, and start the model server: git clone https://github.com/TheWitcherish/sample-strands-decider-rpg cd sample-strands-decider-rpg uv sync terminal 1: the model server leave it running export DECIDER MODEL=StrandsAgents/strands-decider-2B-qwen3.5-v1-2610 uv run --extra decider strands-decider serve "$DECIDER MODEL" --port 8000 The first start installs the model runtime and downloads about 4 GB of model weights, and it runs on Apple silicon, an NVIDIA GPU, or CPU. It is ready when it prints Uvicorn running on http://127.0.0.1:8000 . Leave that terminal open, open a second terminal in the same folder for every command below, and stop the server with Ctrl+C when you are done. Model identifiers change, so check the current one in the Strands Decider README https://github.com/strands-labs/strands-decider . Every once-upon-strands-decider command below sends its question to this server, and --say lets you put your own words in your character's mouth. First, a word on the bar. Strands Decider hands back an answer and a confidence between 0 and 1 ; whether your app acts on that answer is your call, not the model's. The bar is the confidence your code requires before it acts, and you, the developer, set it: the model never sees it. In this sample it is one constant, CONFIDENCE BAR = 0.8 in engine.py , and --bar overrides it for a run. Above the bar, the AI Game Master acts on the answer; below it, it asks the player. Chapter 1 asks one yes/no question: does the action need a perception check, a roll to notice something? This is the whole decision, from chapters.py : CH1 Q: Final = YesNoQuestion key="needs check", instructions="Does the adventurer's action call for a perception check, a roll to notice?", criteria={ "true": "The adventurer actively stops, looks, listens or heads toward the sound", "false": "The adventurer chooses to ignore the sound and carries on without looking", }, acted = answer.confidence = bar The criteria say what counts as yes and as no. The routing is one line: acted = answer.confidence = bar . Strands Decider never rolls the dice. It only answers whether a roll is needed; the d6 is a few lines of plain Python with a seed, so the same run always rolls the same number. Run it in the second terminal and guess first: will the AI Game Master roll, or ask you? uv run once-upon-strands-decider chapter 1 adventurer : "Wait, what was that? I stop and look toward the sound." decider : needs check - yes p yes=0.929 evidence : perception check - needs 4+; the d6 shows 3 confidence : 0.857 bar 0.80 - ACTED speed : 1 round trip s , 180 ms on strands-decider-2B-qwen3.5-v1-2610 The d6 lands short of the number. Something big steps out of the brambles, and it saw you first: a bramblehoot, a bear with an owl's face. Face to Beak: It tilts its head all the way sideways and hoots. You decide that was hello. Stopping to look is clearly a check: the model answers yes at 0.857 , clears the bar, and the d6 rolls. A 3 misses the 4+, and TheWitcherish meets a creature he has never seen before. The bramblehoot is right in front of him now, so he tries the friendliest thing he knows: uv run once-upon-strands-decider chapter 1 \ --say "The bramblehoot is right in front of me. I slowly offer it a sip of my coffee." adventurer : "The bramblehoot is right in front of me. I slowly offer it a sip of my coffee." decider : needs check - no p yes=0.470 confidence : 0.060 bar 0.80 - HELD BACK speed : 1 round trip s , 178 ms on strands-decider-2B-qwen3.5-v1-2610 The AI Game Master pauses. Roll or no roll -- too close to call, so the dice go to you. Offering coffee to a bear is neither looking for the sound nor ignoring it, so neither criterion fits. The model says exactly that: p yes=0.470 , almost a coin flip, and a confidence of 0.060 . The AI Game Master asks the player instead of guessing. That is a quiet superpower for your own app: when an input falls outside the cases you described, the confidence drops instead of the model confidently picking a side. For a yes/no answer the sample turns the probability into a confidence with |2p - 1| : 0 is a coin flip, 1 is certain. The answer is not the permission, so pick the bar by what a wrong call costs. The project reports that on tasks it has never seen, answers at 0.9 or more are right about 95% of the time, and on the independent JevBench https://github.com/fstandhartinger/jevbench benchmark the gap between its stated confidence and how often it is actually right averages 0.072 . The sample uses 0.8 because a wrong call in a game costs a story beat, not a refund; add --bar 0.9 to any command for the stricter rule. The bramblehoot is still sniffing TheWitcherish's coffee when a Wizard steps out of the trees with three tools: a rulebook that answers over HTTP, a shell, and a quill that writes files. Before going any further, TheWitcherish wants to know what he just met. One choice question picks the tool: uv run once-upon-strands-decider chapter 2 adventurer : "What is a bramblehoot, and is it friendly? Look it up in the rulebook." decider : tool - http request confidence : 0.978 bar 0.80 - ACTED speed : 1 round trip s , 176 ms on strands-decider-2B-qwen3.5-v1-2610 The rulebook glows and answers: bramblehoots are gentle, curious, and follow anyone who carries coffee. The Scholar's Edge: You walk on with a new friend at your side. It walks on with its nose in your coffee. The rulebook wins at 0.978 , so it runs. Now TheWitcherish asks for two things at once, and the Wizard only allows one tool per request: uv run once-upon-strands-decider chapter 2 \ --say "Look up bramblehoots and write it all down on a scroll for later." adventurer : "Look up bramblehoots and write it all down on a scroll for later." decider : tool - file editor confidence : 0.310 bar 0.80 - HELD BACK speed : 1 round trip s , 246 ms on strands-decider-2B-qwen3.5-v1-2610 The AI Game Master pauses. Which tool, though -- too close to call, so the dice go to you. The request needs both the rulebook and the quill. The model leans to the quill, but only at 0.310 , so no tool runs and the AI Game Master asks which one comes first. Picking a tool and being sure enough to run it are two decisions; in your own app, that is the difference between asking "which file?" and running a command on a guess. Chapters 3 and 4 are in the repo too, with a dice tool and magic portals. The story picks up at chapter 5, where that coffee-loving bramblehoot comes in handy. The dragon lands on the bridge, the bramblehoot at TheWitcherish's side. The AI Game Master is an orchestrator here: in the workshop it reaches two specialist agents through an A2A agent-to-agent client tool, a Rules Agent that knows how the game works and a Character Agent that knows the party and what it carries. It is the same orchestrator-and-specialists shape as the agents as tools https://strandsagents.com/docs/user-guide/sdk/multi-agent/agents-as-tools/ pattern in Strands Agents. Each specialist call is a full model call of its own, so the orchestrator's first decision is which one, if any, it needs before answering the player. That decision is one choice question for Strands Decider, with three options: rules agent , character agent , or no agent for plain talk the AI Game Master can answer directly. Here is the routing idea in four lines; chapters.py wires the same logic into the story: answer = decide player message, WHICH SPECIALIST one Strands Decider call, ~200 ms if answer.confidence < bar: return ask player unsure: no specialist is called return call answer.choice rules agent, character agent or no agent In this sample the specialists' replies are scripted narration; the choice of which one to call comes from the real model. Guess first: which specialist does a daring leap need? uv run once-upon-strands-decider chapter 5 adventurer : "Can I leap from the bridge onto the dragon's back?" decider : specialist - rules agent confidence : 0.866 bar 0.80 - ACTED speed : 1 round trip s , 214 ms on strands-decider-2B-qwen3.5-v1-2610 The AI Game Master calls the Rules Agent, then comes back to you with the ruling: a leap that far needs a roll. By the Book: You decide the dragon's back can wait. The dragon looks quietly relieved. A leap is a rules question, and the model is sure at 0.866 , so the AI Game Master calls the Rules Agent only and comes back to TheWitcherish with the ruling. The Character Agent never runs. Now the trade the bramblehoot has been hoping for: uv run once-upon-strands-decider chapter 5 \ --say "I offer the dragon a cup of my coffee in exchange for safe passage." adventurer : "I offer the dragon a cup of my coffee in exchange for safe passage." decider : specialist - character agent confidence : 0.195 bar 0.80 - HELD BACK speed : 1 round trip s , 199 ms on strands-decider-2B-qwen3.5-v1-2610 The AI Game Master pauses. Which specialist to call -- too close to call, so the dice go to you. It leans toward the Character Agent, but only at 0.195 . Fair: the trade needs a rule is a bargain with a dragon binding? and the party sheet is there coffee left? , so no single specialist is a safe pick. The AI Game Master goes back to the player before calling anyone, instead of spending a specialist call on a guess. In your own orchestrator, that is one decision of about 200 ms in front of the agents you already have: call the one the request needs, skip the ones it does not, and ask the user when the request does not clearly belong to any of them. The game is a thin layer over one HTTP call to the server you started POST /v1/systemone : a state and typed questions in, typed answers out , so your own code can make the same call from any language. Here is the most common guard for an agent: before it runs a tool, check that the arguments came from the user. The user asked about the weekend without naming a city, and the agent wants to call get weather city="Paris" : curl -s localhost:8000/v1/systemone -H 'content-type: application/json' -d '{ "state": "User: \"What will the weather be like this weekend?\"\nProposed tool call: get weather city=\"Paris\" ", "questions": {"args from user": {"type": "noul", "instructions": "Does every argument of the proposed tool call come from what the user said?", "criteria": {"true": "Each argument value is stated in, or clearly implied by, the user message", "false": "At least one argument value was invented: the user never gave it"}}}}' {"model":"strands-decider-2B-qwen3.5-v1-2610","answers":{"args from user":{"type":"noul","noul":0.6652}},"usage":{"input tokens":122,"output tokens":1},"latency ms":222.35} A yes/no question is type noul , and its answer is one probability that the statement is true. Your code turns it into a confidence and checks your bar, three lines in any language: p = response "answers" "args from user" "noul" 0.6652, from the JSON above confidence = abs 2 p - 1 0.330 run the tool = p = 0.5 and confidence = 0.8 False: ask the user which city The model leaned the wrong way, but at a confidence of 0.330 the tool never runs and the agent asks which city instead. Put "in Paris" in the user's message and the same request returns 0.9435 , a confidence of 0.887 : the call goes through. One output token, about 200 ms on my laptop, nothing leaving your machine. Where it fits in your own code: score its weakest shape on rubrics unlike its training data, so test it on your own rubric before you rely on it. A choice question takes its options as a criteria map of names to descriptions, and its answer already carries a confidence ; a score question takes a list ordered from low to high. The sample's decider.py builds all three request shapes. The worked Strands Agents example https://github.com/strands-labs/strands-decider/tree/main/examples/strands applies this same guard inside an agent, asking for a missing city rather than guessing one. Before you trust a bar on real traffic, collect 20 to 50 decisions from your app with known answers and check that the high-confidence ones really are right more often; a benchmark score does not prove reliability on your own workload. Which decision in your own app would benefit most from knowing when the model is unsure?