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
Show all
redb.Route.Llm
Classes
| LlmCallbackOptions | Configuration for . |
| LlmCallbackProcessor | Processes inbound webhook callbacks from async-batch LLM APIs (Anthropic |
| LlmComponent | LLM transport component for redb.Route. |
| LlmConnectionFactory | Connection factory configuration for the LLM connector. Register in the route |
| LlmConsumer | LLM consumer. Fires the connection factory on a fixed interval and pushes |
| LlmEndpoint | LLM endpoint. The URI host is interpreted as the connection-factory name. |
| LlmEndpointOptions | Typed options for . Bound from URI query parameters via reflection. |
| LlmHeaders | Header keys used by the LLM connector. All keys are lowercase to match |
| LlmKeys | Property keys placed on IExchange.Properties by the LLM connector |
| LlmProducer | LLM producer. Treats the inbound exchange as a single user turn, runs the |
Enums
| LlmStreamMode | How an llm: step streams (stream=). |
redb.Route.Llm.Abstractions.Tools
Classes
| DelegateToolClaimsSource | Claims source backed by a delegate — the seam for deployments that resolve claims from their own |
| ExchangePrincipalClaimsSource | Default : the claims of the caller an exchange came from. |
| ExposeAsLlmToolAttribute | Marks a class, method, or route definition as exposable to an LLM as a tool. |
| LlmToolCapability | Capability descriptor for a tool exposed to the LLM. The engine projects the |
| LlmToolSafety | Governance metadata attached to every . These are declarations: |
| ToolDescriptorRegistry | Default in-memory . |
| ToolResultErrors | Model-facing tool_result error codes: what a tool call that could not execute reports back |
| ToolSkipReasons | Stable SkipReason values the engine reports to IAgentObserver when a tool call is |
Interfaces
| ILlmToolDescriptor | A tool exposable to the LLM. Implementations are declarative — they carry the |
| IToolClaimsSource | Resolves the claims held by the principal of an agent run. The engine consults it before |
| IToolDescriptorRegistry | Registry of tool descriptors available to the agent engine. Resolved by name at dispatch time. |
Enums
| ToolCachingPolicy | Result-caching policy for . Enforced for read-only tools: the engine |
| ToolCostClass | Cost class hint for budget-aware scheduling. Reserved — budgets are computed from |
| ToolSideEffect | Side-effect classification declared by a tool author. Read by the engine for two decisions: a tool |
redb.Route.Llm.Embeddings
Classes
| EmbedComponent | Embedding transport. Scheme: embed. Producer-only, symmetric with |
| EmbedEndpoint | Embedding endpoint. URI path = connection-factory name. |
| EmbedEndpointOptions | Options for an embed:// endpoint. |
| EmbedProducer | Embedding producer: embeds the exchange body and writes the vector(s) to |
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 |
redb.Route.Llm.Expressions
Classes
| LlmConversationContext | Snapshot of the current conversation visible to the |
| LlmExpressionKeys | Well-known exchange property keys used by the LLM expression integration. |
| LlmExpressionResolverSetup | Registers \({conversation.*}</code> and <code>\){tool.*} resolvers with |
| LlmToolContext | Snapshot of the tool currently being dispatched, visible to the |
redb.Route.Llm.Extensions
Classes
| LlmCallBuilder | Builder for the inline step. |
| LlmRouteDefinitionExtensions | Inline LLM step for . Pure syntactic sugar over |
| LlmServiceCollectionExtensions | Extension methods for registering the LLM transport, governance defaults |
| LlmToolBuilderDefinition | Metadata builder for . Collects the tool capability |
| LlmToolDsl | Apache-Camel-style DSL aspect that registers the current route as an |
redb.Route.Llm.Fluent
Classes
| Llm | Fluent API for LLM endpoints. |
| LlmBuilder | Fluent builder for LLM endpoint URIs. |
redb.Route.Llm.Knowledge
Classes
| KnowledgeChunker | Deterministic character-window chunker: fixed chunkChars |
| KnowledgeComponent | Ingest transport for the knowledge base. Scheme: knowledge. |
| KnowledgeEndpoint | Knowledge ingest endpoint. URI path = collection name. |
| KnowledgeEndpointOptions | Options for a knowledge:// endpoint (URI query auto-binds by name). |
| KnowledgeProducer | Ingest producer: chunks the exchange body, (optionally) embeds, and upserts |
| KnowledgeRetrievalDsl | DSL step that retrieves top-K knowledge chunks for the current message and |
| KnowledgeRetrievalOptions | Options for the step. |
redb.Route.Llm.Mcp
Classes
| McpComponent | MCP component. Scheme: mcp. Endpoint URI: mcp://serverName/toolName. |
| McpDiscoveryService | Hosted service that brings up registered MCP servers, runs the |
| McpEndpoint | MCP endpoint — a single (server, tool) coordinate. Producer-only. |
| McpEndpointOptions | Endpoint options for the mcp:// scheme. The URI parser maps |
| McpException | Thrown when an MCP server returns a JSON-RPC error, the transport fails, |
| McpProducer | MCP producer — translates an exchange into an MCP tools/call RPC. |
| McpRegistry | Default in-memory thread-safe . |
| McpRestartPolicy | Restart policy for an MCP stdio server. |
| McpSafetyOverride | Per-tool safety override. The first matching wins. |
| McpServerOptions | Configuration for a single MCP server entry. Built via |
| McpServerOptionsBuilder | Mutable builder for . |
| McpServiceCollectionExtensions | DI registration helpers for redb.Route.Llm.Mcp. |
| McpToolDescriptor | backed by a remote MCP tool. Capability built once |
Interfaces
| IMcpClient | Transport-agnostic MCP client. Implementations spawn / hold the connection, |
| IMcpRegistry | Registry of singletons keyed by server name. |
Enums
| McpClientStatus | Health state of an . Surfaced by |
redb.Route.Llm.Mcp.Protocol
Classes
| CallToolResult | Result of tools/call. |
| InitializeResult | Result of the initialize handshake. |
| JsonRpcError | JSON-RPC error object. |
| JsonRpcNotification | JSON-RPC 2.0 server-initiated notification (no response expected). |
| JsonRpcRequest | JSON-RPC 2.0 request envelope. |
| JsonRpcResponse | JSON-RPC 2.0 response envelope. |
| ListToolsResult | Result of tools/list. |
| McpClientBase | Shared client logic: per-id registry, |
| McpProtocol | MCP protocol DTOs and JSON-RPC envelope types. Pinned to MCP protocol version |
| ServerInfo | Server identification block returned during initialize. |
| ToolDefinition | One tool entry as returned by tools/list. |
redb.Route.Llm.Mcp.Transport
Classes
| HttpSseMcpClient | HTTP + SSE transport. POSTs JSON-RPC requests to the base URL, opens a parallel |
| McpTransport | Configuration for an MCP server transport. Built via |
| StdioMcpClient | Stdio transport — spawns an external process, exchanges newline-delimited |
Enums
| McpTransportKind | Transport flavor for an MCP server. |
redb.Route.Llm.Providers
Classes
| AnthropicProvider | Transport for Anthropic's Messages API (POST {baseUrl}/v1/messages). |
| LlmContentBlock | Base type for content blocks (text, tool-use, tool-result, thinking). |
| LlmHttpErrors | Turns a failed HTTP response into the right provider exception. One place, because the |
| LlmMessage | Single message in the conversation transcript sent to the provider. |
| LlmRateLimitException | Provider signalled rate limiting (HTTP 429). Distinct from |
| LlmRequest | Single completion request sent to a provider. |
| LlmResponse | Single completion response from a provider. |
| LlmStreamChunk | Single chunk yielded by . Non-final chunks have = |
| LlmTextBlock | Plain text block. |
| LlmThinkingBlock | Thinking / reasoning block returned by a provider that exposes its chain of thought — |
| LlmTimeoutException | A limit of the call to the model ran out (). |
| LlmToolResultBlock | Tool-result block sent back to the assistant on the next turn. |
| LlmToolUseBlock | Tool-use block emitted by the assistant — engine must dispatch the tool and |
| LlmTransientException | Transient provider failure that is safe to retry (HTTP 5xx, Anthropic's |
| LlmUsage | Token usage reported by the provider. |
| OpenAiEmbeddingProvider | Transport for any OpenAI-compatible embeddings endpoint |
| OpenAiProvider | Transport for any OpenAI-compatible Chat Completions endpoint |
| OpenAiTranscriptionProvider | Transport for any OpenAI-compatible speech endpoint |
| ReplayProvider | Deterministic backed by a JSON fixture on disk. |
| StubProvider | Deterministic provider for tests, demos, and Phase-0 smoke. Echoes the last |
Interfaces
| IEmbeddingProvider | Pure transport over an embeddings API — turns text into vectors. The sibling |
| ILlmProvider | Pure transport abstraction over an LLM API. Implementations are responsible |
| ITranscriptionProvider | Pure transport over a speech-to-text API — turns recorded audio into text. The |
Structs
| AnthropicModelProfile | Capability descriptor for an Anthropic model: which request fields the target |
| TranscriptionRequest | One recording to transcribe. |
| TranscriptionResult | What came back. |
Enums
| AnthropicModelTier | Contract generation of an Anthropic model, as it affects how a Messages-API |
| AnthropicSamplingPolicy | How the target model accepts the sampling knobs (temperature/top_p). |
| LlmStopReason | Reason the provider stopped generating. |
| LlmTimeoutKind | Which limit of a model call ran out. |
| ReplayMode | Mode for . |
redb.Route.Llm.Storage.Redb
Classes
| RedbApprovalStore | REDB-backed . One |
| RedbAuditObserver | REDB-backed that persists one |
| RedbBatchStore | REDB-backed . One row |
| RedbConversationStore | REDB-backed . Tree integrity is enforced by |
| RedbCostBudgetStore | REDB-backed . One |
| RedbEvalRunStore | REDB-backed . One |
| RedbKnowledgeStore | REDB-backed . One row per chunk; every chunk |
| RedbPromptTemplateRegistry | REDB-backed . One |
| RedbToolIdempotencyStore | REDB-backed . Reservations are tracked by a |
| RedbToolResultCache | REDB-backed . Cache entries are keyed on the |
redb.Route.Llm.Storage.Redb.Schemas
Classes
| ApprovalProps | Persisted decision from an IApprovalGate. The combination of |
| ConversationProps | Root record of a single LLM conversation. Top-level scalar fields are |
| CostBudgetProps | Running cost / token totals scoped to a conversation. One row per |
| EvalIterationMetric | Per-iteration metric inside an run. |
| EvalRunProps | A persisted eval-harness run. Scenario / fingerprint / score are top-level |
| KnowledgeChunkProps | Marker scheme for embedding-backed knowledge chunks. Intentionally |
| LlmBatchProps | A submitted async-batch job tracked by . |
| MessageContentBlock | Typed nested representation of an LlmContentBlock. Discriminated |
| MessageProps | A single message node within a conversation tree. Persisted as a |
| PromptTemplateProps | A versioned prompt template. (, ) |
| ToolAuditProps | One row per tool invocation, written by the audit observer. The scheme is built around the dimension... |
| ToolCacheProps | Cached deterministic tool output. The key is built by Tools/ToolCacheKey.StoreKey and shaped |
| ToolIdempotencyProps | Persisted tool-call idempotency record. Distinct from |
redb.Route.Llm.Telemetry
Classes
| LlmMetrics | LLM-specific counters and histograms. Published on the same shared meter |
redb.Route.Llm.Tools
Classes
| HttpFetchDsl | DSL extension that wires an HTTP-GET fetcher into a route step. Reads |
| HttpFetchOptions | Configuration for . Defaults are conservative so |
| HttpFetchTool | Standalone RouteBuilder wrapper that mounts |
| JsonPathDsl | DSL extension that wires a JsonPath query into a route step. Reads |
| JsonPathOptions | Configuration for . |
| JsonPathTool | Standalone RouteBuilder wrapper that mounts |
| KnowledgeSearchDsl | DSL step that answers a knowledge_search tool call: reads |
| KnowledgeSearchOptions | Options for the knowledge_search LLM tool / step. |
| KnowledgeSearchTool | Self-contained RouteBuilder that mounts knowledge_search as an |
| LlmTool | Homeless static builder for . Use when the |
| LlmToolStaticBuilder | Fluent builder produced by . Call |
| MathEvalDsl | DSL extension that wires an expression evaluator into a route step. Reads |
| MathEvalOptions | Configuration for . |
| MathEvalTool | Standalone RouteBuilder wrapper that mounts |
| RegexExtractDsl | DSL extension that wires a regex-extraction step into a route. Reads |
| RegexExtractOptions | Configuration for . |
| RegexExtractTool | Standalone RouteBuilder wrapper that mounts |
| RouteToolBridge | Bridges a fixed redb.Route endpoint into the LLM tool surface as an |
| TavilyWebSearchDsl | DSL extension that wires a Tavily (https://tavily.com/) web-search call |
| TavilyWebSearchOptions | Configuration for . |
| TavilyWebSearchTool | Standalone RouteBuilder wrapper that mounts |
| XPathDsl | DSL extension that wires an XPath query into a route step. Reads |
| XPathOptions | Configuration for . |
| XPathTool | Standalone RouteBuilder wrapper that mounts |
redb.Route.Llm.Transcription
Classes
| SttComponent | Speech-to-text transport. Scheme: stt. Producer-only, symmetric with |
| SttEndpoint | Speech-to-text endpoint. URI path = connection-factory name. |
| SttEndpointOptions | Options for an stt:// endpoint. |
| SttProducer | Speech-to-text producer: transcribes the exchange body and writes the recognised |