Cross-Terminal AI Assistants: Architecture and Engineering Practice

    As large models extend from in-car voice to phones, the web, and wearables, assistants become unified, multimodal services. This article covers a decoupled architecture, model routing, device–cloud split, session sync, observability, and platformization—without changing the original technical scope.

    As large-model capabilities move beyond a single in-car scenario to phones, the web, and wearables, intelligent assistants are evolving from one-off voice interaction into a unified service that is cross-device, multimodal, and able to keep learning. The core challenge is no longer only model quality. It is how to keep a consistent experience across terminals, how to place compute between device and cloud, how to balance complex reasoning with real-time response, and how to run an observable, governable engineering system. This article discusses how to build a cross-terminal assistant from architecture, capabilities, and engineering practice.

    1. Overall architecture: decouple a unified service layer from multi-device adapters

    A typical design is a three-layer stack: a device adapter layer, a cloud service layer, and a model capability layer. The adapter layer owns interaction shapes: in-car voice, mobile text and images, long-form editing on the web, and short commands plus sensor data on wearables. The cloud service layer owns session management, intent, tool calling, content safety, and multi-device sync. The model layer provides general chat, knowledge Q&A, text generation, vision, and reasoning enhancement.

    Do not scatter business logic across clients. Converge core session protocols, tool-calling protocols, and content-safety policy in the unified service layer. Keep the client to rendering, capture, cache, and only the local inference that is necessary. That cuts multi-device maintenance cost and makes new form factors easier to add.

    1. Device adapter: voice / text / image / sensors / short commands
    2. ↓
    3. Unified gateway: auth, rate limit, routing, session binding
    4. ↓
    5. Service layer: sessions, intent, tools, content safety, sync
    6. ↓
    7. Model layer: general chat, reasoning, vision, retrieval and tools
    8. ↓
    9. Infrastructure: containers, object storage, message queues, logs, monitoring and alerts

    For infrastructure, combine generic cloud capabilities: object storage for images and session attachments, queues to decouple async work, a container platform for elastic model serving, and logging plus monitoring for production quality. If you use Baidu AI Cloud, still compose object storage, queues, containers, and logging as generic categories rather than binding business logic to a single proprietary API.

    2. Model routing: balance quality, latency, and cost dynamically

    Cross-terminal assistants usually mix “fast Q&A” and “deep reasoning.” The former needs time-to-first-token and streaming; the latter needs reasoning depth and tools. A routing layer can pick models and strategies from request type, context length, on-device compute, user entitlements, and live load.

    Routing should be explainable: run a lightweight intent classifier, then use rules and confidence to decide whether to escalate to a reasoning-enhanced path. For requests that need live information, alternate reasoning and retrieval. For long documents, summarize and extract first, then generate. Support canary releases and rollback so model switches do not jitter the experience.

    1. def route_request(req):
    2. intent = classify_intent(req.text)
    3. if req.needs_realtime_info:
    4. return "reasoning_with_search"
    5. if intent in ("quick_qa", "short_chat"):
    6. return "low_latency_chat"
    7. if req.context_tokens > LONG_TEXT_THRESHOLD:
    8. return "long_context_pipeline"
    9. if req.requires_deep_reasoning:
    10. return "reasoning_enhanced"
    11. return "default_chat"
    12. def stream_chat(req):
    13. route = route_request(req)
    14. for chunk in model_gateway.stream(route, req):
    15. yield sanitize(chunk)

    The sketch highlights two points: routing is decoupled from generation so each can be evaluated on its own, and streamed output must pass content safety and format checks so incomplete text is not shown as-is.

    3. Device–cloud collaboration: put the right compute in the right place

    The device is a good fit for wake-up, noise reduction, short-command recognition, sensitive-data preprocessing, and weak-network cache. The cloud is a good fit for large-model inference, cross-domain retrieval, complex tools, and multi-device sync. Define clear degradation: if the network is unstable, the device can return a local short-command result or ask the user to retry; if the cloud is overloaded, routing can fall back to a lighter model and keep a task queue; constrained wearables should prefer short sessions and structured commands.

    For image Q&A and vision, compress, crop, and mask private regions on device before upload; return structured results and explainable labels from the cloud. In the car, prioritize low latency and determinism for safety-related commands and avoid long generations while driving.

    4. Multi-device sync and long text: recoverable, auditable session state

    Sync is not just storing chat logs. It is a session state machine: message sequence, attachment refs, tool results, routing records, and user preferences. Use a unified session ID and version to resolve concurrent writes. For long input, use chunked upload, async parse, sectional summaries, and citation locators instead of stuffing the full document into context at once.

    A summary tree works well: paragraph summaries, then section summaries, then retrieve original spans on demand. That caps context while keeping citations. Web long-form editing should support autosave, version compare, and resume from a breakpoint.

    5. Observability and safety: keep the assistant operable and in control

    Cover device, cloud, and model: time-to-first-token, render time, and failure rate on device; route mix, tool success, and queue depth in the service; input/output length, refusal rate, safety blocks, and cost at the model. Do not store sensitive data in the clear; redact and retain by grade.

    Safety includes input filtering, output checks, tool allowlists, least privilege, and audit trails. Vehicle control, location, and personal data need stricter confirmation and permission checks. Routing records should be auditable so you can explain why a model or tool was chosen.

    6. Evolution: from feature pile-up to a platform

    Long-term strength comes from platform capabilities: a unified session protocol, unified tool registry, unified eval sets, and a unified canary system. Build the model gateway and router first, then multimodal preprocessing, long-text pipelines, multi-device sync, and safety policy. Evaluate quality, latency, cost, and stability together, not a single metric. With layered decoupling and ongoing operations, the assistant can stay consistent, reliable, and extensible across car, mobile, web, and wearables.