DEV Community

Cover image for The safety of agents should never be done at the cost of speed or vice versa. Cerbere is the two
Christopher dikesa
Christopher dikesa

Posted on

The safety of agents should never be done at the cost of speed or vice versa. Cerbere is the two

Most guardrails have only one layer: a model that guesses if a prompt is nasty. 19ms to 120ms, and many false positives.

Cerberus is 3 layers:

  1. Layer 1 - Rules / Regex: 0.87ms

It's the determinist guardrail. If the action is prohibited, it is blocked net. No guess, no latency. This is where we do 0.34ms in heat.

  1. Layer 2 - ML: 251ms

For cases that the rules do not cover. The model classifies the risk of the action.

  1. Layer 3 - LLM Judge: 362ms

Only for ambiguous cases. It's slow, but it's rare. We only pay the price of the LLM when we really need it.

Result: 95% of the actions are decided in <1ms, and really hard cases have a real judge.

We don't filter words. We control actions, with the right layer at the right time.

Code + bench: https://github.com/chrismsmr-celcom/cerbere-AG

Top comments (0)