# AlphaAvatar v0.6.8 Release Notes

### Highlights

AlphaAvatar v0.6.8 completes the transition from a LiveKit Agents-managed application to an **AlphaAvatar-owned native realtime Agent runtime**. Application startup, execution supervision, model/tool orchestration, committed turns, and output delivery now have explicit owners. LiveKit remains the first implemented RTC transport, but it no longer defines the Agent lifecycle or foreground generation pipeline.

The release also establishes a **processor-owned plugin architecture**. Persona, Memory, and Router organize their capabilities around independently managed processors, while a shared Foundation runtime supplies Context, Loop, Provider, and Voice services. Concrete plugin behavior stays in its plugin package; the Agents package retains the reusable contracts and runtime composition.

A new **native streaming model and tool pipeline** replaces the remaining SDK execution path. It supports structured model input and output, incremental assistant text, function calls, configurable tool authorization, canonical record publication, execution feedback, and spoken commentary before longer tool operations when the model chooses to provide it.

Realtime voice output now uses streamed PCM, bounded speech-text segmentation, asynchronous synthesis and playout, and **playback-paced transcript synchronization**. Voice remains the timing authority: subtitle delivery follows audio progress and does not gate PCM playback. TTS transport handling, retry limits, cancellation, and optional first-audio hedging improve the handling of slow initial responses without silently replaying already emitted audio.

Finally, v0.6.8 unifies the workspace and diagnostic layout, introduces a compact native Host CLI and structured logs, and updates the entire Python workspace to **CPython 3.13** with consistent Ruff, packaging, and CI checks.

### What's New

#### Native Host and RTC Ownership

* Introduced `avatar-host` as the application entrypoint and lifecycle coordinator.
* Added the unified `alphaavatar` command with minimal `dev`, `start`, `--help`, and `--version` behavior.
* Separated Host responsibilities into application bootstrap, managed executions, process supervision, session attachments, and backend-specific dispatch.
* Moved LiveKit media integration into the standalone `avatar-rtc` package.
* Implemented configuration-selected LiveKit session access, including native dispatch and direct connection modes where configured.
* Replaced SDK worker and job lifecycle ownership with native registration, assignment handling, capacity/admission decisions, control-loss handling, and precise execution settlement.
* Session attachments own RTC connections and media adapters; they do not directly own shared inference services or decide whether the entire application must stop.
* Connection termination and execution termination have independent boundaries. The current configured deployment can still finish an execution when its session ends.
* Retained `InferenceRuntime` ownership of its existing runner processes; Host process supervision does not create a second shutdown owner for those runners.
* Kept generic lifecycle and cancellation-protected cleanup contracts in `avatar-core` rather than duplicating them in Host.

The architectural separation is the v0.6.8 deliverable. **Connection-independent Episodes, durable execution recovery, sleep/wake scheduling, and autonomous background execution are not included**; those remain later roadmap work.

#### Processor-owned Persona and Memory

* Reorganized Persona into independently managed **Profiler, Speaker, and Face** processors.
* Moved concrete Persona behavior, processing configuration, providers, prompts, and model-specific logic into `avatar-plugins-persona`.
* Kept Agent-facing Persona interfaces and shared data contracts separate from plugin business implementations.
* Reorganized Memory around processor-owned capabilities, including conversation, tool, environment, and retrieval behavior.
* Refactored Memory records, owner and context references, note/export projections, and local storage boundaries.
* Distinguished durable primary Memory records from derived Markdown exports and indexes.
* Preserved owner and scope isolation while permitting the appropriate Avatar-owned Memory to be used across interaction boundaries.
* Kept bounded turn and canonical-record consumers responsible for ingesting committed input and authoritative model/tool results, rather than reconstructing turns from incidental RTC events.
* Maintained processor startup, rollback, and finalization under explicit lifecycle ownership.

#### Runtime Capabilities and Committed Turns

* Promoted capabilities beyond prompt descriptions to typed, runtime-registered definitions and callable bindings.
* Added capability argument parsing, alias/collision validation, and asynchronous invocation boundaries.
* Separated `AvatarModulePlugin` registration from runtime-owned plugin instances and their lifecycle.
* Added the committed-turn event stream so downstream consumers can react to authoritative turns independently.
* Kept turn capture and immutable perception cutoffs under AlphaAvatar ownership.
* Separated canonical output records, execution observations, and user-facing media delivery; a completed model Run does not imply the client has heard the generated speech.
* Preserved exact interruption targets, output identity, and cancellation semantics across asynchronous consumers.

#### Native Model, Provider, Context, and Tool Execution

* Added the Foundation-owned **Loop, Context, Provider, and Voice** composition.
* Moved foreground model and tool execution to the native Loop rather than `livekit.agents`.
* Used provider-neutral model input/output contracts for text, media, function calls, function results, streaming deltas, and completion events.
* Added a native OpenAI Responses streaming implementation, including strict event ordering, reasoning continuation handling, and explicit protocol errors.
* Continued to support structured background tasks through the provider gateway without claiming that every task backend supports foreground streaming.
* Captured the query's State and fixed context prefix once, preserving the input boundary across model/tool continuation steps.
* Moved model-specific Provider implementations into `avatar-plugins-provider`, with shared service ownership in Foundation and consumer-specific prompts retained by Memory and Persona.
* Added runtime-scoped tool visibility, argument validation, authorization, optional approval, execution deadlines, and truthful tool outcomes.
* Allowed already-authorized capabilities to execute without a mandatory approval UI; explicitly denied or approval-required operations still obey their policies.
* Preserved side-effect and unknown-outcome semantics: interrupted tool calls are not automatically replayed.
* Integrated DeepResearch, RAG, and MCP with the native tool feedback path.

#### Realtime Speech, Commentary, and Transcript Delivery

* Kept VAD, STT, speech synthesis, and transcript synchronization independently managed within the existing Router/Voice boundaries.
* Preserved full-duplex interruption and the AlphaAvatar-owned turn admission policy from v0.6.7.
* Replaced sentence-complete TTS playback with streamed PCM consumption and bounded queues.
* Improved incremental speech segmentation using stable punctuation, word boundaries, and safeguards for numbers, abbreviations, and formatted text.
* Balanced quick first speech segments against more complete later segments, with conservative prefetch and end-of-answer handling.
* Kept `TranscriptSynchronizationProcessor` responsible for releasing text according to **local audio playout progress**.
* Decoupled subtitle transport and feedback publishing from the audio frame delivery loop, so slow text consumers do not pace PCM output.
* Added bounded startup/recovery audio reserves and diagnostics for local supply gaps; audio is never held until a complete answer has been synthesized.
* Distinguished network byte progress, PCM frame assembly, first-audio deadlines, later read timeouts, local queue waits, and finite retry budgets.
* Added bounded retry behavior without resynthesizing speech that has already begun delivery.
* Added configurable first-audio hedging, enabled by default after **2.5 seconds** without a valid first audio frame, subject to the existing retry quota. It may incur an additional synthesis charge; set `voice.tts.first_audio_hedge_after: null` to disable it.
* Added explicit speech-delivery failure outcomes and terminal reasons so failures can be distinguished from normal completion or user interruption.
* Selected natural, spoken-first response guidance whenever audio output is active, without rewriting the generated answer after the fact.
* Added instructions for concise **model-generated, user-visible commentary before appropriate tool work**. Commentary uses the normal text/voice output pipeline while tool execution proceeds independently; it is not a separate model request or private chain of thought.
* Avoided forcing generic “thinking” narration for ordinary model waits by default; readiness and activity remain available as structured status signals.

Playout-based transcript timing reflects the **local RTC audio queue**, not an independently confirmed browser speaker position. Commentary is optional model behavior, not a guaranteed announcement for every tool call.

#### Three-layer Plugin Workspace and Model Initialization

* Reorganized `avatar-plugins` into **Foundation**, **Perception**, and **Tools** directories without adding package-name prefixes to public Python imports.
* Foundation: Context, Loop, Provider, and Voice.
* Perception: Character, Memory, Persona, Router, and Status.
* Tools: DeepResearch, MCP, and RAG.
* Moved Router Addressing and Turn Taking into processor-owned directories with their configuration and concrete implementation.
* Consolidated shared Foundation services while retaining consumer-specific processor configuration and lifecycle.
* Removed the separate pre-download registration path. Enabled inference runners resolve missing model files during initialization.
* Selected inference runners from validated active configuration rather than loading every available model unconditionally.
* Standardized model cache paths, locking, offline behavior, and integrity checking where pinned digests exist.
* Kept the current Character/AIRI integration optional and **pending renderer/RTC validation**; it is not presented as a fully validated realtime Character backend.

#### Workspace, Logging, and Diagnostics

* Unified workspace paths for environment data, users, graphs, Memory records, episodes/contexts references, session artifacts, indexes, logs, and caches.
* Kept the Memory primary store distinct from Markdown export projections and backend-specific derived indexes.
* Added a native compact Host banner and consistent timestamp, log-level, source-file, process-ID, and message formatting.
* Added structured Host JSONL diagnostics with bounded output and sensitive-field redaction.
* Added optional developer conversation previews for committed user input, model execution, tool calls, and accepted assistant output.
* Added optional Core event/sequence diagnostics for investigating input, Turn, output, and playout ordering without treating log arrival order as a global event sequence.
* Distinguished generated, recorded, locally sent, locally played, and failed/interrupted output states in diagnostic terminology.
* Kept content capture configurable; the Host JSONL file does not include new conversation-body previews by default.
* Preserved cancellation-safe cleanup for Host and inference processes so Ctrl+C can complete owned resource settlement without the former multi-process KeyboardInterrupt traceback pattern.

#### Python 3.13, Packaging, and Quality

* Standardized workspace metadata and supported Python range around **CPython 3.13**.
* Reorganized workspace and member `pyproject.toml` declarations, optional dependencies, package resources, and isolated build constraints.
* Updated the `uv.lock` and development tooling for the supported Python version.
* Unified Ruff 0.12.9 settings, pre-commit safety defaults, import rules, and `livekit.agents` import restrictions.
* Added a Quality workflow for lock/metadata consistency, lint, formatting, all-package wheel/sdist builds, Twine metadata checks, full workspace installation, package imports, CLI smoke checks, and native adapter lifecycle contracts.
* Kept the root CLI and packaging independent from `avatar-app` and from Claude/Codex or other development agents.

### Removed

* Removed the active `livekit.agents` AgentServer, JobContext, SDK worker/CLI, and SDK-owned foreground model/session lifecycle from this development line.
* Removed the `livekit-agents` and LiveKit Agents OpenAI plugin dependencies from the native workspace installation.
* Removed legacy external messaging bridge and channel-launch dependencies from the active runtime. Native RTC text input and external-tool integrations remain available.
* Removed the former pre-download function workflow in favor of runner-initialization model resolution.
* Removed obsolete package paths and duplicated ownership paths created by the original SDK-based composition.
* Did not preserve compatibility aliases for replaced internal interfaces; v0.6.8 intentionally updates these contracts together.

### Migration Notes

**Python and installation**

* Use CPython **3.13**, the current `uv.lock`, and a new virtual environment when upgrading a Python 3.11 checkout.
* Install the needed workspace packages and extras together; native model dependencies may require platform-specific build tools.
* The public CLI belongs to `avatar-host`:

```bash
ENV_FILE=.env.dev alphaavatar dev examples/agent_configs/mm/pipeline_openai_tools.yaml
# or
ENV_FILE=.env.dev alphaavatar start examples/agent_configs/mm/pipeline_openai_tools.yaml
```

**Configuration and runtime ownership**

* Retain the existing top-level Avatar, Runtime, Voice, Router, Memory, Persona, Tools, and other sections. Host settings are read from their own `host` subtree.
* Use `host.rtc.backend: livekit` for the implemented RTC backend. Other RTC backends remain future work.
* A LiveKit assignment/dispatch identity is not the model `run_id`, an Episode, or the OS process ID.
* Do not interpret connection detachment as persistent Episode execution; long-lived disconnected execution is not provided by this version.
* Plugin and model cache directories follow the new workspace/package layout. Update repository-relative launchers or deployment mounts after migrating.

**TTS and diagnostic controls**

* The voice output pipeline uses streaming PCM and playback-paced captions; it does not offer a separate default “text ahead of speech” delivery mode.
* `voice.tts.first_audio_hedge_after` defaults to `2.5` seconds. Set it explicitly to `null` to disable speculative alternate requests. Hedging uses the existing retry quota and may increase external API charges.
* Conversation preview logging can reveal user-provided content in the development console. Diagnostic file content capture requires separate opt-in, and external terminal/container logging must be considered independently.
* The minimal `dev` / `start` CLI is part of this release; installers, Doctor, configuration profiles/bundles, guided credential setup, and App onboarding are planned for later versions.

See [Host](https://docs.alphaavatar.io/en/v0.7.0/architecture/host.md), [Plugin Layout](https://docs.alphaavatar.io/en/v0.7.0/plugins.md), [Workspace](https://docs.alphaavatar.io/en/v0.7.0/guides/workspace.md), [Model Cache](https://docs.alphaavatar.io/en/v0.7.0/guides/model-cache.md), and [Development Environment](https://docs.alphaavatar.io/en/v0.7.0/development/contributing.md) for current usage and responsibilities.

### Validation

The development-branch Quality workflow verifies lock freshness, workspace checks, Ruff lint/format, wheel/sdist metadata, a complete CPython 3.13 workspace installation, absence of the removed Agents SDK packages, package imports, minimal public CLI commands, and adapter lifecycle contracts.

Native LiveKit interaction has been exercised with model/tool requests, audio output, synchronized transcripts, and orderly execution settlement. Provider timing, remote network performance, and device playback remain deployment dependent. The latest first-audio hedge and adaptive commentary behavior must be evaluated against real provider traffic and client rendering; a successful build alone cannot establish those user-experience outcomes.

The workflow does not replace exhaustive live RTC, multi-participant, long-duration, pressure, or platform installation testing. Those broader checks and developer-facing diagnostics are scheduled separately.

### Notes

* **LiveKit is an RTC backend, not the Agent runtime.** This release implements LiveKit; it does not claim support for every RTC provider.
* `HostExecution` represents a managed Avatar execution instance, not an individual model Run or a durable Episode.
* Committed turns and canonical records preserve the distinction between input authority, model completion, tool outcomes, and eventual local output delivery.
* Character presentation remains optional; `Pending` is the correct status until the renderer and transport path have been validated end to end.
* Internal contracts continue to favor coherent architectural evolution over backward compatibility.
* Persistent Context recovery, autonomous background Episodes, sleep/wake, Dream, Reflection, cross-device application packaging, and configurable runner parallelism are not introduced here.

### Architecture Direction

v0.6.8 closes the application and runtime ownership gap left by v0.6.7:

```text
alphaavatar dev / start
           |
           v
      AvatarHost
       |       \
       |        +-- Application services / health / shared inference
       |        +-- Process supervisor / HostExecution management
       |        +-- Session manager / RTC backend selection
       |                         |
       |                         v
       |                    LiveKit transport
       v
    AvatarEngine
       |
       +-- Core Perception / committed Turn / Output Runtime
       +-- Foundation: Context / Loop / Provider / Voice
       +-- Perception: Router / Memory / Persona / Status
       +-- Tools: DeepResearch / RAG / MCP
       |
       v
 Native model + tool execution
       |
       +-- Canonical output records and execution signals
       +-- Incremental assistant text / optional commentary
       +-- Router speech synthesis and transcript synchronization
       |
       v
 RTC media / captions / status delivery
```

**Next:** v0.6.9 focuses on installation/configuration UX, Doctor and metrics, configurable runner concurrency, and systematic realtime stress/defect testing. Later releases introduce the App experience, stronger identity/ref contracts, advanced retrieval, and finally connection-independent persistent execution lifecycles.
