Skip to main content
Version: v0 (preview)

What is Kelhe Gate?

Kelhe Gate is a risk layer for autonomous agents. It scores every action your agent tries to take — a single number, 0 (safe) to 10 (dangerous) — using the real context of that action: the tool being called, its arguments, and the agent's live instructions. You set a threshold and decide whether to just watch or actually block.

from kelhe import Kelhe, Mode
from kelhe.adapters.openai_agents import guard
from agents import Agent

kelhe = Kelhe(api_key="sk_kelhe_...") # observe-only by default

def issue_refund(amount: int, customer: str) -> str:
"Issue a refund to a customer."
return f"refunded ${amount} to {customer}"

agent = Agent(
name="billing",
instructions="process approved customer refunds",
tools=[guard(kelhe, issue_refund)], # the only change
)
Preview

Kelhe is in active development (SDK v0.1). The API shown here is current but may change before the stable release.

The idea

  • One score. The engine returns a single risk score and a confidence — not a dashboard of dimensions. How the score is computed is Kelhe's job; you get the number and set the threshold.
  • Observe first, enforce when ready. In Observe mode Kelhe scores and logs every action but blocks nothing, so dropping it into a running system changes nothing until you trust it. Flip to Enforce to block risky actions or route them to a human.
  • One line per tool. A guard() wrapper for OpenAI Agents, LangGraph, CrewAI, and AutoGen. Your tool's behavior is unchanged.

Start here