Steps
- Define the typed contract for System One decisions (route enums, safety booleans).
- Place the Decision Model before tool calls and LLM invocations.
- If the decision is “simple/safe”, return without System Two.
- If “complex/allowed”, forward context + decision to the LLM.
- Log
decision + confidence for audit — not only the LLM reply.
decision = system_one.decide(context, question="Is this tool call safe?", type="boolean")
if not decision.answer:
return deny(decision.probability)
return system_two.complete(prompt)