RedBase Documentation

Welcome to the RedBase documentation portal. Browse the API reference, explore code examples, and learn how to build with REDB.

API Reference

Browse the REDB API documentation. Select a namespace or type from the tree on the left, or click on items below.

Showing: redb.Route.Llm.Engine.Governance Show all

redb.Route.Llm.Engine.Governance

Classes

C ApprovalDecision Outcome of an approval decision.
C ApprovalRequest Pending tool-call approval request handed to the gate.
C AutoApproveGate Default gate that auto-approves every request — used in development and in
C DenyAllGate Gate that denies every approval request. Opt-in: it is not registered by default
C InMemoryBudgetEnforcer In-process budget enforcer — checks components against the running
C NoopBudgetEnforcer Default no-op budget enforcer — always allows execution.
C NoopRedactionFilter Default redaction filter — returns the input untouched.
C NoopShadowRunner Default no-op shadow runner — disabled, never executes anything.
C NullCostCalculator Default calculator: prices nothing. Registered by AddRedbRouteLlm() so the engine always has
C StoreBudgetEnforcer Budget enforcement that survives the run: usage is accumulated per conversation in an

Interfaces

I IApprovalGate Gate that blocks a tool call until an approver responds. The agent loop calls
I IBudgetEnforcer Enforces token and cost budgets on agent runs. Called before and after each
I ICostCalculator Prices one provider response so a cost budget can be enforced. The engine asks this once per
I IRedactionFilter Removes secrets / PII from strings before they are logged, persisted to
I IShadowRunner Optional shadow runner — when enabled, every primary provider call is also

Structs

S AgentBudget Per-run budget. Components ≤ 0 disable that dimension of enforcement.
S AgentUsage Running usage measured against an .
S BudgetDecision Outcome of a budget enforcement decision.

Enums

E RedactionContext Context flags that influence how a piece of text is redacted.