Conversation Manager
Decision-plane component that materializes the Run Context from an inbound invokeAgent envelope.
The first component on the Decision plane — receives invokeAgent and materializes the RunContext the rest of the runtime threads through.
- invokeAgent envelope (see API Contracts)
- Session state from prior turns of the same session_id
- Channel adapter signals (typing indicators, attachments, locale hints)
- Pinned pack registry handle for context_pack_refs[] resolution
- Materialized RunContext (run_id, trace_id, session_id, tenant_id, user, agent, safety_mode, run_budget)
- Normalized event stream consumed by Perception in the Cognitive Core
- Session checkpoint after every Critic verdict in long_running mode
- receive
- normalize
- resolve
- materialize
- hand-off
- InvokeAgent
- RunContext
- SessionCheckpoint
The Conversation Manager is the first component on the Decision plane. It receives an invokeAgent envelope from the channel surface and produces the materialized RunContext the rest of the runtime threads through.
Definition
A stateful component that owns one session’s worth of envelopes: it materializes a fresh RunContext per request, tracks streaming state for mode: "stream", persists checkpoints for mode: "long_running", and emits typed session-state envelopes that the Compiler consumes.
Why it exists
Every plane downstream assumes a Run Context that already carries identity, tenant, safety mode, and budget. Without this component there is no single owner of “what is true at the start of this turn.” It also normalizes channel quirks (chat / email / voice / API) so the Compiler sees one shape.
Inputs
invokeAgentenvelope — see API Contracts- Session state from prior turns of the same
session_id - Channel adapter signals (typing indicators, attachments, locale hints)
- Pinned pack registry handle for
context_pack_refs[]resolution
Outputs
- Materialized
RunContext(run_id,trace_id,session_id,tenant_id,user,agent,safety_mode,run_budget) - Normalized event stream consumed by Perception in the Cognitive Core
- Session checkpoint after every Critic verdict in
long_runningmode
How it works
- Validates the envelope against the API contract; rejects unpinned
context_pack_refs[]. - Resolves channel-specific normalization (e.g., voice ASR transcript → text +
confidence). - Generates
run_id; threads inboundtrace.trace_idandsession_idinto the newRunContext. - Pulls prior session state (if
session_idpresent) and stitches it intoevents[]for Perception. - Hands control to the Context Pack Compiler.
Channel-aware input
The Conversation Manager owns channel-specific normalization so the Compiler always sees one shape. Channels are first-class typed inputs, not transport details.
| Channel | Normalized event | Channel-specific signals |
|---|---|---|
app_chat | text_message | typing indicators, attachments, user role hints |
email | text_message | sender domain, threading headers, multipart attachments |
voice | text_message + confidence | ASR transcript with per-token confidence, speaker turn boundaries |
api | structured_request | direct typed payload from a service-to-service call |
webhook | event_envelope | source signature, delivery attempt counter |
sms | text_message | E.164 number, carrier metadata |
Properties
- Each channel’s adapter normalizes into the shared event shape but preserves the channel-specific signals on
event.metadata.channel.*for downstream layers (Attention can up-rank attachments; Critic can require higher confidence on voice transcripts). - The
RunContext.user.delegation.scopesmay differ by channel; the Conversation Manager re-validates that the channel’s scopes cover the intent’s required permissions before handing off. - Channel-specific failure modes (e.g., truncated ASR) surface as typed
event.warnings[]the planner can act on.
Failure modes
- Envelope missing required fields — rejected with structured error before any plane runs.
- Channel normalization drops attachment hashes — caught by the evidence-coverage assertion later.
- Session resume against a different pack version than the original turn — refuse with
pack_version_mismatch. - Streaming back-pressure causing dropped events — mitigated by per-stream buffer with explicit
truncatedflag.
Operational concerns
- p50 / p99 latency budget for envelope acceptance, separate from the Compiler budget.
- Per-tenant rate limits at acceptance, not at the Compiler.
- Long-running session storage cost and TTL banded by
data_classification. - Audit log of every accepted and rejected envelope.
Evaluation metrics
- Envelope-acceptance latency.
- Rejected-envelope rate by reason.
- Session-resume success rate.
- Trace-context propagation rate (target: 100%).