14. Protocol Constants & Configuration
Constants are fixed by the specification. Configuration is per-agent and per-implementation. Both are normative — implementations MUST respect constants and SHOULD use the default configuration values unless the agent’s domain requires otherwise.
14.1 Protocol Constants
| Constant | Value | Notes |
|---|---|---|
| MAX_FRAME_SIZE | 1,048,576 bytes | Frames exceeding this MUST be rejected |
| HANDSHAKE_TIMEOUT | 10,000 ms | Inbound identification deadline |
| HEARTBEAT_INTERVAL | 5,000 ms | Default; configurable per implementation |
| HEARTBEAT_TIMEOUT | 15,000 ms | Default; configurable per implementation |
| STATE_SYNC_INTERVAL | 30,000 ms | Default periodic re-broadcast |
| WAKE_COOLDOWN | 300,000 ms | Default per-peer wake rate limit |
| PEER_RETENTION | 300 s | Stale peer eviction age |
| DNS-SD_SERVICE_TYPE | _sym._tcp | Service type for Bonjour discovery |
| DNS-SD_DOMAIN | local. | Discovery domain |
14.2 Agent Profiles
Each agent type has a pre-built configuration. The profile determines which CMB fields matter most (αf weights) and how long signals stay relevant (freshness window). New agent types join the mesh by defining their profile — no protocol changes needed.
| Profile | Best for | Freshness | Why this freshness |
|---|---|---|---|
| music | Music, ambience, soundscapes | 1,800s (30min) | Stale mood = wrong music. React fast. |
| coding | Coding assistants, dev tools | 7,200s (2hr) | Session context matters. Yesterday’s debugging doesn’t. |
| fitness | Fitness, health, movement | 10,800s (3hr) | Sedentary detection needs hours of context. |
| messaging | Chat, notifications, social | 3,600s (1hr) | Recent conversation context. Older messages lose relevance. |
| knowledge | News feeds, research, digests | 86,400s (24hr) | Daily cycle. Today’s news is relevant until tomorrow’s. |
| legal | Legal, compliance, contracts | 86,400s (24hr) | Regulatory deadlines don’t expire fast. |
| health | Health monitoring, clinical | 10,800s (3hr) | Patient state evolves over hours, not minutes. |
| finance | Finance, trading, compliance | 7,200s (2hr) | Market sessions. After-hours context fades. |
| uniform | General purpose, prototyping | 1,800s (30min) | No field preference. Good starting point. |
14.3 CAT7 Field Weights (αf)
Per-agent field weights control which CMB fields matter most for each agent type. Higher weight = this field has more influence on SVAF evaluation and remix relevance. The schema is fixed (7 fields). The weights are per-agent.
| Agent | foc | iss | int | mot | com | per | mood |
|---|---|---|---|---|---|---|---|
| Coding | 2 | 1.5 | 1.5 | 1 | 1.2 | 1 | 0.8 |
| Music | 1 | 0.8 | 0.8 | 0.8 | 0.8 | 1.2 | 2 |
| Fitness | 1.5 | 1.5 | 1 | 1.5 | 1 | 1 | 2 |
| Knowledge | 2 | 1.5 | 1.5 | 1 | 0.5 | 1.5 | 0.3 |
| Legal | 2 | 2 | 1.5 | 1 | 2 | 1.5 | 0.5 |
| Health | 1.5 | 2 | 1 | 1.5 | 1 | 1.5 | 2 |
| Finance | 2 | 2 | 1.5 | 1 | 2 | 2 | 0.3 |
Regulated domains (legal, finance): issue and commitment always high — risks and obligations are non-negotiable. Human-facing domains (music, fitness, health): mood always high — affect drives the experience.Knowledge domains (coding, research): focus always high — subject matter is core.
Custom weights: derive from your domain using these patterns. Implementations SHOULD expose field weights as configuration, not hardcode them.
14.4 SVAF Drift Thresholds
SVAF computes a totalDrift score (0–1) for each incoming memory. Three zones determine acceptance:
| Zone | Drift | Action | Default |
|---|---|---|---|
| Aligned | ≤ Tstable | Accepted, full blending | 0.25 |
| Guarded | Tstable < drift ≤ Tguarded | Accepted, attenuated blending | 0.50 |
| Rejected | > Tguarded | Discarded | — |
Defaults work for most agents. Override only with domain-specific reason: tighter thresholds for high-precision domains (legal, health), wider for exploratory domains (research, knowledge).
14.5 Mood vs Memory Thresholds
Mood and memory use different acceptance paths:
| Signal | Gate | Default | Why |
|---|---|---|---|
| Mood | Kuramoto coupling drift | 0.80 (permissive) | Affect crosses all domain boundaries |
| Memory | SVAF per-field drift | 0.50 (selective) | Memories are domain-specific |
14.6 Drift Formula
totalDrift = (1 - λ) × fieldDrift + λ × temporalDrift fieldDrift = Σ(α_f × δ_f) / Σ(α_f) temporalDrift = 1 - exp(-age / τ_freshness) λ = temporalLambda (default 0.3 = 70% content, 30% time)
At default settings (temporalLambda: 0.3, freshnessSeconds: 1800):
| Signal age | Temporal drift contribution |
|---|---|
| 1 minute | ~0.01 — negligible |
| 30 minutes | ~0.19 — noticeable |
| 2 hours | ~0.29 — likely pushes over threshold |