On-Device Full-Duplex Multimodal Agents: Architecture and Implementation
Building a reliable on-device multimodal agent requires more than combining speech, vision, and a language model. This article explains a layered architecture for continuous perception, task-state management, interruption handling, and controlled tool execution. It also covers resource budgeting, dynamic interfaces, privacy boundaries, reproducible evaluation, and a phased implementation plan for real-time applications.
1. From Conversation to Continuous Perception and Collaboration
Traditional conversational systems typically follow a sequential pipeline: the user speaks, the system recognizes the speech, a model generates a response, and the response is converted into audio. This works for straightforward question answering, but exposes three limitations in gaming companions, real-time guidance, and multitask assistance: noticeable waiting time, slow tracking of environmental changes, and awkward interruptions.
For these applications, the goal is not to make the model produce longer answers. It is to build an agent that continuously receives information, maintains task state, decides when to speak, and performs controlled actions.
Consider a gaming companion. A user may ask for directions while playing, only for a new threat to appear on screen while the agent is explaining the route. The agent must decide whether to stop its current response, revise its advice, and issue an immediate warning. Its value comes from coordinating perception, decision-making, and interaction—not simply from the quality of a single model inference.
On-device multimodal processing, audio handling, decision models, and dynamic interfaces therefore converge on one engineering challenge: delivering reliable real-time interaction with limited resources, continuous inputs, and frequently changing tasks.
2. Distinguishing On-Device, Full-Duplex, and Multimodal Capabilities
On-Device Deployment: Execution Location and Resource Constraints
On-device deployment means that some or all inference and data processing run on the user’s device. Potential benefits include reduced network dependence, lower latency along some processing paths, and less need to send raw audio or video off the device.
However, local execution does not automatically guarantee low latency or strong privacy. Large models, insufficient memory bandwidth, thermal limits, and competition for background resources can slow responses. Applications that upload logs, transcripts, or screenshots still need clearly defined data-handling boundaries.
An on-device design must account for model size, runtime overhead, hardware compatibility, and data flows. “Runs locally” is not, by itself, a measure of quality.
Full-Duplex Interaction: More Than Recording During Playback
At the interaction level, full duplex means that the system can receive user input while producing output and adjust its behavior in response.
This requires coordinated microphone capture, playback control, echo processing, voice activity detection, interruption recognition, and generation-task cancellation. Simply running recording and playback in parallel does not create a natural full-duplex experience.
The system’s own speech can also re-enter the microphone. Without effective echo suppression, the agent may mistake its output for a user instruction, causing it to respond to itself or interrupt incorrectly.
Multimodality: Information Fusion, Not Just More Input Channels
Accepting text, audio, and images establishes multiple input channels. Effective multimodal interaction also requires the system to connect information across those channels.
For example, when a user asks, “Can I get through here?”, the agent needs the current image to resolve “here.” An urgent tone of voice may also influence the priority of a warning.
The central design concerns are temporal alignment, reference resolution, and state fusion. Adding input channels does not necessarily improve results; it can increase computational load and introduce conflicting information.
3. Use a Layered Architecture Rather Than a Single Model for Everything
A maintainable real-time agent can be organized into six layers:
Input capture → Streaming preprocessing → Perception and state management → Decision orchestration → Output generation → Interaction control
Input Capture
This layer collects microphone audio, authorized screen content, user text, and necessary application state.
Capture should follow the principle of collecting only what is needed. If a task requires the current application window, the system should not capture the entire desktop by default. If it only needs to detect whether the user is speaking, there is no need to retain raw recordings over the long term.
All inputs should carry comparable capture timestamps. Without a shared time reference, the system cannot reliably determine which screen content corresponds to a spoken utterance.
Streaming Preprocessing
Audio preprocessing may include noise reduction, echo processing, voice activity detection, and segmentation. Visual preprocessing may include resizing, region cropping, keyframe selection, and change detection.
The objective is to preserve task-relevant information, not to process as much data as possible. Explaining an interface layout may require a relatively complete view, while detecting changes in a notification area may require only a local region.
Perception and State Management
This layer converts continuous input into decision-ready state, such as the current task, user intent, recent events, unresolved questions, and confidence in the available information.
Passing all historical audio and video directly into the model context is usually impractical. A more useful approach is to retain a recent input window alongside structured state and concise summaries. This controls resource consumption and makes errors easier to trace.
Decision Orchestration
This layer decides whether the system should answer, ask a follow-up question, wait, call a tool, or stop an ongoing operation.
Not every decision requires a model. Deterministic rules are generally better suited to permission checks, suppression of repeated alerts, and rejection of stale results. Models can assist with ambiguous intent and open-ended planning.
Output Generation
This layer generates text, speech, and interactive interfaces. All output channels should reflect the same task state. Updated spoken advice should not coexist with an outdated conclusion on screen.
Interaction Control
This layer manages playback queues, task cancellation, interruption responses, and interface events. It is core infrastructure for natural interaction, not merely a player attached to speech synthesis.
4. Real-Time Interaction Depends on Timing Control
Treat Interruptions as Task-State Changes
A user speaking during playback does not always mean that the system should cancel immediately. The input may be a brief acknowledgment, environmental noise, or a clear new instruction.
A staged strategy can help:
- When possible user speech is detected, lower the playback volume or pause briefly.
- Once sustained speech expressing a new intent is confirmed, cancel content that has not yet played.
- Update task state using the new input.
- Decide whether to resume the previous task rather than discarding it automatically.
The exact policy should be tested in real scenarios. Excessive sensitivity causes frequent false interruptions; insufficient sensitivity makes the system feel unresponsive to the user.
Prevent Old Results from Overwriting New State
A common real-time failure occurs when a new request starts before an earlier request finishes. If the older result arrives later, it may overwrite the updated interface or trigger an inappropriate spoken response.
Assigning an incrementing version number to each task can prevent this. The following is illustrative pseudocode, not a specific API:
On receiving a new valid intent:current_version = current_version + 1request cancellation of the old taskclear unplayed contentstart a task with current_version attachedWhen a task produces a result:if result.version != current_version:discard the resultelse:update the interface and schedule output
Version checks do not replace resource cleanup. A task whose result is discarded may still consume computing resources. Cancellation signals, timeouts, and execution-queue management are also necessary.
Control Backpressure with Bounded Queues
When audio or video arrives faster than it can be processed, unlimited buffering only makes the system fall further behind.
Visual processing can often prioritize the newest frame and discard stale frames. Audio requires more care because dropping arbitrary segments may break semantic continuity. Different modalities need different buffering policies rather than a shared, simplistic queue rule.
5. Start On-Device Deployment with a Resource Budget
Evaluate Quantization for Both Quality and Runtime Cost
Quantization reduces numerical precision and can often lower model storage requirements and some memory overhead. Its effects depend on the model architecture, quantization method, and execution environment.
Model file size alone does not determine whether a model is suitable for a device. Runtime memory also includes intermediate activations, context caches, audio and video buffers, and execution-environment overhead.
For multimodal applications, evaluation should examine whether quantization affects fine-grained visual recognition, speech understanding, or complex reasoning—not just ordinary text question answering.
Activate Processing on Demand
Keeping every model running continuously can lead to high power consumption and thermal throttling. A more practical approach uses low-cost modules for initial screening and activates heavier inference only when needed.
For example:
- Use visual change detection to decide whether the scene needs to be interpreted again.
- Detect user voice activity before starting the full speech-recognition pipeline.
- Reduce visual processing frequency when no explicit task is active.
These designs improve resource utilization and reduce irrelevant input.
One-Click Startup Still Has Dependencies
Simplifying installation and startup lowers the barrier to use, but deployment still involves device permissions, hardware drivers, audio-device selection, model-file validation, and version compatibility.
The application should provide startup self-checks, clear failure messages, and fallback paths. If acceleration is unavailable, it may switch to a lower-resource configuration. If microphone permission is missing, it should explain the problem rather than appearing as though the model is not responding.
6. Extend Response Generation into Controlled Decision-Making
When an agent uses tools, proposing an action and executing it should remain separate steps.
A model can generate candidate actions from the task, but execution requires parameter validation, permission checks, and risk assessment. Actions that modify files, send messages, or affect external systems need confirmation mechanisms appropriate to their risk.
A robust workflow is:
Understand the goal → Generate candidate actions → Validate permissions and parameters → Request confirmation when necessary → Execute → Check the result → Update state
Post-training and fine-tuning can improve decision consistency for specific tasks, but they cannot replace tool boundaries, business constraints, or a testing framework. Many apparent model-capability problems actually come from unclear tool descriptions, incomplete state, or missing feedback.
For gaming companions, a sensible starting point is explaining information, reviewing performance, and providing advice. Automated gameplay actions additionally require consideration of authorization, fairness, and application rules. An action being technically executable does not mean it should be made available.
7. Make Dynamic Interfaces Complement Conversation
Text-only conversation is often inefficient for adjusting parameters, showing structures, or comparing results. An agent can generate or select forms, calculation panels, diagrams, and status cards based on the task.
However, dynamic interfaces should not depend directly on unconstrained generated content. A safer approach is for the model to produce a structured interface description that controlled components then render.
The interface layer should handle input validation, calculations, permission checks, and state synchronization. The model can explain tasks and organize information, but it should not be the sole basis for critical calculations involving amounts or quantities.
Conversation remains valuable. Natural language is well suited to expressing goals, while interfaces support precise adjustments. Combining them is often more effective than relying on either alone.
8. Define Safety Boundaries for Voice Cloning and Environmental Perception
Speech synthesis, source separation, and speech recognition can support natural interaction, but they have different operating limitations. Source separation is not reliable in every noisy environment and may introduce distortion. Voice cloning raises concerns about speaker authorization and impersonation.
Applications should clearly explain how voice samples will be used, restrict unauthorized voice replication, and appropriately label synthetic content.
Environmental perception should also stay within user expectations. Screens may contain chat histories, account information, and other sensitive material. Users need capture-scope controls, a way to pause capture, log redaction, and deletion mechanisms.
For hybrid on-device and cloud processing, the application should specify which information remains local and which is transmitted. Privacy design must reflect actual data flows, not promotional labels.
9. Build a Reproducible Evaluation Framework
A demonstration video shows that one interaction succeeded. It does not establish reliability over extended use. Evaluation should cover at least the following dimensions:
Interaction latency: Measure input processing, model response, speech generation, and playback startup separately rather than reporting only one average.
Interruption experience: Assess how the system stops output after the user starts speaking, including false interruptions, missed interruptions, and task resumption.
Task quality: Distinguish perception, understanding, decision, and execution errors instead of attributing every failure to an inaccurate model response.
Resource stability: Test memory growth, device temperature, power consumption, competition for background resources, and recovery during extended operation.
Environmental robustness: Include noise, echo, rapid screen changes, missing permissions, and network fluctuations.
Safety behavior: Verify that unauthorized requests are blocked, risky operations require confirmation, and logs do not inadvertently record sensitive information.
Evaluation cases should document the task, input conditions, and expected behavior. This makes it possible to determine whether a change improves the system overall or merely optimizes a particular demonstration.
10. A Recommended Implementation Sequence
Avoid pursuing every capability at once. A phased approach provides a clearer path to deployment.
- Establish a stable text and speech pipeline. Add logging, timeouts, and clear error messages.
- Implement full-duplex interaction controls. Receive input during playback, support task cancellation, and validate task versions.
- Introduce controlled visual perception. Focus on temporal alignment, references to screen content, and state management.
- Integrate a small set of low-risk tools. Establish permissions, confirmation, result checking, and auditing.
- Add dynamic interfaces and optimize on-device resources. Follow with extended runtime testing.
The core of an on-device full-duplex multimodal agent is not concentrating more model capabilities in one interface. It is creating a reliable closed loop across input, state, decisions, and output. Only when the system knows when to listen, respond, stop, and decline to act can it move from an impressive demonstration to a dependable everyday application.
