Native Multimodal AI Agents: Architecture, Training, Tooling, and Evaluation

    This article examines the technical path for building native multimodal AI agents. It explains why bolt-on vision pipelines suffer from decoupled perception and reasoning, cumulative errors, and amplified hallucination; defines four engineering criteria for “native” multimodality; and details architecture choices around unified serialization and vision-token budgets. It then outlines a three-stage training curriculum—cross-modal alignment, joint instruction tuning, and trajectory-level post-training—plus the tooling needed for a closed observe-think-act loop. Finally, it covers evaluation across visual-to-structured, interactive, and text-capability benchmarks, along with cost controls and common pitfalls. The goal is a practical reference for teams building cost-controlled, measurable visual agents without relying on a single vendor’s proprietary approach.

    1. Starting Point: Why Bolt-On Vision Is Not Enough

    A large share of information in real business systems is not structured text. It appears as interface screenshots, scanned documents, design mockups, report images, and screen recordings. When a system only has text reasoning capability, a common approach is to attach an external vision module: first convert the image into a textual description, then feed that description to a language model for decision-making.

    This bolt-on pipeline looks simple from an engineering perspective, but it has three structural problems.

    First, perception and reasoning are forcibly decoupled. The textual description produced by the vision module is a lossy compression. The model sees “someone else’s retelling of the image,” not the image itself. Pixel-level details—control boundaries, color contrast, icon states, text layout—are already lost during the retelling stage. No amount of downstream reasoning can recover them.

    Second, errors accumulate along the pipeline. In a multi-stage pipeline, every hop introduces noise. If visual description is wrong once, interface structure parsing is wrong once, and action planning is wrong once, the final success rate decays multiplicatively. The longer the pipeline, the lower the end-to-end reliability.

    Third, hallucination is amplified. When a language model lacks visual evidence, it tends to “complete” the screen content based on priors—imagining a button or field that does not exist. In a closed loop with visual input, this completion manifests as misjudgment of interface state, which then triggers incorrect actions.

    The core claim of native multimodality is to turn vision from an “add-on accessory” into a “native language”: images, video, and text flow in the same representation space; perception results can directly participate in reasoning; reasoning conclusions can directly drive execution; and execution results flow back as new visual input.

    2. Criteria: What Counts as “Native”

    “Native” is not a marketing term. It has verifiable engineering criteria. A solution can be self-checked across four dimensions to determine whether it is truly native.

    • Unified representation: Vision and text are mapped into the same sequence space. The model sees a unified token stream, not a string interface between two models.
    • Joint training: Vision and language parameters are updated together during pre-training and post-training, rather than freezing the vision tower and training only a projection layer.
    • Closed-loop execution: The model outputs executable actions and can consume new observations after execution, forming multi-turn “see—think—act” cycles.
    • No capability regression: After introducing vision, pure-text and code capabilities should remain within a usable range, rather than being severely crowded out by multimodal training.

    The fourth criterion is the easiest to overlook, yet it determines whether a solution can be deployed. Many multimodal models perform impressively on vision benchmarks but show obvious regression in code and long-text reasoning, forcing teams to maintain two sets of models in the end.

    3. Architecture Layer: Unified Sequences and Vision Budgets

    3.1 Unified Serialization

    The mainstream approach is to split an image into patches, map them through a vision encoder into a number of visual tokens, and concatenate them with text tokens into one sequence fed into the backbone network. There are three key design points:

    1. Cross-modal consistency of positional encoding: Text is a one-dimensional sequence, images are two-dimensional grids, and video adds a temporal dimension. Positional encoding must express both “which token” and “which row/column/frame in the image,” otherwise the model struggles to establish spatial relationships.
    2. Attention masking strategy: Visual tokens usually use bidirectional visibility internally, because image semantics require global context, while the text portion keeps causal masking. The masking design directly affects how much visual detail is preserved.
    3. Dynamic resolution: Fixed scaling sacrifices small text and fine-grained controls. A feasible approach is to allocate vision budget according to screen complexity, and for high-resolution document inputs, encode tiles first and then aggregate them.

    3.2 Vision Token Budget Control

    The number of visual tokens directly determines memory usage and latency. Engineering practice requires an adjustable budget strategy rather than hardcoding.

    1. # Illustrative configuration: allocate vision budget by task type
    2. VISION_BUDGET = {
    3. "ui_understanding": {"max_patches": 1024, "detail": "high"},
    4. "doc_ocr": {"max_patches": 2048, "detail": "high", "tiling": True},
    5. "video_summary": {"max_frames": 16, "max_patches": 256, "detail": "low"},
    6. "chat_with_image": {"max_patches": 512, "detail": "medium"},
    7. }
    8. def build_vision_tokens(image, task: str):
    9. cfg = VISION_BUDGET[task]
    10. tiles = split_into_tiles(image) if cfg.get("tiling") else [image]
    11. tokens = []
    12. for t in tiles:
    13. tokens.extend(encode_patch(t, max_patches=cfg["max_patches"]))
    14. return aggregate(tokens, budget=cfg["max_patches"])

    The trade-off logic behind the budget strategy is clear: interface understanding and document recognition require high resolution, while video summarization depends more on temporal coverage than single-frame clarity. Making the budget a configuration item is what allows one model set to serve multiple business scenarios.

    4. Training Layer: A Three-Stage Progression

    Native multimodal capability cannot be acquired through a single training run. The industry generally adopts a staged curriculum.

    Stage 1: Cross-modal alignment. The goal is to make visual tokens fall into the language semantic space. This stage usually freezes the backbone and trains only the connector module, using large-scale image-text pairs to learn “which concept this patch of pixels corresponds to.” Data scale takes priority over quality.

    Stage 2: Joint instruction tuning. The backbone is unfrozen, and pure-text instruction data is mixed with multimodal instruction data. The key at this stage is data ratio: if visual data accounts for too high a proportion, text capability forgetting occurs; if too low, visual reasoning is not learned thoroughly. In practice, pure-text and code benchmarks are monitored, and the ratio is repeatedly calibrated as a tunable hyperparameter.

    Stage 3: Trajectory-level post-training. The core of agent capability is not single-turn question answering, but multi-step decision-making. This stage optimizes complete task trajectories as units: given an initial observation and a task goal, the model outputs an action sequence, and the environment returns new observations and rewards. Rewards usually come from verifiable signals such as whether the task is completed, whether steps are redundant, and whether irreversible operations are triggered. Compared with optimizing only single-step correctness, trajectory-level optimization can significantly improve stability on long-horizon tasks.

    5. Tooling: Making the Closed Loop Operational

    Architecture and training determine the upper bound; tooling determines whether the system can be delivered. A runnable visual agent loop contains at least four parts.

    Observation layer: Serialize environment state into input the model can consume. In mobile and web scenarios, a common practice is dual-channel input of “screenshot + structured widget tree”—the screenshot provides visual truth, while the widget tree provides precise clickable targets and text. The two are complementary and can greatly reduce coordinate hallucination.

    Action space: The action set must be small and closed, such as click, swipe, type, back, wait, and finish. Open-ended free-text actions are difficult to validate and difficult to replay.

    Execution and rollback: Each action should have timeouts, retries, and idempotency constraints. For irreversible operations such as submit, pay, and delete, set up second confirmation or a human gate.

    Memory and compression: In long tasks, historical screenshots quickly overflow the context. A common strategy is to keep key frames, generate structured summaries for the remaining frames, and retain the most recent several turns of raw observations.

    1. def run_loop(task, env, model, max_steps=20):
    2. history = []
    3. for step in range(max_steps):
    4. obs = env.observe() # screenshot + widget tree
    5. prompt = build_prompt(task, history, obs)
    6. action = model.act(prompt) # unified sequence input, structured action output
    7. if not validate(action, env.allowed_actions()):
    8. history.append({"error": "invalid_action", "raw": action})
    9. continue
    10. result = env.execute(action) # with timeout and idempotency protection
    11. history.append({"action": action, "result": result})
    12. history = compress(history, keep_recent=3)
    13. if result.done:
    14. return result.success, history
    15. return False, history

    6. Evaluation: Three Benchmark Categories Are Indispensable

    Evaluating native multimodal agents from a single dimension produces misleading conclusions. At minimum, three categories should be covered:

    1. Visual-to-structured-output benchmarks such as design-to-code and chart-to-table: these examine fine-grained visual restoration and structural consistency.
    2. Interactive task benchmarks such as mobile/web task automation: these examine multi-step planning, state tracking, and error recovery. The metric should be end-to-end task success rate, not single-step accuracy.
    3. Pure-text capability retention evaluation such as code generation, long-document reasoning, and math: this serves as a regression gate to prevent capability collapse caused by multimodal training.

    Two additional points matter in evaluation implementation: interactive benchmarks must fix environment versions and initial states, otherwise results are not reproducible; also record average step count and failure-type distribution. When success rates are equal, the solution with fewer steps has lower actual deployment cost.

    7. Engineering Deployment and Cost Control

    Inference cost for visual agents is far higher than for pure text, so constraints must be included at design time.

    • Cache visual encodings: Repeated encoding of the same screen across multiple turns is a common waste. Visual tokens can be cached by screen hash.
    • Hierarchical scheduling: First use low resolution to quickly determine whether fine-grained vision is needed, and upgrade the budget only when necessary.
    • Asynchrony and streaming: Build observation acquisition, encoding, and reasoning into a pipeline to hide encoding latency.
    • Observability: Record every observation, action, and latency across the full chain, and send them to logging services and monitoring/alerting systems. Visual inputs are large; original screenshots can be stored in object storage and linked by reference to avoid log bloat.
    • Elastic deployment: Container platforms host stateless inference services, combined with queues to smooth peaks and handle the bursty characteristics of task-oriented traffic.

    When deployed on cloud infrastructure, the capabilities above can be implemented using general-purpose service categories: object storage for image assets, container platforms for inference services, message queues for task decoupling, and logging and monitoring for tracing and alerting. A maintainable closed loop can be completed without binding to any proprietary interface.

    8. Common Pitfalls

    • Treating OCR as perception: Text recognition only solves “what is written,” not “how the layout and state are structured.”
    • Pursuing extremely long context: Relying on stacking screenshots for memory is costly and dilutes attention; structured compression is more effective.
    • Ignoring failure recovery: Real environments are full of pop-ups, loading states, and network jitter. A closed loop without retries and state validation cannot be delivered.
    • Optimizing only single-step accuracy: The bottleneck in long-horizon tasks is error accumulation, so optimization and evaluation must be performed at the trajectory level.

    9. Summary

    The essence of native multimodal agents is to incorporate vision into a unified representation, training, and execution system, so that perception, reasoning, and execution form an engineering structure that is closed-loop, observable, and rollback-capable. Architecturally, the goal is unified representation and controllable vision budgets. In training, the path progresses through alignment, joint fine-tuning, and trajectory optimization. In tooling, the four elements of observation, action, execution, and memory must be completed. In evaluation, visual tasks, interactive tasks, and text capability retention must be assessed together. Following this path, teams can build cost-controlled, measurable visual agents without relying on any single vendor’s proprietary solution.