Skip to content

rulvar API reference


rulvar API reference / @rulvar/rulvar / AgentOpts

Interface: AgentOpts<S>

Defined in: packages/core/dist/index.d.ts

Per-spawn options. The identity split is normative: agentType, model/routing/effort (the requested modelSpec), schema (schemaHash), and key enter the content key; everything else is policy or telemetry and never re-keys entries. Fields whose machinery lands later (tools, isolation, escalation, lineage, ladder, retry) arrive with their milestones.

Type Parameters

Type ParameterDefault type
S extends SchemaSpecSchemaSpec

Properties

PropertyTypeDescriptionDefined in
agentType?string-packages/core/dist/index.d.ts
approach?stringApproach slug entering approachSig, normalized by the engine (DEF-3).packages/core/dist/index.d.ts
effort?EffortCanonical effort, part of identity.packages/core/dist/index.d.ts
escalation?EscalationOptionsOpt-in; without it 'escalated' is physically unproducible.packages/core/dist/index.d.ts
estCost?numberAdmission reserve hint (USD).packages/core/dist/index.d.ts
fallback?FallbackFieldThe degenerate fallback (M4-T04): an agent-level second attempt on model when the terminal matches on; one journaled decision entry; the fallback attempt is a NEW content key.packages/core/dist/index.d.ts
isolation?IsolationSpecThe RESOLVED value enters identity; worktree needs defaults.isolation.packages/core/dist/index.d.ts
key?stringExplicit discriminator; replaces the prompt in the content key.packages/core/dist/index.d.ts
label?stringTelemetry only.packages/core/dist/index.d.ts
limits?UsageLimitsMerged over profile and engine limits.packages/core/dist/index.d.ts
lineage?SpawnLineageOptLineage continuation (DEF-3): declares this spawn a rebirth of an existing logical task; absence means a new lineage root. Never enters the content key. Declaring lineage or approach journals a spawn-admission decision entry BEFORE dispatch, carrying the engine-minted LTID and the computed approach signature.packages/core/dist/index.d.ts
memoizeOutcome?booleanJournaled as a policy field from day one; consumed by the M2 predicate.packages/core/dist/index.d.ts
model?ModelSpecOverrides all roles at once.packages/core/dist/index.d.ts
onError?"null" | "throw"-packages/core/dist/index.d.ts
replay?"never" | "cache"Per-call replay mode; default scoped forward-matching.packages/core/dist/index.d.ts
result?"value" | "full"-packages/core/dist/index.d.ts
retry?RetryPolicyTransport RetryPolicy under the journal (M4-T05).packages/core/dist/index.d.ts
role?"orchestrate" | "plan" | "loop"The primary invocation role of the agent's tool loop; default 'loop'. The plan and orchestrate entry points set it so the resolution chain, role effort defaults, quality floors, and cost buckets see the right role; extract/finalize/summarize stay trigger-derived and are never settable here (M6-T05 amendment).packages/core/dist/index.d.ts
routing?Partial<Record<InvocationRole, ModelSpec>>Per-role, wins over profile.routing.packages/core/dist/index.d.ts
schema?SschemaHash enters identity.packages/core/dist/index.d.ts
stream?booleanEnables agent:stream delta events.packages/core/dist/index.d.ts
tools?ToolsOptiontoolsetHash enters identity; wins over profile.tools.packages/core/dist/index.d.ts