Skip to content

Reference: configuration

Single page for every knob, its default, and where it applies. Precedence for overlapping settings: call site > capability meta > runtime defaults.

Runtime (createAgentRuntime)

OptionTypeDefaultNotes
governanceAgentGovernance— (required)The governed surface as one declared value: defineGovernance({ registry, policies }), the only accepted form. Runtime-level policies evaluate in order, before per-capability meta.policies
approvals.coordinatorApprovalCoordinatorin-memoryDev/test default; production supplies a persistent impl (@orpc-agent/postgres provides the reference)
approvals.handler(req) => Promise<ApprovalDecision | undefined>Inline mode; deciding requests never suspend; returning undefined defers that request to the coordinator flow (ADR-006 addendum)
approvals.rejectSelfApprovalbooleantrueSI-4; disable only with a documented reason
auditsink | sink[] | { sinks, strict, verbose, onSinkError }noneNo sink = no audit persistence (@orpc-agent/postgres provides the reference sink)
audit.strictbooleanfalseAwait capability.started before execution; fail with AUDIT_UNAVAILABLE
audit.verbosebooleanfalseAdds catalog-sized payloads — today, capabilityIds on capabilities.discovered
tracingTracingAdapterno-op@orpc-agent/opentelemetry provides one
defaults.timeoutMsnumber30_000Per-execution ceiling; capability timeoutMs overrides
defaults.policyTimeoutMsnumber5_000Per policy-evaluation batch; exceeding ⇒ POLICY_FAILED (deny)
defaults.policyConcurrencynumber16Capabilities whose discovery-phase policy batches evaluate at once; within one capability, order and the shared batch deadline are unchanged
defaults.discoveryBudgetMsnumber30_000Ceiling on a whole describe, not one batch; expiry throws TIMEOUT @ discovery rather than returning a short catalog
defaults.approvalExpiresInMsnumber900_000Overridable per capability (meta.approval.expiresInMs) and per decision (requireApproval({ expiresInMs })). 15 min suits present-human confirmation; raise it for dashboard-latency approvals or requests expire before anyone sees them
now() => Datesystem clockInjected for deterministic tests

Startup warnings cannot be muted, and there is no flag for it. Two fire: approval-gated capabilities on the restart-amnesiac default coordinator, and write-capable capabilities on model surfaces with no audit sink. Each marks a decision left implicit, and each is answered by making it — name approvals.coordinator (createInMemoryApprovalCoordinator() is a legitimate answer) or name an audit sink (audit: () => {} states deliberately that nothing is recorded). Neither is ever fatal.

Capability meta (summary; full page: metadata.md)

FieldDefaultGoverns
description— (required)Model-facing usage text; the adapters' tool description
expose— (required; absent surface = denied)SI-1
sideEffect, risk— (required)Policy targeting, retry eligibility
tags[]Policy targeting, and what describe's scope.tags matches (untagged matches no tags scope)
timeoutMsruntime defaultStage 10
retry.maxAttempts0Stage 11 retries (eligibility per SI-11)
retry.backoffMs250Exponential base
idempotentfalseWrite-retry eligibility
approval.requiredfalseStatic stage-8 gate
approval.typenoneMerged into the approval request's types
approval.expiresInMsruntime default
redact.outputidentityStage 13
redact.approvalInputidentityApproval UI display
policies[]After runtime-level policies
adapters.*.toolNameid with ._Naming only

Invocation options (invoke / describe / resume)

OptionDefaultNotes
actor— (required)Authenticated identity; never model-derived (SI-3)
context— (required)The app's oRPC context
scope (describe only)none{ tags?, ids? } — narrows before discovery policies run (semantics)
surface"direct"Adapters hardcode theirs
signalnoneComposed with timeout at stage 10
correlationIdnoneThreads run/conversation ids through events and spans

Adapter options

toAISDKTools(runtime, options)adapters/ai-sdk.md

OptionDefault
actor, context— (required)Bound per tool set (build per request)
scopenoneForwarded to describe: decides what gets discovered
filternoneDecides what survives discovery. Neither is authorization (SI-2)
toolNaming._Collision ⇒ startup error
signalnoneComposed into every invocation, alongside the loop's per-call abort

createMCPServer(runtime, options)adapters/mcp.md

OptionDefault
createContext— (required)Session → { actor, context }; refusing the session is the only anonymous default
serverInfo{ name: "orpc-agent", version: pkg }
filter, toolNamingas above

No scope here: it is an AI SDK option only, because that adapter's caller composes per request while tools/list is protocol-driven (Q12).

createOpenTelemetryTracing(options?)adapters/opentelemetry.md

OptionDefault
tracertrace.getTracer("orpc-agent")
actorIdAttributefalseOff by default (SI-10-adjacent)

createPgApprovalCoordinator(options) / createPgAuditSink(options)adapters/postgres.md

OptionDefault
query— (required)(sql, params) => Promise<{ rows }> — the driver seam (ADR-013)
tableorpc_agent_approvals / orpc_agent_audit_eventsValidated identifier, optionally schema-qualified
now (coordinator)system clockDrives every expiry comparison
batch (sink)none{ size?: 50, flushMs?: 250 }; capability.started always writes through awaited

createAgentTestRuntime(options)adapters/testing.md

OptionDefault
registry— (required)Takes a registry and policies directly, unlike createAgentRuntime — a test runtime builds the governance for you
policies[]
approvalsapprovalProbe()Or "auto-approve" / "auto-reject", or a custom coordinator
actorfakeActor()Per-call override allowed
context{}Per-call override allowed
overrides{}Record<capabilityId, handler> — stub procedure handlers
clocktestClock()Drives now, expirations
tracingno-opFor adapter conformance suites that assert on spans

Environment

Nothing is read from environment variables. All configuration is explicit code — deliberate: governance settings should be reviewable in source control.

Independent community project — not affiliated with or endorsed by the oRPC maintainers.