Rulvar API reference / @rulvar/rulvar / AgentProfile
Interface: AgentProfile
Defined in: packages/core/dist/index.d.ts
The canonical, complete AgentProfile shape; M1 honors description, model, routing, effort, limits, and estCost. A profile never carries a prompt or a schema.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
cache? | CachePolicy | The prompt-cache policy layer (RV2006): call opts over this profile over the engine default; absent everywhere means 'auto' (hints on explicit-caching adapters, nothing anywhere else). | packages/core/dist/index.d.ts |
compaction? | { threshold?: number; } | Per-profile compaction threshold; default 0.8 of the loop model's contextWindow (M4-T03). Compaction is ON by default; history-processor plumbing stays engine-internal. The threshold is a fraction in (0, 1], validated at createEngine. | packages/core/dist/index.d.ts |
compaction.threshold? | number | - | packages/core/dist/index.d.ts |
countTokens? | "allow" | "deny" | The admission countTokens policy for this profile (RV1804): the pre-admission count probe is full-prompt provider egress billed to no invoice row. 'deny' forbids it for spawns of this profile (the flat reserve admits instead); wins over the engine-wide defaults.countTokens. Default: the engine default, else 'allow'. | packages/core/dist/index.d.ts |
description? | string | - | packages/core/dist/index.d.ts |
effort? | Effort | - | packages/core/dist/index.d.ts |
escalation? | EscalationOptions | Flavor B opt-in lives here or on the call. | packages/core/dist/index.d.ts |
estCost? | number | Admission reserve hint in USD (budget layer 1). | packages/core/dist/index.d.ts |
evidenceContract? | EvidenceContract | The declared evidence contract of the profile's task (RV303, the seventh comparison experiment; runtime enforcement RV507): how many evidence entries the spawned agent MUST record, and the declared call estimates behind them. Under the default enforce: 'warn' it is purely declarative, like estCost: preflightEstimate compares the resulting call floor (minEntries * estCallsPerEntry + overheadCalls, defaults 3 and 8) against the spawn's effective executed-call ceiling and warns tool-cap-below-evidence-floor when the cap cannot fit the contract. Under enforce: 'refuse' the floor additionally binds at the terminal: an ok settle with fewer successful record_evidence executions than minEntries becomes a typed error terminal. The experiment shape: 14 mandatory entries against an 84-call cap that two workers exhausted at 10 recorded entries. | packages/core/dist/index.d.ts |
isolation? | IsolationSpec | Isolation default; the RESOLVED value enters identity. | packages/core/dist/index.d.ts |
limits? | UsageLimits | - | packages/core/dist/index.d.ts |
model? | ModelSpec | - | packages/core/dist/index.d.ts |
permissions? | AgentProfilePermissions | Chain layers merged over engine defaults. | packages/core/dist/index.d.ts |
retry? | RetryPolicy | Transport RetryPolicy layer: call over profile over engine (M4-T05). | packages/core/dist/index.d.ts |
routing? | Partial<Record<InvocationRole, ModelSpec>> | - | packages/core/dist/index.d.ts |
taskClass? | string | Declared task class bridging ModelKnowledge; default unclassified (M4-T09). | packages/core/dist/index.d.ts |
tools? | ToolsOption | Toolset default; the resolved snapshot enters identity via toolsetHash. | packages/core/dist/index.d.ts |
toolsetAttestation? | ToolsetAttestation | The attested toolset pin (RV1514): when present, every spawn of this profile must resolve its toolset to EXACTLY this hash, or the spawn refuses typed before any provider call. Record the pin with attestToolset(); the per-tool hashes it records turn the refusal into a named diff. The pin binds the spawn's RESOLVED toolset, so call-level tool overrides and the opt-in escalate tool drift it by design. | packages/core/dist/index.d.ts |