Skip to content

Reference: configuration

Status: Implemented in v0.1. Stability: experimental.

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

Runtime (createAgentRuntime)

OptionTypeDefaultNotes
registryCapabilityRegistry— (required)
policiesAgentPolicy[][]Evaluated in order, before per-capability meta.policies
approvals.coordinatorApprovalCoordinatorin-memoryDev/test default; production supplies persistent impl
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, onSinkError }noneNo sink = no audit persistence; docs warn loudly
audit.strictbooleanfalseAwait capability.started before execution; fail with AUDIT_UNAVAILABLE
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.approvalExpiresInMsnumber900_000Overridable per capability (meta.approval.expiresInMs) and per decision (requireApproval({ expiresInMs }))
now() => Datesystem clockInjected for deterministic tests

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

FieldDefaultGoverns
expose— (required; absent surface = denied)SI-1
sideEffect, risk— (required)Policy targeting, retry eligibility
timeoutMsruntime defaultStage 10
retry.maxAttempts0Stage 11 retries (eligibility per SI-11)
retry.backoffMs250Exponential base
idempotentfalseWrite-retry eligibility
approval.requiredfalseStatic stage-8 gate
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
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)
filternoneUX narrowing, not authorization (SI-2)
toolNaming._Collision ⇒ startup error

createMCPServer(runtime, options)adapters/mcp.md

OptionDefault
createContext— (required)Session → { actor, context }
serverInfo{ name: "orpc-agent", version: pkg }
filter, toolNamingas above

createOpenTelemetryTracing(options?)adapters/opentelemetry.md

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

createAgentTestRuntime(options)adapters/testing.md

OptionDefault
registry— (required)
policies[]
approvalsapprovalProbe()Or "auto-approve" / "auto-reject"
actorfakeActor()Per-call override allowed
context{}Per-call override allowed
overrides{}Record<capabilityId, handler> — stub procedure handlers
clocktestClock()Drives now, expirations

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.