# AlphaAvatar v0.6.6 Release Notes

### Highlights

AlphaAvatar v0.6.6 focuses on **improving user experience through stronger temporal consistency, longer-lived realtime perception, clearer runtime capability awareness, and cleaner session organization**.

This release extends the shared perception architecture into a unified **time-aligned multimodal runtime**. Video, audio, speech, transcription, direct user input, and media-source lifecycle events now share the same runtime clock and can be frozen into immutable perception snapshots with explicit start and end source states.

The Avatar model pipeline has also been reworked around provider-neutral `ModelInput`. Temporal alignment, visual selection, prompt rendering, and provider conversion now have clearly separated responsibilities. Current multimodal input is rendered as a structured timeline instead of injecting unrelated frames without temporal context.

ENV Memory now consumes both **continuous environmental audio and visual perception**, aligns them on the same timeline, and adaptively delays periodic memory boundaries while speech is still active.

v0.6.6 also adds **runtime capability awareness**. Internal capabilities such as memory, user profiling, speaker recognition, and face recognition can now describe themselves through framework-level capability metadata. The enabled capabilities are injected into the Avatar system prompt so the model understands what the current runtime can do without exposing internal components as callable tools.

Perception retention has also moved from fixed record counts toward **time-based capacity derived from actual producer cadence**. Video publish intervals and audio frame sizes now act as the source of truth for both realtime input and buffer sizing, making retention predictable even when sampling configuration changes.

Finally, session and time handling have been cleaned up substantially. Runtime synchronization time, application wall-clock time, and participant-facing time are now explicitly separated, while session data is grouped by creation date for easier navigation and maintenance.

### What's New

* Added a shared runtime time model:

  * Added `RuntimeClock`, `RuntimeTime`, and `RuntimeTimeRange` as the common temporal foundation across perception and output.
  * Runtime ordering, durations, cutoffs, and temporal alignment use monotonic time instead of user-facing timestamps.
  * Observations retain explicit time ranges rather than relying only on arrival order.
  * Perception source-state transitions use the same runtime clock as media observations.
  * Runtime cutoffs can atomically freeze an immutable perception boundary.
  * Start and end source states are retained so downstream consumers can distinguish historical evidence from currently available media.

* Separated runtime, application, and participant-facing time semantics:

  * Realtime synchronization remains owned by `avatar-core` through `RuntimeClock` and monotonic timestamps.
  * Application wall-clock time is used for session creation, persistence timestamps, and filesystem organization.
  * Participant-facing time uses explicit user or browser timezone information when available.
  * Multiple participants in the same session can maintain independent timezone contexts.
  * Runtime context now supports participant-scoped current-time snapshots instead of assuming one timezone for the entire session.
  * Persona login and profile update timestamps are stored as structured datetimes and rendered into the relevant user's timezone only when building model-facing context.
  * Memory and Persona persistence no longer rely on human-readable prompt timestamps for ordering or storage.

* Added unified perception events and media-source lifecycle tracking:

  * Added session-level ordered `PerceptionEvent` streams.
  * Added explicit camera, screen, and microphone lifecycle events.
  * Source generations prevent stale track readers from closing or modifying newer media sources.
  * Perception snapshots expose missed-event counts and retention gaps.
  * Downstream consumers can explicitly detect discontinuities instead of silently assuming a complete timeline.

* Schema-ized and enum-ized perception contracts:

  * Stream kinds, observation kinds, event kinds, and media-source kinds now use explicit runtime enums instead of scattered string literals.
  * Perception event schemas are separated from runtime implementation.
  * Observation-to-stream routing now uses typed `ObservationKind` and `PerceptionStreamKind` contracts.
  * The stronger schema boundary reduces accidental cross-stream mismatches and prepares perception APIs for future external integrations.

* Added provider-neutral temporal alignment:

  * Added `PerceptionTemporalAligner` for shared multimodal alignment.
  * Added fixed and speech-anchored alignment modes.
  * Continuous observations may span multiple overlapping temporal slices.
  * VAD speech segments and final transcripts can be paired by source and segment ID.
  * Speech pauses and non-speech gaps are retained without turning each speech segment into a separate user turn.
  * Direct text and uploaded media remain end-of-turn inputs rather than being assigned to earlier temporal slices.
  * The same aligner can be reused by Avatar, ENV Memory, and future perception consumers.

* Added immutable turn snapshots:

  * `TurnRuntime` freezes the perception state associated with each user input.
  * Voice turns and direct text input now share the same turn-level perception contract.
  * Retries and tool follow-up model calls reuse the original turn snapshot instead of observing a later perception state.
  * Direct text and uploaded inputs are committed atomically with the turn cutoff.

* Reworked multimodal vision handling:

  * Removed the old stateful Sampled Frame Vision runtime model.
  * Visual selection is now a pure operation over aligned perception.
  * `VisualFrameSelector` no longer manages perception cursors, source state, background tasks, or local frame buffers.
  * Realtime mode samples each temporal slice independently.
  * VLM mode preserves semantic coverage across speech and gap slices before applying additional frame budget.
  * Visual selection never infers whether a camera or screen is currently active; authoritative source state comes from temporal alignment.

* Added a provider-neutral model input and prompt pipeline:

  * Added AlphaAvatar-owned model input messages and text, image, audio, temporal, function-call, and function-output parts.
  * Prompt rendering is selected by model-input type rather than model provider.
  * Prompt code no longer depends on provider-specific message structures.
  * Provider adapters perform the final conversion into SDK-specific request formats.

* Added structured current-input rendering:

  * Current multimodal turns are rendered as a structured `alphaavatar_input` timeline.
  * Speech segments, pauses, visual evidence, source-state transitions, perception gaps, and direct inputs retain their relative temporal positions.
  * Media state at input end is explicitly represented as the authority for current camera and screen availability.
  * Earlier visual frames remain usable as historical evidence without being mistaken for a current live view.
  * Multiple speech segments inside one turn remain one user message instead of becoming multiple conversation turns.

* Improved runtime-context injection:

  * Dynamic memory, participant time, plan, reflection, and temporary behavior rules remain separate from the user's actual input.
  * Runtime context applies only to the current model invocation.
  * Stable persona and behavioral instructions remain in the system prompt for improved prompt-prefix stability.
  * Participant time context can represent multiple users in different timezones within the same session.
  * Historical media is compacted before model invocation and explicitly marked as belonging to earlier messages.

* Added internal runtime capability descriptions:

  * Added framework-level `AvatarCapability` metadata and typed capability names.
  * Internal capabilities can be declared directly on their abstract runtime components through `@avatar_capability`.
  * Capability metadata is inherited by concrete plugin implementations, so plugin developers can focus on implementing the runtime contract without duplicating capability descriptions.
  * Persona currently exposes profile, speaker-recognition, and face-recognition capabilities.
  * Memory exposes conversation, environment, tool, and graph-memory capabilities.
  * Enabled internal capabilities are injected into the Avatar system prompt.
  * Internal capabilities are explicitly distinguished from callable tools and do not imply that the required realtime evidence is currently available.
  * The capability model is designed to support future decomposition of Memory into independently registered sub-capabilities.

* Added provider-specific multimodal input adapters:

  * AlphaAvatar plugins and agents operate on provider-neutral temporal input.
  * Media encoding, Base64 conversion, WAV construction, and SDK-specific message conversion belong to provider adapters.
  * Continuous environmental audio can be converted into complete model-facing audio tracks while preserving AlphaAvatar temporal metadata.
  * Future native multimodal providers can consume the same aligned input using their own audio, video, and timestamp representations.
  * Provider-specific input behavior no longer leaks into ENV Memory or Avatar prompt logic.

* Added audiovisual ENV Memory:

  * ENV Memory now consumes both visual perception and continuous microphone audio.
  * Environmental audio uses raw `AUDIO_FRAME` / `AUDIO_SEGMENT` observations rather than VAD-selected speech.
  * Background speech, music, environmental sounds, and other microphone evidence can contribute to environment memory.
  * Speech frames, speech segments, transcripts, typed text, and uploaded user media are excluded from ENV evidence.
  * Visual frames are sampled according to ENV Memory policy while audio remains continuous.
  * ENV Memory uses the same fixed temporal alignment infrastructure as the rest of the runtime.
  * Source-state transitions and start/end media states are preserved as environment evidence.

* Added adaptive ENV Memory scheduling:

  * Periodic ENV Memory updates and user-turn-triggered updates share one scheduler.
  * A periodic memory boundary no longer immediately cuts through an active speech segment.
  * When speech is active at the normal interval boundary, ENV Memory asynchronously waits for the current segment to finish.
  * The resulting perception cutoff is frozen at the complete speech boundary before extraction begins.
  * VAD is used only as a scheduling boundary signal; ENV Memory still processes the original continuous environmental audio.
  * A configurable maximum defer duration prevents continuous speech, meetings, television, or other long-running audio from indefinitely blocking memory updates.
  * Forced mid-speech boundaries are explicitly recorded when the maximum defer duration is reached.
  * Session shutdown remains a hard boundary and drains pending ENV work without waiting for speech completion.

* Reworked perception stream retention:

  * `PerceptionStream` is now a generic bounded sequence buffer and no longer owns modality-specific buffer sizes.
  * Stream capacity is provided explicitly by `PerceptionRuntime`.
  * High-frequency video and audio retention is derived from a configured temporal retention horizon and the actual producer cadence.
  * Video publish interval and audio frame size now act as shared configuration for both RTC input behavior and perception-buffer sizing.
  * Changing video sampling frequency or audio frame duration automatically adjusts the required stream capacity.
  * This keeps transient replay capacity approximately time-consistent instead of depending on arbitrary item counts.
  * Text and aggregate event streams remain independently bounded where no single stable producer rate exists.
  * Perception streams remain transient realtime buffers rather than long-term memory stores.

* Improved perception gap handling:

  * High-frequency observations can remain available to specialized consumers without unnecessarily entering long-term annotation timelines.
  * Event retention gaps expose missed counts instead of pretending that unavailable events never occurred.
  * Start and end source snapshots remain authoritative even when intermediate event history is incomplete.
  * Consumer lag and retention boundaries remain explicit at the stream contract level.

* Added transport-independent `OutputRuntime`:

  * Added shared output streams and a time-aligned output timeline.
  * Added Assistant, transient, status, and character output lanes.
  * Added explicit output, turn, and chunk identifiers.
  * Added transport-independent interruption and completion controls.
  * Generated source text, audio, playback feedback, alignment, and delivered transcript are represented separately.
  * Interrupted outputs retain already delivered evidence while rejecting late or unplayed output.

* Updated status and transient speech handling:

  * Machine-readable status state is separated from optional user-visible transient speech.
  * Status plugins no longer directly own transport speech output.
  * Transient speech runs through the AlphaAvatar output and Router path.
  * New Assistant output can immediately interrupt active transient speech.
  * Delayed filler speech no longer plays after the final Assistant answer.

* Added playback-aware transcript synchronization:

  * Generated text and actually delivered transcript are tracked separately.
  * TTS output publishes text-to-audio alignment information.
  * Transport adapters publish playback progress.
  * Visible transient transcript follows actual audio delivery.
  * Text that was never played is not published after an interruption.
  * Already delivered transcript remains available after cancellation.

* Expanded the Interaction Router into output processing:

  * Input routing continues to manage audio activity and transcription.
  * Output routing now includes speech synthesis and transcript synchronization.
  * TTS capability remains owned by Voice plugins while routing and cancellation are owned by the Router.
  * Long-lived synthesis jobs preserve ordering across multiple text chunks of the same logical output.

* Added staged concurrent runtime lifecycle management:

  * Runtime plugins are started and stopped in dependency-safe phases.
  * Independent plugins within the same phase execute concurrently.
  * Startup rollback and best-effort shutdown improve failure handling.
  * RTC inputs start only after perception consumers and Router processors are ready.
  * Shutdown stops producers before downstream consumers.

* Improved session and participant organization:

  * Sessions are now grouped by their application-local creation date:

    ```text
    sessions/
    ├── 2026-08-16/
    │   ├── <session_id>/
    │   └── ...
    └── 2026-08-17/
        └── <session_id>/
    ```

  * Session creation time is captured once and remains stable even if the session crosses midnight.

  * Session filesystem paths no longer derive their date from participant/browser timezone metadata.

  * Participant transport identity is separated from logical user identity.

  * A session can represent multiple participants within the same room without deriving participant IDs from human-readable timestamps.

  * Persona identity resolution updates `resolved_user_id` while preserving the original participant/user identity and runtime object references.

* Improved Memory and Persona timestamp semantics:

  * Memory items now use structured creation timestamps rather than session-start user-facing time strings.
  * Memory ordering and deduplication operate directly on structured datetimes.
  * Memory VDB metadata uses explicit `created_at` fields instead of abbreviated `ts` fields.
  * Persona profile fields use structured `updated_at` timestamps.
  * Profile update times are generated when the actual face, speaker, or conversation-derived profile change occurs.
  * Persona VDB metadata uses explicit `updated_at` fields.
  * Human-readable timezone conversion happens only when Persona or runtime context is rendered for the model.
  * This prevents storage timestamps from becoming coupled to one participant's timezone or prompt representation.

* Continued LiveKit boundary cleanup:

  * LiveKit audio, video, status, transcript, and transient audio conversion lives under the LiveKit entrypoint boundary.
  * AlphaAvatar runtime, prompt, perception, ENV Memory, Router, and output logic increasingly operate on AlphaAvatar-owned structures.
  * RTC producer configuration is injected through the entrypoint rather than leaking transport-specific constants into core perception.
  * LiveKit remains the default RTC backend while more AlphaAvatar-owned runtime behavior is moved outside `livekit.agents`.

### Validation

The integrated v0.6.6 runtime has been tested across the updated perception, model-input, Memory, Persona, ENV Memory, session, and output paths, including:

* multimodal temporal alignment;
* camera and screen lifecycle transitions;
* historical versus current visual-state handling;
* direct text and voice turn snapshots;
* multiple speech segments inside one turn;
* structured multimodal prompt rendering;
* provider-neutral model-input conversion;
* continuous audio and visual ENV Memory extraction;
* periodic ENV Memory updates during active speech;
* adaptive speech-boundary deferral and maximum-defer fallback;
* internal Memory and Persona capability injection;
* participant-scoped current-time rendering across different timezones;
* structured Memory and Persona timestamp persistence and reconstruction;
* time-derived video and audio perception-buffer sizing;
* session creation under date-partitioned filesystem paths;
* transient speech interruption;
* playback-synchronized transcript delivery;
* staged plugin startup and shutdown.

### Notes

* LiveKit remains the default RTC transport in v0.6.6.
* LiveKit `AgentSession` still owns parts of final Assistant delivery and turn lifecycle while AlphaAvatar-owned runtime boundaries continue to expand.
* Final Assistant output ownership migration remains intentionally incomplete and will continue in later releases.
* AlphaAvatar continues to run its own Router VAD and STT path while temporary LiveKit compatibility paths remain for turn handling.
* ENV Memory listens to continuous microphone audio. VAD speech information is used only to choose better memory commit boundaries.
* ENV Memory periodically forces a boundary when active speech exceeds the configured maximum defer duration, preventing unbounded memory latency.
* Perception stream retention is designed for bounded realtime replay and consumer-lag tolerance, not long-term media storage.
* Capability availability does not imply that the required camera, microphone, speech, or other realtime evidence is currently present.
* Participant-facing timezone context is kept separate from application persistence timestamps and realtime monotonic timing.
* Model-facing historical visual and audio payloads are compacted so earlier media cannot be mistaken for current perception.
* Provider-specific media conversion belongs to the provider boundary. Core runtime and plugins operate on AlphaAvatar-owned multimodal representations.
* Internal APIs continue to prioritize rapid architectural iteration over backward compatibility.

### Internal Direction

v0.6.6 moves AlphaAvatar from independent shared perception streams toward a unified time-aligned multimodal runtime:

```text
RTC / Device Adapters
        ↓
EnvObservation + Source State
        ↓
PerceptionRuntime
  ├── audio
  ├── speech
  ├── video
  ├── screen
  ├── text
  └── ordered events
        ↓
RuntimeTime + PerceptionCutoff
        ↓
PerceptionTemporalAligner
        ↓
AlignedPerception
   ┌───────────────┴────────────────┐
   ↓                                ↓
Avatar                            ENV Memory
   ↓                                ↓
VisualFrameSelector           ENV evidence selection
   ↓                                ↓
Context / Prompt Pipeline     Provider-neutral temporal input
   ↓                                ↓
ModelInput                        ProviderGateway
   └───────────────┬────────────────┘
                   ↓
             Provider Adapter
                   ↓
        Gemini / future Omni models
```

Internal runtime capabilities now follow a parallel metadata path:

```text
Memory / Persona abstract capabilities
        ↓
@avatar_capability
        ↓
AvatarCapability metadata
        ↓
Active runtime composition
        ↓
Avatar system prompt
        ↓
Model capability awareness
```

Perception retention is now derived from time semantics instead of arbitrary record counts:

```text
Configured producer cadence
  ├── video publish interval
  └── audio frame duration
        +
Retention horizon
        +
Safety headroom
        ↓
Derived stream capacity
        ↓
PerceptionStream
```

Time responsibilities are also explicitly separated:

```text
RuntimeClock / RuntimeTime
        ↓
Realtime ordering, duration and alignment

Application Wall Clock
        ↓
Session creation, persistence and filesystem dates

Participant Time Context
        ↓
User timezone and current human-facing time
        ↓
Participant-scoped runtime context
```

The output side follows a parallel AlphaAvatar-owned path:

```text
Source Text / Status / Character Output
        ↓
OutputRuntime
        ↓
Interaction Router
  ├── Speech Synthesis
  └── Transcript Synchronization
        ↓
Transport Output Adapter
        ↓
Audio Playback + Playback Feedback
        ↓
Delivered Transcript
```

The architectural responsibility is increasingly explicit:

* `avatar-core` owns transport-independent perception, output, realtime timing, source-state, retention, cutoff, and alignment semantics.
* Application runtime owns session lifecycle, application wall-clock time, participant identity, and filesystem organization.
* The Interaction Router owns realtime input/output routing and cancellation decisions.
* Voice plugins own VAD, STT, and TTS capabilities.
* Avatar owns turn interpretation, visual selection, context composition, prompt rendering, and model orchestration.
* Persona owns persistent user profiles, identity-related perception, and user-level runtime state.
* Memory owns durable conversation, tool, graph, and environment-memory behavior.
* ENV Memory owns environment evidence policy and durable environment-memory extraction.
* Provider adapters own model- and SDK-specific multimodal conversion.
* Entrypoints own RTC and external transport conversion.
* Internal runtime capabilities are declared by framework contracts rather than transport or provider implementations.
* `AvatarEngine` continues shrinking toward composition and high-level orchestration.

v0.6.6 establishes the temporal, capability, persistence, and provider-neutral boundaries required for future native realtime multimodal models, richer multi-user sessions, deeper ENV understanding, modular Memory capabilities, and the continued removal of `livekit.agents` from AlphaAvatar-owned runtime behavior.
