Native Multimodal Agents: Technical Architecture Explained

    This article breaks down the technical architecture of native multimodal agents and why bolt-on vision pipelines fail in real applications. It covers the four capability baselines, the unified encoding-alignment-decision pipeline, the three-stage training path, tooling and infrastructure requirements, evaluation metrics, and common pitfalls, along with practical advice for building these systems in your own environment.

    1. The Starting Problem: Why Bolt-On Vision Pipelines Break Down

    In real business scenarios, the primary carrier of information is rarely clean text. It is web interfaces, mobile screenshots, design mockups, scanned documents, surveillance footage, and screen recordings of user actions. If you stick with the “text LLM + vision module” assembly approach, the system exposes three structural problems.

    The first is a disconnect between perception and reasoning. The vision module only turns an image into a description, and the language model receives compressed, summarized second-hand information. Pixel-level spatial relationships, control hierarchies, and state differences are largely lost in the retelling.

    The second is amplified hallucination. When the description itself is incomplete, the model tends to use language priors to “fill in” the interface or document structure, generating elements that look plausible but do not actually exist. This is fatal for code generation and UI operation tasks.

    The third is a broken execution loop. An agent needs a continuous “see-think-act” loop, but assembly approaches usually place an irreversible information bottleneck between “see” and “think,” and the action space cannot be aligned with the visual representation.

    The industry has therefore converged on a consensus: vision should be modeled as a native capability of the model, not a patch added after the fact. The core meaning of native multimodality is that images, video, and text are encoded in the same representation space and share the same reasoning and decision-making mechanism.

    2. Defining the Goal: Four Capability Baselines for Native Multimodal Agents

    Before discussing architecture, define the capability goals clearly to avoid the “bigger parameters are always better” trap. A usable native multimodal agent must meet at least four baselines.

    • Fine-grained perception: locate specific controls in an interface, specific paragraphs in a document, or specific moments in a video, and output verifiable coordinates or timestamps.
    • State understanding: distinguish the “current state” from the “target state” and understand differences between frames, rather than only describing a single frame.
    • Structured output: reliably produce structures that programs can consume, such as element lists, hierarchy trees, and action sequences, rather than free-form prose.
    • No regression in text capability: introducing vision should not significantly degrade pure text reasoning or code generation. This is an important dividing line between “native” and “assembled.”

    3. Architecture Design: A Unified Encoding-Alignment-Decision Pipeline

    3.1 Unified Representation Layer

    Visual input is split into tiles of a fixed granularity, mapped by a vision encoder into vector sequences isomorphic to text tokens, and then aligned to the language model’s embedding space through a projection layer. Two points are critical: tile granularity must match task needs, and interface understanding requires finer granularity to preserve small text and icons; sequence length must be controlled, otherwise high-resolution input will quickly blow up the context budget. Common approaches include adaptive resolution, dynamically allocating tile budgets by regional importance, and temporal compression for video that keeps key frames and frames with changes.

    A schematic way to organize the data is shown below (pseudocode that expresses structure only and does not point to any specific product API):

    1. # Structure of a unified multimodal input
    2. sample = {
    3. "task": "gui_action_prediction",
    4. "instruction": "Fill in the email field in the form and submit it",
    5. "images": [
    6. {"type": "screenshot", "data": "<base64>", "role": "current_state"},
    7. {"type": "screenshot", "data": "<base64>", "role": "reference_state"}
    8. ],
    9. "video": {"frames": ["<frame_0>", "<frame_3>"], "fps_hint": 2},
    10. "action_space": ["click", "type", "scroll", "wait", "finish"]
    11. }

    3.2 Perception-Reasoning Alignment Layer

    The goal of alignment is to make “what is seen” and “the symbols used for reasoning” refer to the same entity. In engineering practice, three types of supervision signals are typically introduced: region localization supervision, which requires the model to output element boundaries or center points; state-difference supervision, which requires the model to describe changes between states; and instruction-action consistency supervision, which requires the generated action to actually operate on the referenced element. Combining all three can significantly suppress errors such as “referencing a control that does not exist.”

    3.3 Decision and Execution Layer

    The execution layer needs to constrain model output to a legal action space and introduce a rollback mechanism. The recommended structure is a four-stage “plan-act-observe-verify” loop: the model first gives a brief plan, then outputs a single action, the environment returns a new observation, and finally the verification step decides whether replanning is needed. Keeping action granularity at a single step is key to improving success rates on long workflows; outputting multiple steps at once greatly increases the probability of error accumulation.

    4. Training Path: Three Progressive Stages That Avoid Capability Contamination

    The first stage is large-scale image-text and video alignment pretraining, aimed at establishing a stable cross-modal mapping. No complex decision tasks are introduced at this stage.

    The second stage is task-mixed training, blending interface understanding, document parsing, chart question answering, code generation, and pure text reasoning in reasonable proportions. The mixing ratio is the most sensitive hyperparameter in practice: too high a share of visual data squeezes text capability, while too low a share makes visual instruction following unstable. It is recommended to use the degree of pure text capability regression as a constraint metric for ratio search.

    The third stage is agent trajectory training, using interaction data with environment feedback to learn an “observe-act” policy. This stage should retain a portion of non-visual general data to prevent the model from being effective only on visual tasks.

    Practical data-side points include: unified annotation standards, using the same conventions for coordinates and element identifiers; constructing negative samples, such as removing the target element from the interface to train the model to refuse; and preserving timestamps for video data so the model learns to reference moments rather than give vague descriptions.

    5. Tooling and Engineering Support

    For native multimodal agents, the toolchain often determines success more than the model itself.

    • Data pipeline: support screenshot capture, tile splitting, coordinate normalization, and redaction, with sensitive information masked before ingestion.
    • Training and inference: container platforms host distributed training, and the inference side uses batching and tile caching to reduce repeated encoding overhead.
    • Storage and distribution: raw assets go into object storage, metadata and annotations go into a relational database, and task queues are decoupled with a message queue.
    • Observability: use logging services and monitoring alerts to track success rate, average steps, and timeout rate, and perform attribution slicing on failed trajectories.
    • Sandboxed execution: all actions are replayed in an isolated environment and are prohibited from acting directly on production systems.

    6. Evaluation Methods: Turning “Looks Usable” into “Measurable”

    Evaluation should cover four categories of metrics. Perception metrics focus on localization accuracy and element recognition recall; understanding metrics focus on state differences and document structure reconstruction; execution metrics focus on task success rate and average interaction steps; and regression metrics focus on preserving pure text and code capabilities. In addition, a “refusal rate” metric is essential: when the target element does not exist, can the model clearly state that it cannot find it instead of fabricating one?

    It is important to emphasize that any performance number depends heavily on the data distribution and evaluation protocol, and scores detached from a specific setup are not comparable. Teams should build their own evaluation sets covering the interface styles, resolutions, and language environments of their real business, and use manual spot checks to validate automated metrics.

    7. Common Pitfalls and How to Avoid Them

    • Resolution vs. context conflict: blindly increasing clarity causes tiles to explode, so use region-adaptive allocation.
    • Error accumulation in long workflows: stick to single-step actions and explicit replanning, and set a maximum step count and timeout circuit breaker.
    • Visual bias: the model may over-rely on pixel cues and ignore instructions, which can be corrected with instruction-perturbation samples.
    • Privacy risk: screenshots often contain personal information, so redaction must be applied separately at capture, storage, and training.
    • Evaluation distortion: relying only on public leaderboards hides business differences, so release decisions must be based on your own evaluation set.

    8. Implementation Advice

    To build similar capabilities in your own business, proceed in the order “perception first, then decision, then closed loop”: first refine the accuracy of element localization and document parsing, then introduce the action space and verification mechanism, and finally connect sandboxing and observability to form a closed loop. If you use relevant Baidu AI Cloud capabilities, you can adopt general category combinations, such as object storage for assets, container platforms for training and inference, message queues for task decoupling, and logging services with monitoring alerts for stability, so that engineering focus stays on data quality and the evaluation system. That is the fundamental factor that determines the ceiling of a native multimodal agent.