decider-triage

A support agent where a 2B decision model makes the calls and the LLM only writes text.

#strands-decider-2b#policy

View on GitHub

Drop spam early
No LLM call for messages a human never needs to see.
Policy in code
The model returns numbers. Thresholds are plain Python you can read and test.
Grounded tool calls
A reusable guard stops the agent guessing an order ID before it refunds.

How a message flows

flowchart TD
    M([Customer message]) --> T{{"Decider 2B: 1 call, 5 questions"}}
    T --> P["TriagePolicy (plain Python thresholds)"]
    P -->|spam, confident| D["DROP: 0 LLM calls"]
    P -->|human asked / outage / critical / unsure| E["ESCALATE: human queue"]
    P -->|routine| C["AGENT_CHEAP: small Bedrock model"]
    P -->|money or complex| S["AGENT_STRONG: stronger Bedrock model"]
    C --> G
    S --> G
    G{{"GroundingGuard (Decider 2B) before issue_refund"}}
    G -->|grounded| OK["Proceed"]
    G -->|guessed| GU["Guide: ask the customer for the order ID"]
    G -->|decider down| DN["Deny"]

Real results (laptop CPU, real Decider 2B)

SplitCorrect
Dev (24 messages, before the "severe" question)19 / 24 · 79.2%
Held-out test (30 messages, run once)24 / 30 · 80.0%

20 LLM calls with routing vs 30 if everything went to the strong model. Decider p50 is about 14 s on my laptop CPU; official numbers are about 115 ms on an RTX 3090. Spam dropping is weak (1 of 4), the policy prefers a human over a wrong drop.

Reuse the pattern

from triage_agent.decider_client import DeciderClient
from triage_agent.decision_pattern import GroundingGuard

guard = GroundingGuard(DeciderClient(), tools={"issue_refund"})
agent = Agent(model=..., tools=[issue_refund], interventions=[guard])

Built for the Agent Experience Hackathon: Strands Decider. MIT License.