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
Show all
redb.Route.Llm.Engine
Classes
| AgentEngine | Default implementation. Drives the tool-loop with |
| AgentRequest | Single agent execution request. Carries the user message, optional system prompt, |
| AgentResponse | Final agent response. |
| ToolHeaderPolicy | Decides which headers of the agent's exchange are visible to a tool route. |
Interfaces
| IAgentEngine | Drives the tool-loop: provider call → tool dispatch → provider call → ... until |
redb.Route.Llm.Engine.Eval
Classes
| LlmEvalCase | Declarative description of a single eval case. Combines the inputs the harness |
| LlmEvalResult | Outcome of a single evaluated case. |
| LlmEvalRunner | Drives a batch of through an , |
Structs
| LlmEvalCaseScore | Outcome of a custom scorer. Pass=false marks the case as failed regardless of |
redb.Route.Llm.Engine.Governance
Classes
| ApprovalDecision | Outcome of an approval decision. |
| ApprovalRequest | Pending tool-call approval request handed to the gate. |
| AutoApproveGate | Default gate that auto-approves every request — used in development and in |
| DenyAllGate | Gate that denies every approval request. Opt-in: it is not registered by default |
| InMemoryBudgetEnforcer | In-process budget enforcer — checks components against the running |
| NoopBudgetEnforcer | Default no-op budget enforcer — always allows execution. |
| NoopRedactionFilter | Default redaction filter — returns the input untouched. |
| NoopShadowRunner | Default no-op shadow runner — disabled, never executes anything. |
| NullCostCalculator | Default calculator: prices nothing. Registered by AddRedbRouteLlm() so the engine always has |
| StoreBudgetEnforcer | Budget enforcement that survives the run: usage is accumulated per conversation in an |
Interfaces
| IApprovalGate | Gate that blocks a tool call until an approver responds. The agent loop calls |
| IBudgetEnforcer | Enforces token and cost budgets on agent runs. Called before and after each |
| ICostCalculator | Prices one provider response so a cost budget can be enforced. The engine asks this once per |
| IRedactionFilter | Removes secrets / PII from strings before they are logged, persisted to |
| IShadowRunner | Optional shadow runner — when enabled, every primary provider call is also |
Structs
| AgentBudget | Per-run budget. Components ≤ 0 disable that dimension of enforcement. |
| AgentUsage | Running usage measured against an . |
| BudgetDecision | Outcome of a budget enforcement decision. |
Enums
| RedactionContext | Context flags that influence how a piece of text is redacted. |
redb.Route.Llm.Engine.Observability
Classes
| AgentDeltaContext | One piece of a streamed model call. |
| AgentIterationContext | Per-iteration snapshot — usage, stop reason, content shape. |
| AgentRunCompletedContext | Final state of an agent run. |
| AgentRunContext | Common identifiers passed to every observer call within one agent run. |
| AgentToolInvocationContext | Tool invocation outcome. |
| CompositeAgentObserver | Composite observer — fans out events to every registered . |
| NoopAgentObserver | Default observer — discards all events. |
Interfaces
| IAgentObserver | Receives lifecycle notifications about an agent run. Implementations are |
Enums
| AgentDeltaKind | What a streamed piece is. |
redb.Route.Llm.Engine.Storage
Classes
| ApprovalRecord | An approval decision joined with the request that triggered it. |
| BatchJobRecord | A persisted batch-submission record. |
| ConversationMessage | A persisted conversation message with its tree placement and metadata. |
| ConversationMessageMeta | Queryable metadata that lives on the message node — hoisted from |
| EvalIterationRecord | Per-iteration metric inside an . |
| EvalRunRecord | An evaluation run snapshot. |
| InMemoryApprovalStore | In-memory approval store — sufficient for tests and demos. |
| InMemoryBatchStore | In-memory — entries live only for the process lifetime. |
| InMemoryConversationStore | In-memory conversation store — suitable for unit tests and demos. |
| InMemoryCostBudgetStore | In-memory cost/token store. Replace with the redb-backed implementation in production. |
| InMemoryEvalRunStore | In-memory eval run store — used by unit tests; production swaps in the redb implementation. |
| InMemoryKnowledgeStore | In-memory knowledge store — does an O(N) cosine-similarity scan on every |
| InMemoryPromptTemplateRegistry | In-memory registry — registered templates live only for the process lifetime. |
| InMemoryToolCacheStore | In-memory tool cache. TTL is honoured lazily — entries are dropped on read. |
| InMemoryToolIdempotencyStore | In-memory idempotency store backed by a thin |
| KnowledgeChunk | A single embedded knowledge chunk. |
| KnowledgeSearchResult | A chunk returned by , with score. |
| PromptTemplate | A versioned prompt template. |
| ToolIdempotencyReservation | Outcome of . |
Interfaces
| IApprovalStore | Persists approval decisions for audit and replay. Every call answered by |
| IBatchStore | Tracks async-batch jobs submitted to LLM providers (Anthropic Message |
| IConversationStore | Persists conversation transcripts so that an agent run can be resumed, |
| ICostBudgetStore | Persists running cost / token usage per conversation so that an |
| IEvalRunStore | Persists the outcome of a recorded evaluation run. Used by the eval harness |
| IKnowledgeStore | Persists embedding-backed knowledge chunks for retrieval-augmented agent |
| IPromptTemplateRegistry | Resolves a named prompt template into the actual system / user text the |
| IToolCacheStore | Caches deterministic / read-only tool outputs by a content-hash key so repeated calls can skip |
| IToolIdempotencyStore | Tracks tool invocations so that retried or duplicated tool calls produce a |