Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/core / AgentOpts

Interface: AgentOpts<S>

Defined in: packages/core/src/engine/ctx.ts:285

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/src/engine/ctx.ts:286
approach?stringApproach slug entering approachSig, normalized by the engine (DEF-3).packages/core/src/engine/ctx.ts:336
cache?CachePolicyThe prompt-cache policy for THIS call (RV2006); wins over profile and engine.packages/core/src/engine/ctx.ts:342
effort?EffortCanonical effort, part of identity.packages/core/src/engine/ctx.ts:302
escalation?EscalationOptionsOpt-in; without it 'escalated' is physically unproducible.packages/core/src/engine/ctx.ts:326
estCost?numberAdmission reserve hint (USD).packages/core/src/engine/ctx.ts:338
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/src/engine/ctx.ts:320
isolation?IsolationSpecThe RESOLVED value enters identity; worktree needs defaults.isolation.packages/core/src/engine/ctx.ts:308
key?stringExplicit discriminator; replaces the prompt in the content key.packages/core/src/engine/ctx.ts:310
label?stringTelemetry only.packages/core/src/engine/ctx.ts:346
limits?UsageLimitsMerged over profile and engine limits.packages/core/src/engine/ctx.ts:340
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/src/engine/ctx.ts:334
memoizeOutcome?booleanJournaled as a policy field from day one; consumed by the M2 predicate.packages/core/src/engine/ctx.ts:324
model?ModelSpecOverrides all roles at once.packages/core/src/engine/ctx.ts:298
onError?"throw" | "null"-packages/core/src/engine/ctx.ts:312
replay?"cache" | "never"Per-call replay mode; default scoped forward-matching.packages/core/src/engine/ctx.ts:322
result?"full" | "value"-packages/core/src/engine/ctx.ts:343
retry?RetryPolicyTransport RetryPolicy under the journal (M4-T05).packages/core/src/engine/ctx.ts:314
role?"loop" | "orchestrate" | "plan" | "synthesize"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, and the orchestrator's post-fan-in synthesis invocation (RV-211) runs as 'synthesize'; extract/finalize/summarize stay trigger-derived and are never settable here (M6-T05 amendment).packages/core/src/engine/ctx.ts:296
routing?Partial<Record<InvocationRole, ModelSpec>>Per-role, wins over profile.routing.packages/core/src/engine/ctx.ts:300
schema?SschemaHash enters identity.packages/core/src/engine/ctx.ts:304
stream?booleanEnables agent:stream delta events.packages/core/src/engine/ctx.ts:348
tools?ToolsOptiontoolsetHash enters identity; wins over profile.tools.packages/core/src/engine/ctx.ts:306