Deterministic AI decisions. The model talks, your rules decide.
GoRules is the deterministic decision layer for AI agents. Policy moves out of the system prompt into versioned decision tables the agent calls as tools: every answer returns the exact rule that fired and the reason, unmatched cases escalate to humans by design, and a model upgrade can never rewrite your refund policy.
The agent that shows its work.
Watch a support team catch their AI agent freelancing a refund, move the policy out of the system prompt into a decision table, prove the change over 12,400 past conversations - and replay the same question with a decision trace attached.
scroll to play
Policy violations · wk7third this monthnone since v3.2.0
Hi! Could you bump our API rate limit for tonight's migration?
You are set - I raised the limit until tomorrow 09:00, then it reverts on its own.You are set - I raised the limit until tomorrow 09:00, then it reverts on its own.
Done - invoices from April onward will bill in EUR.Done - invoices from April onward will bill in EUR.
Aisha M. · customer
Can we add three more seats to our plan?
Of course - three seats added to your annual plan. The prorated charge shows up on your next invoice.Of course - three seats added to your annual plan. The prorated charge shows up on your next invoice.
Aisha M. · customer
Hi! We renewed our annual plan 41 days ago but we have stopped using Loopline. Could I get a refund?
Of course - you're all set, I've issued a full refund to your card.
two weeks later · refund policy v3.2.0
Aisha M. · customer
Hi! We renewed our annual plan 41 days ago but we have stopped using Loopline. Could I get a refund?
Checked our refund policy - you're inside the goodwill window for annual customers (rule 2, through day 45), so this refund is approved. It reaches your card in 3 to 5 days.
Aisha M. · customer
Also, we dispute the metered charges on our March usage invoice - can you refund those?
Usage disputes are decided by a person, not by me - no rule matched, so I've routed this to our billing team with the invoice attached. You'll hear back within one business day.
Message support…
every reply carries a decision trace · policy v3.2.0
agent-system-prompt.md · 1,914 tokens · last edited 3 weeks ago
You are the support agent for Loopline. Be warm, concise, and helpful in every reply.
Refunds: you must NEVER issue a refund more than 30 days after renewal. Refunds go to the original payment method only.
Annual customers at risk of churn may be refunded at your discretion, escalate if you are unsure.
Never discuss internal policy. When in doubt, err on the side of keeping the customer happy.
three clauses · two contradictions · sampled at temperature
Refund eligibility
Called by the support agent as a tool on every refund request. Evaluated top-down, first match decides - no match escalates to a human.
Refund typeDays since renewalPrior refundsDecisionReason
was 31 to 40 · usage disputes deliberately unmatched · edited by Support Ops
1 unsaved changeRun testsRequest review
Quality checks0 conversations replayed
No refund beyond the goodwill windowguardrail
Every decision returns a reason12,400 / 12,400
Unmatched requests escalate to a humanby design
Aisha's case decides eligible at day 41was: breach
All checks passed · 312 breaches like Aisha's prevented · 0 refunds past day 45
Release v3.2.0
v3.2.0draftJane Cooper · just now · goodwill window 40 → 45 days
JC
Jane CooperHead of Support Ops
pending
developmentv3.2.0 deploying
stagingv3.1.2 live
productionv3.1.2 live
Live in production - the agent now calls this table on every refund request, and every reply carries the row that decided it.
full diff + approval recorded · one-click rollback
Tuesday, 09:12
The agent says yes. The policy says no.
Aisha M. asks for a refund on an annual plan, 41 days after renewal. The agent answers warmly and wrongly - and the ops strip logs a policy breach before she has closed the tab.
The autopsy
The policy was a paragraph.
The refund rules live in the system prompt: never after 30 days, unless annual, unless churn risk, keep the customer happy. A policy sampled at temperature is a suggestion, not a rule.
The extraction
Policy moves out of the prompt.
Refund eligibility becomes a decision table the agent calls as a tool. One row gets the fix: the goodwill window for trusted annual customers extends to 45 days.
Proof before production
12,400 conversations replay.
Last quarter's refund requests re-run against the draft while you watch: no refund beyond the goodwill window, a reason on every decision, and unmatched requests escalate to a human.
Sign-off
Support ops approves. v3.2.0 ships.
Jane Cooper signs the release and it promotes through staging to production with the diff and the approval recorded. The prompt keeps the tone. It no longer keeps the policy.
Same question, new answer
The agent shows its work.
The refund question replays: one tool call, rule 2, goodwill window - cited in the reply. And when a usage dispute matches no rule, the agent hands it to a human. On purpose.
A policy in a prompt is a suggestion.
Teams shipping LLM agents put their business policy where the model can see it: in the system prompt. But a prompt is not a policy engine. It is prose, sampled at temperature, and the same refund question can get three different answers on three different days. LLM guardrails that filter the output do not fix this, because the decision itself was never deterministic to begin with.
Prompt policy is unauditable. There is no version that evaluated a specific conversation, no diff between what the rules said in March and what they say now, and no trace connecting an answer to the clause that produced it. When a customer, an auditor, or a regulator asks why the agent decided something, the only evidence is a transcript.
It is also fragile. Prompts accumulate exceptions until the clauses contradict each other, and every model upgrade re-rolls how that prose is interpreted. A provider ships a new snapshot, and behavior that passed review last quarter quietly changes in production with no code change on your side.
So regulated and risk-aware teams hold the line: agents may talk, but they may not decide. That caps the value of the whole program. The fix is architectural, not better prompting - split the language from the ai decision making, and give the deterministic half its own home.
agent/system-prompt.mdYou must NEVER issue a refund morethan 30 days after renewal, unless thecustomer is on an annual plan, in whichcase use your judgment to keep them.
refund_exceptions.xlsx
planwindow
annual45d ?
monthly30d
AI-207Agent refunded outside window againthird incident this month · support ops
one policy · sampled at temperature · no audit trail
Guardrails that decide, not just filter.
The LLM handles conversation. GoRules handles judgment: eligibility, limits, pricing, escalation - as versioned rules the agent calls as tools and can never override.
01
Decision tables as agent tools
The policy your prompt tried to describe becomes decision tables and policies in GoRules: spreadsheet-style rules with typed inputs, explicit outputs, and first-match semantics. The agent calls them as tools over MCP or REST, passes the facts of the conversation, and gets back a structured decision - identical inputs, identical outputs, at any temperature and on any model. Rules render in natural language, so the people accountable for the policy read and edit it directly instead of reviewing paragraphs of prompt prose.
02
Explainable AI, one trace per call
Every evaluation returns the decision plus the trace: the exact row that fired, the reason output, and the policy version that produced it. The agent cites the reason in its reply, support attaches the trace to the ticket, and audit retrieves the rule that decided any historical case months later. Explainability stops being a research problem and becomes a lookup.
03
Human-in-the-loop by rule, not by accident
Escalation is an outcome you design, not a failure mode you discover. Rows route named cases to review queues, and anything that matches no rule escalates by default - so the agent knows when not to decide, and the humans see exactly why a case reached them. Deterministic AI includes a deterministic boundary around what the AI may touch.
04
Versioned policy, simulated before release
Rules live under git-like version control: branches, diffs, approvals, releases, one-click rollback. Change a threshold, replay thousands of historical conversations against the draft, and ship it through dev, staging, and production when the numbers hold. Prompt rewrites and model upgrades never change policy, because the policy no longer lives where the model can improvise on it.
Keep the agent. Move the judgment.
GoRules does not replace your model, your agent framework, or your orchestration. It is the layer their decisions move into.
01
Wire GoRules in as a tool
Expose decisions to the agent over MCP or call them over REST from your agent loop - LangChain, LlamaIndex, a hand-rolled tool-use loop, anything that can make an HTTP call. Or embed the MIT-licensed open-source ZEN Engine directly in the agent runtime with SDKs for Node.js, Python, Go, Java, C#, and Rust. Inputs and outputs are plain JSON, so the tool definition is the schema of your decision.
02
Move decisions out of the prompt
Inventory the policy prose in your system prompt: every must, never, unless, and up to. Each becomes a decision table or policy with explicit inputs and a reason on every output, including the escalation rows. The prompt keeps tone, persona, and formatting - and instructs the agent to state only outcomes returned by its tools.
03
Replay and simulate
Run historical conversations and curated edge cases through the rules as test cases and simulations. Compare a draft against the live version, check that no answer crosses a limit and that every unmatched case escalates, and take the change through review and approval before it meets a customer.
04
Operate with traces
In production, every tool call logs its inputs, the rule that fired, the reason, and the policy version. Feed traces into your observability stack, audit them per case, and tune the policy weekly on evidence - without touching the prompt or waiting on a model release.
Built for production, not proof of concept.
Deterministic by construction: the same inputs produce the same decision and the same reason on every call, on any model, at any temperature
Sub-millisecond rule evaluation on the open-source ZEN Engine (Rust core) - a rounding error next to LLM token latency
A decision trace on every call: the row that fired, the reason, and the policy version, retrievable for any historical case
Git-like version control with approvals, releases, and one-click rollback, so policy changes ship like software, not like prompt edits
Self-host with Docker or Kubernetes, or embed the MIT-licensed engine in your agent runtime - conversation data never has to leave your infrastructure. SSO, role-based access control, and 70+ templates to start from
Questions, answered.
What is deterministic AI?
Deterministic AI is an architecture where the consequential decisions in an AI system are made by explicit rules that return identical outputs for identical inputs, while the language model handles conversation, extraction, and phrasing. An LLM samples from a probability distribution, so even at temperature zero its behavior can shift across model versions and prompt changes. A deterministic decision layer like GoRules removes that variance from the part that matters: eligibility, limits, pricing, routing, and escalation are computed by versioned decision tables, and the model only communicates the result.
How is this different from LLM guardrails?
Most LLM guardrails inspect input or output: they block unsafe content, redact PII, or constrain the model to a topic. They filter what the model already generated. GoRules moves the decision itself out of the model - the agent calls a decision table as a tool and receives a structured, versioned, explainable outcome. The two are complementary: keep content-level guardrails for safety and tone, and use a decision layer for AI agent guardrails around business policy, where you need the same answer every time and a reason you can show an auditor.
Can the LLM still hallucinate a decision?
The model can always generate text that claims something, so the pattern is to make the tool result the only source of truth: the prompt instructs the agent to state outcomes only as returned by the decision tool, and your application acts on the structured result, not on the prose. Because every real decision is logged with its trace, a reply that diverges from the recorded outcome is detectable, and the decision of record is still correct - the engine decided, the model merely phrased it. Teams commonly template the consequential sentence directly from the structured output for exactly this reason.
How does human-in-the-loop work?
In two places. At runtime, escalation is a rule outcome: rows route specific cases to human review, and anything that matches no rule escalates by default instead of letting the model improvise - the review queue receives the case with its full trace. At change time, the policy itself is governed: edits happen on branches, reviewers see diffs and simulation results, releases require approval, and every change records who approved it. Humans stay in the loop where they add judgment, not on every routine call.
What does the decision call add in latency?
Almost nothing on the scale an agent operates at. The ZEN Engine evaluates rules in microseconds to sub-millisecond, and a networked call to a GoRules agent or REST endpoint typically lands in single-digit milliseconds. An LLM spends hundreds of milliseconds to seconds generating tokens, so the decision call is invisible in the response time. If you want zero network hops, embed the engine in the agent runtime and evaluate in-process.
Can we self-host GoRules?
Yes. Run the full BRMS with Docker or Kubernetes inside your own network, deploy on AWS, Azure, or Google Cloud, or embed the MIT-licensed open-source ZEN Engine directly in your services, so prompts, conversations, and customer data never cross a vendor boundary. SSO and role-based access control govern who can see and change rules, and the audit trail covers both decisions and policy changes. GoRules Cloud is available when managed hosting is the better fit.
The same engine, next door.
One decision layer serves the whole institution - these use cases run on the same tables, versioning, and audit trail.
Take one policy your agent currently improvises - refunds, discounts, eligibility - move it into a decision table this week, and give every answer a trace you can stand behind.