Behavior and Personality Reference
See the accepted ranges and formulas below. Use the public resolvers to calculate effective values; the Studio Guide shows where to inspect them. The Studio new-draft defaults below are not a universal character preset.
Authored scheduling and render fields
| Field | Studio default | Validator domain | Meaning |
|---|---|---|---|
| behavior.enabled | true | boolean | Enables autonomous opportunities. |
| meanOpportunityIntervalMs | 30000 | 1000–3600000 ms | Authored mean opportunity spacing. |
| minimumIdleDurationMs | 5000 | 0–3600000 ms | Minimum idle gate. |
| postActionCooldownMs | 10000 | 0–3600000 ms | Completion cooldown gate. |
| opportunityIntervalJitterRatio | 0.25 | 0–1 | Variation in interval, not WHAT selection probability. |
| personality.* | 0.5 | finite 0–1 | Six independent normalized traits. |
| behavior.actionPreferences | 1 per editable action | finite 0–1 | Relative authored weight, not normalized probability. |
| render.anchor.x/y | 0.5 / 1 | 0–1 each | Image-relative normalized anchor. |
| render.defaultScale | 1 | finite positive | Relative rendering scale; consumer owns placement. |
Content resolves omitted optional fields. Timing values use milliseconds. Increasing an action weight does not remove an idle or cooldown requirement.
Exact current trait mappings
The following formulas explain the current trait mappings. A value of 0.5 is neutral.
| Trait | Current mapped concern | Factor at 0 / 0.5 / 1 |
|---|---|---|
| caution | Activation WHAT mass, factor = 1.5 − caution | 1.5 / 1 / 0.5 |
| assertiveness | Opportunity rate scale = 0.5 + assertiveness | 0.5 / 1 / 1.5 |
| curiosity | Unfamiliar target factor = 0.5 + curiosity | 0.5 / 1 / 1.5 |
| persistence | Repeat-target factor = 0.5 + persistence | 0.5 / 1 / 1.5 |
| sociability | Inert in these three mappers | No factor |
| playfulness | Inert in these three mappers | No factor |
The documented WHAT mapper leaves visit mass unchanged. The target mapper applies curiosity only to unfamiliar targets and persistence only to repeat targets. Familiar non-repeat targets are neutral in this mapper. Sociability and playfulness have no direct effect in these three V1 mappers.
For the public scheduling resolver, effective mean interval = authored mean / rate scale, clamped to 1000–3600000 ms. Enabled, minimum idle, completion cooldown and jitter remain unchanged by this resolver. A 30000 ms authored interval resolves to 60000 ms for assertiveness 0, 30000 ms for 0.5, and 20000 ms for 1. The internal policy can include Motivation or AI contribution values. No AI model integration is currently provided. The public scheduling resolver takes only behavior and Personality.
Resolve WHAT and WHEN with public APIs
This example resolves weights for the two host actions and calculates the effective scheduling interval.
import { resolveCharacterActionSelectionPolicyV1 } from "@charaweave/action-policy";
import { resolveCharacterSchedulingPolicyV1 } from "@charaweave/scheduling-policy";
const personality = {
curiosity: 0.5, sociability: 0.5, assertiveness: 1,
caution: 1, persistence: 0.5, playfulness: 0.5,
};
const behavior = {
enabled: true, meanOpportunityIntervalMs: 30000,
minimumIdleDurationMs: 5000, postActionCooldownMs: 10000,
opportunityIntervalJitterRatio: 0.25,
};
const action = resolveCharacterActionSelectionPolicyV1({
actionPreferences: {
actionKindWeights: { "activate-host-surface": 1, "visit-host-surface": 1 },
},
personality,
});
const scheduling = resolveCharacterSchedulingPolicyV1({ behavior, personality });
if (!action.ok) throw Error(action.reason);
if (!scheduling.ok) throw Error(scheduling.reason);
console.log(action.policy.actionKindMasses);
// activate-host-surface: 0.5, visit-host-surface: 1
console.log(scheduling.policy.meanOpportunityIntervalMs); // 20000
The Public WHAT resolver accepts exactly the two Host action weights and six personality fields, plus optional personalization; it returns either {ok: true, policy} or {ok: false, reason}. Public WHEN accepts the exact five scheduling fields and six traits. Invalid numbers, unknown keys and incomplete required snapshots are errors. Report validation errors to the caller.
Personalization and context
Public ActionSelectionPersonalizationV1 from @charaweave/personalization is a type-only export. Optional actionKindMassOverrides replace selected effective masses after Personality; actionKindMassCaps then limit them. Values are finite non-negative numbers; maps are keyed by the two Host actions. This is not a persistent storage API.
The internal action policy resolver's order is base → Motivation → Personality → AI → personalization override → personalization cap → context suppression → context cap. Only Personality and optional personalization are composed by the Public WHAT resolver shown above. Do not interpret a positive effective mass as authorization to execute: capability, applicable targets, timing and ownership must still be satisfied.
Authored V10 Presentation Behavior stances are normal, calm and alert. Per-action suppression factors lie in 0–1. Studio default normal = 1/1, calm = 0.5/1, alert = 1/0.6 (activation/visit). These are draft defaults, not mandatory values for all packages. The active authored stance is not an idle/action/touch/recovery lifecycle lane.
Repetition, targets and session settings
Completed autonomous WHAT repetition is separate from target memory. The action repetition factors for streak 0/1/2/3+ are 1/0.70/0.45/0.30. Non-completed attempts do not change that streak. Target-memory policy is explicit on CoreSession and ConsumerSession creation:
| Field | Accepted domain | Example (not a default) |
|---|---|---|
| repeatTargetFactor | finite > 0 and ≤ 1 | 0.5 |
| recentTargetFactor | finite > 0 and ≤ 1 | 0.5 |
| seenTargetFactor | finite > 0 and ≤ 1 | 0.8 |
| recentCapacity | safe integer ≥ 0 | 8 |
| seenCapacity | safe integer ≥ 0 | 32 |
Use a factor of 1 when no suppression is intended, and choose finite capacities appropriate to the application. Target evidence, Personality contribution and action repetition are distinct inputs. Reset/dispose semantics are session-scoped, not persistent user personalization.
Interpret outcomes
- Check the loaded Content projection and authored repertoire.
- Check applicability, available targets, current ActivityOwnership and WHEN eligibility.
- Inspect effective mass and the actual weighted choice; zero mass is not missing capability.
- Observe the accepted terminal; do not count an attempted or cancelled action as completed.
- Compare a single changed parameter with a fixed scenario before trying combinations.
For the exact policy boundary see Runtime API Reference, Behavior Selection, Temporal Behavior and Terminal and Selection Dispositions.